/* ==========================================================================
   Estudio de Pestañas · hoja de estilos
   ========================================================================== */

:root {
  --ink: #40232f;
  --ink-2: #5f3c4a;
  --muted: #9c7987;
  --line: #f8e4ea;
  --line-2: #f0cfda;
  --bg: #fff7fa;
  --card: #ffffff;
  --rose: #d97c97;
  --rose-dark: #a94a6c;
  --rose-soft: #fdeef3;
  --plum: #6b2f47;
  --plum-2: #8a3d5b;
  --gold: #c79a6f;
  --sand: #fbeee3;
  --green: #4f7d62;
  --green-soft: #e9f3ec;
  --amber: #a9762f;
  --amber-soft: #fbf0dc;
  --red: #b0524f;
  --red-soft: #fbeae9;
  --sky: #4a7c9b;
  --sky-soft: #eaf3f8;
  --violet: #7a6398;
  --violet-soft: #f2ecf8;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 1px 2px rgba(107, 47, 71, 0.04), 0 18px 40px -26px rgba(107, 47, 71, 0.35);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 110% -10%, rgba(217, 124, 151, 0.16), transparent 60%),
    radial-gradient(720px 440px at -10% 0%, rgba(199, 154, 111, 0.1), transparent 55%),
    radial-gradient(600px 500px at 50% 120%, rgba(255, 214, 228, 0.35), transparent 70%);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--rose-dark);
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

.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;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
  line-height: 1.55;
}

.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--rose-dark);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}

.link:hover {
  text-decoration: underline;
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-dark);
}

.eyebrow--light {
  color: #e9b7c4;
}

/* ------------------------------------------------------------- cargando */

.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--bg);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.boot.hidden {
  opacity: 0;
  visibility: hidden;
  display: grid !important;
  pointer-events: none;
}

.boot__mark {
  animation: float 2.4s ease-in-out infinite;
}

.boot__spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--rose);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

.spinner--sm {
  width: 14px;
  height: 14px;
}

/* =====================================================================
   ACCESO
   ===================================================================== */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.auth__art {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 64px 7vw;
  color: #fff8fa;
  background:
    radial-gradient(680px 440px at 85% 8%, rgba(255, 214, 228, 0.34), transparent 60%),
    radial-gradient(540px 440px at 0% 100%, rgba(199, 154, 111, 0.22), transparent 60%),
    linear-gradient(150deg, #7d3552 0%, #a94a6c 55%, #c4698a 100%);
}

.auth__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.22;
  mask-image: radial-gradient(70% 60% at 60% 40%, #000 20%, transparent 75%);
}

.auth__art::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -180px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px solid rgba(255, 224, 234, 0.35);
  box-shadow: 0 0 0 40px rgba(255, 224, 234, 0.06), 0 0 0 110px rgba(255, 224, 234, 0.04);
}

.auth__art-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.auth__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth__brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth__brand small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 248, 250, 0.62);
}

.auth__mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
}

.auth__pitch h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.14;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 14px 0 16px;
}

.auth__pitch p {
  color: rgba(255, 248, 250, 0.82);
  font-size: 15.5px;
  max-width: 44ch;
}

.auth__points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.auth__points li {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14.5px;
  color: rgba(255, 248, 250, 0.92);
}

.auth__points span {
  color: #ffd6e3;
  font-size: 13px;
}

.auth__legal {
  font-size: 12px;
  color: rgba(255, 248, 250, 0.55);
  margin-top: auto;
}

.auth__panel {
  display: grid;
  place-items: center;
  padding: 48px 6vw;
}

.auth__mobile-brand {
  display: none;
}

.auth__card {
  width: 100%;
  max-width: 400px;
}

.auth__card-head {
  margin-bottom: 26px;
}

.auth__card-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.auth__card-head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.auth__switch {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.auth__note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
}

.auth.is-ready {
  animation: fade-in 0.4s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =====================================================================
   ESTRUCTURA
   ===================================================================== */

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 18px 20px;
  color: var(--ink);
  background:
    radial-gradient(420px 320px at 50% -10%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(180deg, #fdf0f4 0%, #fbe1ea 100%);
  border-right: 1px solid #f4d3de;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.brand__mark {
  display: grid;
  place-items: center;
  color: var(--rose-dark);
  flex: none;
}

.brand__mark--sm {
  color: var(--rose-dark);
}

.brand__text {
  min-width: 0;
}

.brand__text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--rose-dark);
  overflow-wrap: anywhere;
}

.brand__text small {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b98b9b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: grid;
  gap: 2px;
}

.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #8a5a6b;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav__item svg {
  opacity: 0.8;
  flex: none;
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--rose-dark);
}

.nav__item.is-active {
  background: linear-gradient(135deg, #e08ba4, var(--rose-dark));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 22px -16px rgba(169, 74, 108, 0.95);
}

.nav__item.is-active svg {
  color: #fff;
  opacity: 1;
}

.nav__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose-dark);
  margin-left: auto;
}

.sidebar__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f4d3de;
}

.userbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
}

.userbox__text {
  min-width: 0;
  flex: 1;
}

.userbox__text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.userbox__text small {
  display: block;
  font-size: 11px;
  color: #b98b9b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.userbox .avatar {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.userbox .icon-btn {
  color: #b98b9b;
}

.userbox .icon-btn:hover {
  color: var(--rose-dark);
  background: rgba(255, 255, 255, 0.75);
}

.app__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: none;
}

.content {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 36px clamp(20px, 3.4vw, 44px) 72px;
}

/* ------------------------------------------------------------ navegación móvil */

.tabbar {
  display: none;
}

/* =====================================================================
   PÁGINA
   ===================================================================== */

.page {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: page-in 0.28s ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page__intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page__intro--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.page__intro h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
}

.page__intro .lede {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 62ch;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(43, 30, 38, 0.03);
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.quick svg {
  color: var(--rose-dark);
}

.quick:hover {
  transform: translateY(-1px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.quick--primary {
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  border-color: transparent;
  color: #fff;
}

.quick--primary svg {
  color: #fff;
}

/* =====================================================================
   BOTONES
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.12s ease, box-shadow 0.15s ease;
}

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

.btn--primary {
  background: linear-gradient(135deg, #e08ba4, var(--rose-dark));
  color: #fff;
  box-shadow: 0 12px 24px -16px rgba(169, 74, 108, 0.95);
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--soft {
  background: var(--rose-soft);
  color: var(--rose-dark);
}

.btn--soft:hover {
  background: #f4dde4;
}

.btn--ghost {
  border-color: var(--line-2);
  color: var(--ink-2);
  background: #fff;
}

.btn--ghost:hover {
  border-color: var(--rose);
  color: var(--rose-dark);
}

.btn--light {
  background: #fff;
  color: var(--plum);
}

.btn--light:hover {
  background: #f8eef0;
}

.btn--danger {
  background: var(--red);
  color: #fff;
}

.btn--danger-ghost {
  color: var(--red);
  border-color: transparent;
}

.btn--danger-ghost:hover {
  background: var(--red-soft);
}

.btn--sm {
  padding: 8px 12px;
  font-size: 12.5px;
  border-radius: 10px;
}

.btn--lg {
  padding: 13px 20px;
  font-size: 15px;
  border-radius: 13px;
}

.btn--block {
  width: 100%;
}

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

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--rose-soft);
  color: var(--rose-dark);
}

.icon-btn--soft {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.icon-btn--soft:hover {
  border-color: var(--line-2);
  color: var(--rose-dark);
}

/* =====================================================================
   TARJETAS Y SECCIONES
   ===================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card--sticky {
  position: sticky;
  top: 22px;
}

.card--alerts {
  background: linear-gradient(180deg, #fffdfb, #fff);
}

.card--about {
  text-align: left;
}

.welcome {
  display: grid;
  gap: 16px;
  background: linear-gradient(160deg, #fffdfc, #fdf3f5);
  border-color: #f0dfe3;
}

.welcome__intro h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 9px 0 4px;
}

.welcome__intro p {
  font-size: 13.5px;
  color: var(--muted);
}

.welcome__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.welcome__steps li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.welcome__num {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--rose-soft);
  color: var(--rose-dark);
  font-weight: 700;
  font-size: 12.5px;
  flex: none;
}

.welcome__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.welcome__text strong {
  font-size: 14px;
  font-weight: 600;
}

.welcome__text small {
  font-size: 12px;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-head p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cols--profile,
.cols--settings {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}

.cols__side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack--tight {
  gap: 10px;
}

.summary-head {
  display: flex;
  justify-content: flex-start;
}

/* =====================================================================
   ESTADÍSTICAS
   ===================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 17px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(43, 30, 38, 0.03);
  overflow: hidden;
}

.stat__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.stat__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.stat__value {
  font-size: clamp(20px, 2.1vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stat__hint {
  font-size: 11.5px;
  color: var(--muted);
}

.stat--rose .stat__icon {
  background: var(--rose-soft);
  color: var(--rose-dark);
}

.stat--amber .stat__icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.stat--green .stat__icon {
  background: var(--green-soft);
  color: var(--green);
}

.stat--sand .stat__icon {
  background: var(--sand);
  color: var(--gold);
}

.stat--violet .stat__icon {
  background: var(--violet-soft);
  color: var(--violet);
}

.stat--red .stat__icon {
  background: var(--red-soft);
  color: var(--red);
}

.stat--red .stat__value {
  color: var(--red);
}

/* =====================================================================
   PORTADA (hero)
   ===================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px 26px;
  color: #fff8fa;
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(255, 214, 228, 0.32), transparent 70%),
    linear-gradient(130deg, #8e3f5c 0%, #a94a6c 55%, #c26786 100%);
  box-shadow: 0 26px 50px -34px rgba(107, 47, 71, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero__glow {
  position: absolute;
  right: -60px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(255, 224, 234, 0.3);
  box-shadow: 0 0 0 34px rgba(255, 224, 234, 0.06), 0 0 0 90px rgba(255, 224, 234, 0.04);
}

.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero__tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffd6e3;
}

.hero__time {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
}

.hero__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.hero__body h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero__body p {
  color: rgba(255, 248, 250, 0.78);
  font-size: 13.5px;
  margin-top: 4px;
}

.hero__price {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  white-space: nowrap;
}

.hero__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 15px;
}

.hero__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero--empty {
  background: linear-gradient(130deg, #a94a6c, #c26786);
}

/* =====================================================================
   FILAS Y LISTAS
   ===================================================================== */

.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  width: 100%;
  border-radius: 8px;
  transition: background 0.14s ease;
}

.row:last-child {
  border-bottom: 0;
}

.row:hover {
  background: #fdf8f7;
}

.row__time {
  display: flex;
  flex-direction: column;
  width: 54px;
  flex: none;
}

.row__time strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.row__time small {
  font-size: 10.5px;
  color: var(--muted);
}

.row__bar {
  width: 3px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--line-2);
  flex: none;
}

.row__bar--sky {
  background: #7fa7c2;
}
.row__bar--violet {
  background: #a99bc6;
}
.row__bar--green {
  background: #7fb094;
}
.row__bar--gray {
  background: #cbbfc3;
}
.row__bar--red {
  background: #d39893;
}

.row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.row__title {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row__meta {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row__end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: none;
}

.row__end strong {
  font-size: 14px;
  font-weight: 700;
}

/* ------------------------------------------------------------------ pagos */

.pay-list {
  display: flex;
  flex-direction: column;
}

.pay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 2px 0;
}

.pay-row:last-child {
  border-bottom: 0;
}

.pay-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 8px;
}

.pay-row__main:hover {
  background: #fdf8f7;
}

.pay-row__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex: none;
  background: var(--rose-soft);
  color: var(--rose-dark);
}

.pay-row__icon--transferencia {
  background: var(--violet-soft);
  color: var(--violet);
}

.pay-row__icon--efectivo {
  background: var(--amber-soft);
  color: var(--amber);
}

.pay-row__icon--tarjeta {
  background: var(--sky-soft);
  color: var(--sky);
}

.pay-row__icon--gasto {
  background: var(--sand);
  color: var(--gold);
}

.pay-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pay-row__title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-row__meta {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-row__amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: none;
}

.pay-row__amount strong {
  font-size: 14px;
  font-weight: 700;
}

.pay-row__amount small {
  font-size: 10.5px;
  font-weight: 600;
}

.pay-row__amount .is-ok {
  color: var(--green);
}

.pay-row__amount .is-pending {
  color: var(--amber);
}

.pay-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pay-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 18px 10px;
  box-shadow: 0 1px 2px rgba(43, 30, 38, 0.03);
}

.pay-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--line);
}

.pay-group__head span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pay-group__head strong {
  font-size: 14px;
  font-weight: 700;
}

/* ---------------------------------------------------------------- thumbs */

.thumb {
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  flex: none;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb--sm {
  width: 38px;
  height: 38px;
}

.thumb--md {
  width: 56px;
  height: 56px;
}

/* =====================================================================
   CALENDARIO
   ===================================================================== */

.agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: start;
}

.calendar-card {
  padding: 18px;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.month-nav__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.month-nav__label strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.calendar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar__head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 0 2px 4px;
}

.calendar__head span {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  transition: background 0.13s ease, color 0.13s ease, border-color 0.13s ease;
}

.cal-day:hover {
  background: var(--rose-soft);
}

.cal-day__num {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
}

.cal-day__dots {
  display: flex;
  gap: 2px;
  height: 4px;
}

.cal-day__more {
  position: absolute;
  right: 4px;
  top: 3px;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--muted);
}

.cal-day.is-today .cal-day__num {
  color: var(--rose-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cal-day.is-selected {
  background: var(--rose-dark);
  color: #fff;
  box-shadow: 0 10px 20px -14px rgba(169, 74, 108, 0.95);
}

.cal-day.is-selected .cal-day__num {
  color: #fff;
  text-decoration: none;
}

.cal-day.is-selected .cal-day__more {
  color: rgba(255, 255, 255, 0.7);
}

.cal-day--empty {
  pointer-events: none;
}

.cal-day--empty:hover {
  background: transparent;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
  background: var(--line-2);
}

.dot--sky {
  background: #7fa7c2;
}
.dot--violet {
  background: #a99bc6;
}
.dot--green {
  background: #7fb094;
}
.dot--gray {
  background: #cbbfc3;
}
.dot--red {
  background: #d39893;
}

.calendar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.calendar__legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.day-panel {
  padding: 20px;
}

.day-panel__total {
  font-size: 15px;
  font-weight: 700;
}

/* =====================================================================
   CHIPS / FILTROS / BUSCADOR
   ===================================================================== */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  height: 42px;
  min-width: min(320px, 100%);
  flex: 1;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--muted);
}

.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
}

.search input::placeholder {
  color: #b6a3ab;
}

.search:focus-within {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(185, 106, 128, 0.12);
}

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.chips--scroll {
  flex-wrap: wrap;
}

.chip {
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.chip:hover {
  border-color: var(--rose);
  color: var(--rose-dark);
}

.chip.is-active {
  background: var(--rose-dark);
  border-color: var(--rose-dark);
  color: #fff;
}

/* =====================================================================
   ETIQUETAS
   ===================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pill--sky {
  background: var(--sky-soft);
  color: var(--sky);
}
.pill--violet {
  background: var(--violet-soft);
  color: var(--violet);
}
.pill--green {
  background: var(--green-soft);
  color: var(--green);
}
.pill--gray {
  background: #f1ebee;
  color: var(--muted);
}
.pill--red {
  background: var(--red-soft);
  color: var(--red);
}

.mini {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.mini--ok {
  background: var(--green-soft);
  color: var(--green);
}
.mini--warn {
  background: var(--amber-soft);
  color: var(--amber);
}
.mini--info {
  background: var(--rose-soft);
  color: var(--rose-dark);
}
.mini--muted {
  background: #f2edef;
  color: var(--muted);
}

.chip-method {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose-dark);
  font-size: 11px;
  font-weight: 600;
}

.tag--muted {
  background: #f2edef;
  color: var(--muted);
}

.badge-soft {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose-dark);
  background: var(--rose-soft);
  padding: 4px 9px;
  border-radius: 999px;
}

/* =====================================================================
   AVATARES
   ===================================================================== */

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f7e3e8, #eccfd7);
  color: var(--rose-dark);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 11.5px;
}

.avatar--md {
  width: 44px;
  height: 44px;
  font-size: 14px;
}

.avatar--lg {
  width: 68px;
  height: 68px;
  font-size: 22px;
}

/* =====================================================================
   CLIENTAS
   ===================================================================== */

.client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.client-card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.client-card.is-archived {
  opacity: 0.62;
}

.client-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.client-card__name {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card__meta {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card__end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: var(--muted);
}

/* --------------------------------------------------------------- perfil */

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  width: fit-content;
}

.backlink:hover {
  color: var(--rose-dark);
}

.profile {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.profile__main {
  flex: 1;
  min-width: 220px;
}

.profile__main h1 {
  font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 33px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.profile__main p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profile__main a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--rose-dark);
  font-weight: 600;
}

.profile__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.profile__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.detail-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 3px;
}

.detail-list dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-size: 13.5px;
  white-space: pre-line;
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* =====================================================================
   MATERIALES
   ===================================================================== */

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.material {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.material.is-low {
  border-color: #efd3b6;
  background: linear-gradient(180deg, #fffdf9, #fff);
}

.material__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.material__head h3 {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
}

.material__head p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.material__stock {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.material__stock strong {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.material__stock span {
  font-size: 12px;
  color: var(--muted);
}

.material__stock small {
  font-size: 10.5px;
  color: var(--muted);
  width: 100%;
}

.stock-bar {
  width: 100%;
  height: 4px;
  border-radius: 3px;
  background: #f1e7e9;
  overflow: hidden;
  margin: 2px 0;
}

.stock-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c98a9c, var(--rose-dark));
  border-radius: 3px;
}

.material.is-low .stock-bar i {
  background: linear-gradient(90deg, #d9a86c, #b07a3c);
}

.material__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.material__foot .muted {
  font-size: 11.5px;
}

.material__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
}

.round-btn:hover {
  border-color: var(--rose);
  color: var(--rose-dark);
}

/* =====================================================================
   RESUMEN / GRÁFICOS
   ===================================================================== */

.chart {
  display: flex;
  align-items: flex-end;
  gap: clamp(8px, 2vw, 26px);
  height: 190px;
  padding: 10px 4px 0;
}

.chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  height: 100%;
  justify-content: flex-end;
}

.chart__bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  width: 100%;
  height: 100%;
  justify-content: center;
}

.chart__bar {
  width: min(26px, 38%);
  min-height: 3px;
  border-radius: 6px 6px 3px 3px;
  transition: filter 0.15s ease;
}

.chart__bar--income {
  background: linear-gradient(180deg, #d08fa4, var(--rose-dark));
}

.chart__bar--outcome {
  background: linear-gradient(180deg, #e2c8a8, #c19a63);
}

.chart__bar:hover {
  filter: brightness(1.08);
}

.chart__label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.chart__col.is-current .chart__label {
  color: var(--rose-dark);
  font-weight: 700;
}

.chart__col.is-empty .chart__bar {
  height: 2px !important;
  opacity: 0.3;
}

.chart__note {
  margin-top: 10px;
  text-align: center;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.9fr) minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 10px;
}

.bar-row__label {
  font-size: 12.5px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
}

.bar-row__label small {
  font-size: 10.5px;
  color: var(--muted);
}

.bar-row__track {
  height: 7px;
  border-radius: 4px;
  background: #f3eaec;
  overflow: hidden;
}

.bar-row__fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #cf92a4, var(--rose-dark));
  transition: width 0.35s ease;
}

.bar-row__fill--sand {
  background: linear-gradient(90deg, #e0c49e, #b98a5a);
}

.bar-row__value {
  font-size: 12.5px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.big-number {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 6px 0 2px;
}

.ranking {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ranking li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.ranking li:last-child {
  border-bottom: 0;
}

.ranking__num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--rose-soft);
  color: var(--rose-dark);
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

.ranking__name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ranking__name small {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 500;
}

.ranking strong {
  font-size: 13px;
}

/* =====================================================================
   AJUSTES
   ===================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: #fff;
  font-size: 14px;
  outline: 0;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.field textarea {
  resize: vertical;
  min-height: 64px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(185, 106, 128, 0.13);
}

.field input:disabled {
  background: #faf5f4;
  color: var(--muted);
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(169, 79, 72, 0.12);
}

.field small {
  font-size: 11px;
  color: var(--muted);
}

.field--wide {
  grid-column: 1 / -1;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-row .field {
  min-width: 0;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 6px;
  flex-wrap: wrap;
}

.form-actions__spacer {
  flex: 1;
}

.form-error {
  color: var(--red);
  background: var(--red-soft);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
}

.form-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
  background: #fcf7f5;
  border: 1px dashed var(--line-2);
  border-radius: 11px;
  padding: 10px 12px;
  margin-top: 14px;
}

.form-note svg {
  flex: none;
  margin-top: 1px;
  color: var(--rose-dark);
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--rose-dark);
  flex: none;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: #faf5f4;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.segmented__item {
  position: relative;
  cursor: pointer;
}

.segmented__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented__item span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.14s ease, color 0.14s ease;
  text-align: center;
}

.segmented__item input:checked + span {
  background: #fff;
  color: var(--rose-dark);
  box-shadow: 0 2px 8px -4px rgba(43, 30, 38, 0.35);
}

.service-list {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.service-row:last-child {
  border-bottom: 0;
}

.service-row.is-off {
  opacity: 0.5;
}

.service-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  flex: none;
}

.service-row__dot--relleno {
  background: #a99bc6;
}
.service-row__dot--lifting {
  background: #b08a5a;
}
.service-row__dot--retiro {
  background: #8b9a93;
}
.service-row__dot--otro {
  background: #c5b6bc;
}

.service-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.service-row__main strong {
  font-size: 13.5px;
  font-weight: 600;
}

.service-row__main small {
  font-size: 11px;
  color: var(--muted);
}

.service-row__price {
  font-size: 13.5px;
  white-space: nowrap;
}

/* =====================================================================
   MODALES
   ===================================================================== */

.has-modal {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(60, 25, 40, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.modal.is-open .modal__backdrop {
  opacity: 1;
}

.modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 40px 90px -30px rgba(30, 20, 25, 0.55);
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.2s ease;
  overflow: hidden;
}

.modal__panel--wide {
  width: min(720px, 100%);
}

.modal.is-open .modal__panel {
  transform: none;
  opacity: 1;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.modal__head h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal__head p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

.modal__body {
  padding: 20px 22px 22px;
  overflow-y: auto;
}

.modal__text {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}

.modal__actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 22px;
}

.proof-view {
  border-radius: 14px;
  overflow: hidden;
  background: #f7f1f0;
  display: grid;
  place-items: center;
  max-height: 64vh;
}

.proof-view img {
  max-height: 64vh;
  width: auto;
  object-fit: contain;
}

.file-input {
  width: 100%;
  margin: 16px 0 4px;
  padding: 12px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: #fcf8f7;
  font-size: 13px;
}

.pago-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, #fbf1f3, #fdf8f7);
  border: 1px solid #f2dfe4;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pago-context strong {
  display: block;
  font-size: 14.5px;
}

.pago-context span {
  font-size: 12px;
  color: var(--muted);
}

.pago-context__price {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.pago-context__price strong {
  font-size: 18px;
  font-weight: 700;
}

.pago-context__price small {
  font-size: 11px;
  color: var(--muted);
}

.cita-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  border-radius: 13px;
  background: #faf6f5;
  border: 1px solid var(--line);
  margin-top: 14px;
  flex-wrap: wrap;
}

.cita-summary > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cita-summary span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--muted);
}

.cita-summary strong {
  font-size: 15px;
}

.cita-summary button {
  margin-left: auto;
}

/* --------------------------------------------------------------- uploader */

.uploader {
  border: 1px dashed var(--line-2);
  border-radius: 13px;
  padding: 10px;
  background: #fdf9f8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uploader__preview {
  min-height: 70px;
  border-radius: 9px;
  background: #f6efee;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.uploader__preview img {
  width: auto;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 24px -16px rgba(43, 30, 38, 0.55);
}

.uploader__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.uploader__placeholder strong {
  font-size: 12.5px;
  color: var(--ink-2);
}

.uploader__placeholder small {
  font-size: 11px;
}

.uploader__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.uploader__hint {
  font-size: 11px;
  color: var(--muted);
}

/* ----------------------------------------------------------------- menús */

.menu-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  border-radius: 8px;
  color: var(--muted);
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-item:hover {
  background: #fdf8f7;
}

.menu-item__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--rose-soft);
  color: var(--rose-dark);
  flex: none;
}

.menu-item__text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.menu-item__text strong {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.menu-item__text small {
  font-size: 11.5px;
  color: var(--muted);
}

/* =====================================================================
   VACÍOS, AVISOS, VARIOS
   ===================================================================== */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 20px;
  text-align: center;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--rose-soft);
  color: var(--rose-dark);
  margin-bottom: 4px;
}

.empty h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.empty p {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 36ch;
}

.empty .btn {
  margin-top: 8px;
}

.alerts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
}

.alert-item:last-child {
  border-bottom: 0;
}

.alert-item > span:nth-child(2) {
  flex: 1;
}

.alert-item__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  flex: none;
  background: #f2ecee;
  color: var(--muted);
}

.alert-item__icon--ok {
  background: var(--green-soft);
  color: var(--green);
}
.alert-item__icon--amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.alert-item__icon--rose {
  background: var(--rose-soft);
  color: var(--rose-dark);
}

.banner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border-radius: 13px;
  font-size: 13px;
}

.banner--warn {
  background: var(--amber-soft);
  color: #7c5722;
  border: 1px solid #f0dcba;
}

.banner svg {
  flex: none;
}

.hint-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  padding: 2px 4px;
}

.hint-line svg {
  color: var(--rose-dark);
  flex: none;
}

/* =====================================================================
   TOAST
   ===================================================================== */

#toast-root {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(14px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  width: min(420px, calc(100vw - 32px));
}

#toast-root.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-radius: 13px;
  background: #6b2f47;
  color: #fff8fa;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 22px 40px -20px rgba(60, 25, 40, 0.7);
}

.toast svg {
  flex: none;
}

.toast--ok svg {
  color: #9fd0b3;
}

.toast--error {
  background: #6f2f2b;
}

.toast--error svg {
  color: #f2b7b2;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 1180px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .cols__side {
    min-width: 0;
  }

  .card--sticky {
    position: static;
  }
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 86px;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px clamp(16px, 4vw, 26px);
    background: rgba(255, 247, 250, 0.9);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid rgba(240, 207, 218, 0.75);
  }

  .topbar__brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
  }

  .topbar__title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar__actions {
    display: flex;
    gap: 6px;
    flex: none;
  }

  .content {
    padding: 22px clamp(16px, 4vw, 26px) 40px;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 249, 252, 0.95);
    backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
  }

  .tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 2px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 10px;
  }

  .tab.is-active {
    color: var(--rose-dark);
  }

  .tab.is-active svg {
    color: var(--rose-dark);
  }

  .tab__dot {
    position: absolute;
    top: 4px;
    right: calc(50% - 13px);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rose);
  }

  #toast-root {
    bottom: 96px;
  }

  .agenda-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .page__intro--row {
    align-items: flex-start;
  }

  .page__intro--row > .btn {
    width: 100%;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .quick {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.3;
  }
}

@media (max-width: 820px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth__art {
    display: none;
  }

  .auth__panel {
    padding: 34px 22px 44px;
    align-content: start;
  }

  .auth__mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 26px;
  }

  .auth__mobile-text {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
  }

  .auth__mobile-text small {
    font-family: var(--font-sans);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 18px 16px 30px;
  }

  .card {
    padding: 17px;
    border-radius: 16px;
  }

  .stats {
    gap: 10px;
  }

  .stat {
    padding: 14px;
  }

  .stat__value {
    font-size: 21px;
  }

  .client-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .material-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal {
    padding: 0;
    align-items: end;
  }

  .modal__panel {
    width: 100%;
    max-width: 100%;
    max-height: 93vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(30px);
  }

  .modal__panel--wide {
    width: 100%;
  }

  .modal__head {
    padding: 18px 18px 12px;
  }

  .modal__body {
    padding: 16px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .profile {
    padding: 18px;
  }

  .profile__actions {
    width: 100%;
  }

  .profile__actions .btn {
    flex: 1;
  }

  .day-panel {
    padding: 16px;
  }

  .calendar-card {
    padding: 14px;
  }

  .cal-day {
    min-height: 38px;
    height: 42px;
    aspect-ratio: auto;
    border-radius: 10px;
  }

  .cal-day__num {
    font-size: 12.5px;
  }

  .chart {
    height: 160px;
    gap: 8px;
  }

  .chart__label {
    font-size: 9px;
  }

  .bar-row {
    grid-template-columns: minmax(80px, 1fr) minmax(0, 1.2fr) auto;
  }

  .page__intro h1 {
    font-size: 27px;
  }

  .quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick span {
    font-size: 11.5px;
  }

  .hero {
    padding: 19px;
  }

  .hero__body h2 {
    font-size: 24px;
  }

  .hero__foot {
    gap: 10px;
  }

  .hero__actions {
    width: 100%;
  }

  .hero__actions .btn {
    flex: 1;
  }

  .summary-head .month-nav {
    width: 100%;
  }

  .welcome__steps li {
    flex-wrap: wrap;
  }

  .welcome__steps li .btn {
    width: 100%;
  }

  .chips--scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .chips--scroll::-webkit-scrollbar {
    display: none;
  }

  .pay-group {
    padding: 4px 14px 8px;
  }
}

@media (max-width: 400px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats--three {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick {
    flex-direction: row;
    align-items: center;
  }

  .quick--primary {
    grid-column: 1 / -1;
  }
}

/* =====================================================================
   IMPRESIÓN
   ===================================================================== */

.print-brand,
.print-foot {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .tabbar,
  #toast-root,
  .no-print,
  .quick-actions,
  .page__intro,
  .summary-head {
    display: none !important;
  }

  .app {
    display: block;
    padding: 0;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border-color: #e6dcda;
    break-inside: avoid;
  }

  .print-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 12px;
    border-bottom: 2px solid #a94a6c;
    margin-bottom: 18px;
  }

  .print-brand strong {
    font-family: var(--font-display);
    font-size: 20px;
  }

  .print-brand span {
    font-size: 12px;
    color: #666;
  }

  .print-foot {
    display: block;
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid #e6dcda;
    font-size: 10.5px;
    color: #777;
  }

  .page__intro .lede,
  .chart {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat {
    border: 1px solid #e6dcda;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
