/* PagoJusto · rediseño visual 2026-11-02
   Inspiración: referencia turquesa / menta / azul, tarjetas grandes y app móvil.
   Solo presentación: formularios, identificadores, rutas y cálculos originales intactos.
*/

body.pj-ui-2026 {
  --primary: #129fb4;
  --primary-hover: #0c8fa9;
  --primary-dark: #116b84;
  --primary-soft: #e0f8f6;
  --accent: #39cc94;
  --accent-soft: #e6fbf2;
  --success: #168a61;
  --success-soft: #e4f9ef;
  --danger: #c84b65;
  --danger-soft: #fff0f2;
  --bg: #f2f8fb;
  --card: #ffffff;
  --text: #17364b;
  --text-muted: #617789;
  --border: #dce9ef;
  --radius: 22px;
  --radius-sm: 15px;
  --shadow: 0 5px 12px rgba(17, 71, 102, .035), 0 16px 34px rgba(19, 85, 116, .065);
  --shadow-lg: 0 20px 52px rgba(12, 84, 113, .12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(630px 350px at 50% -120px, #d8f7f9 0%, transparent 90%), #f2f8fb;
  color: var(--text);
}

body.pj-ui-2026 a:focus-visible,
body.pj-ui-2026 button:focus-visible,
body.pj-ui-2026 input:focus-visible,
body.pj-ui-2026 select:focus-visible,
body.pj-ui-2026 textarea:focus-visible,
body.pj-ui-2026 summary:focus-visible {
  outline: 3px solid #166fa1;
  outline-offset: 3px;
}

/* Barra superior: la franja turquesa de la referencia. */
.pj-ui-2026 .header {
  background: linear-gradient(112deg, #24bfae 0%, #1caac2 56%, #238ecb 100%);
  border: 0;
  color: white;
  padding: 15px 0;
  box-shadow: 0 9px 24px rgba(20, 137, 158, .14);
}
.pj-ui-2026 .header-inner { gap: 18px; position: relative; }
.pj-ui-2026 .logo { gap: 11px; flex-shrink: 0; }
.pj-ui-2026 .logo-text {
  color: white;
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -.055em;
  text-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.pj-ui-2026 .logo-img {
  width: 42px; height: 42px; border-radius: 14px;
  object-fit: contain; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.21);
  padding: 3px;
}
.pj-ui-2026 .nav { gap: 4px; justify-content: flex-end; }
.pj-ui-2026 .nav a,
.pj-ui-2026 .nav-user { color: rgba(255,255,255,.93); }
.pj-ui-2026 .nav a:not(.btn) { font-size: .9rem; padding: 8px 9px; font-weight: 650; }
.pj-ui-2026 .nav a:hover:not(.btn) { background: rgba(255,255,255,.19); color: #fff; }
.pj-ui-2026 .nav .btn-ghost,
.pj-ui-2026 .nav .btn-primary { color: #0c7187 !important; background: #fff; border: 1px solid rgba(255,255,255,.65); box-shadow: none; }
.pj-ui-2026 .nav .btn-ghost:hover,
.pj-ui-2026 .nav .btn-primary:hover { background: #e9fdff; }
.pj-ui-2026 .nav .nav-admin { color: #fff !important; background: rgba(255,255,255,.18) !important; }
.pj-ui-2026 .nav-user { font-size: .88rem; opacity: .95; }
.pj-ui-2026 .lang-switch a { color: rgba(255,255,255,.8) !important; }
.pj-ui-2026 .lang-switch a.is-active { background: rgba(255,255,255,.94); color: #11778c !important; }
.pj-menu-toggle { display: none; }

.pj-ui-2026 .main-content { padding-top: 30px; padding-bottom: 62px; }
.pj-ui-2026 .container { max-width: 1120px; }
.pj-ui-2026 .card,
.pj-ui-2026 .auth-card {
  border: 1px solid #e6eef3;
  border-radius: 23px;
  box-shadow: var(--shadow);
  background: #fff;
}
.pj-ui-2026 .card { padding: 25px; }
.pj-ui-2026 .card-title { font-size: 1.18rem; letter-spacing: -.04em; font-weight: 780; }
.pj-ui-2026 .page-header { align-items: center; gap: 16px; }
.pj-ui-2026 .page-header h1 { font-size: clamp(1.65rem, 3.8vw, 2.15rem); letter-spacing: -.06em; }
.pj-ui-2026 .grid-2 { gap: 20px; }

/* Grandes acciones táctiles. */
.pj-ui-2026 .btn {
  border-radius: 999px;
  font-weight: 730;
  letter-spacing: -.015em;
  min-height: 49px;
  padding: 12px 22px;
  box-shadow: none;
}
.pj-ui-2026 .btn:hover { transform: translateY(-1px); }
.pj-ui-2026 .btn-primary {
  background: linear-gradient(115deg, #1fb6b5, #198fc6);
  box-shadow: 0 7px 14px rgba(25, 156, 184, .17);
}
.pj-ui-2026 .btn-primary:hover { background: linear-gradient(115deg, #1aa4ac, #167db4); box-shadow: 0 10px 19px rgba(25, 156, 184, .22); }
.pj-ui-2026 .btn-outline { border: 1.5px solid #c7dfe8; background: white; color: #246078; }
.pj-ui-2026 .btn-outline:hover { background: #e9f8fc; border-color: #54b9ca; }
.pj-ui-2026 .btn-sm { font-size: .87rem; padding: 9px 16px; min-height: 40px; }
.pj-ui-2026 .btn-danger { background: #c34d65; }
.pj-ui-2026 .form-group label { font-weight: 720; font-size: .99rem; color: #26445a; }
.pj-ui-2026 .form-control {
  border: 1.5px solid #d8e7ec;
  border-radius: 16px;
  background: #fbfdff;
  min-height: 53px;
  color: #173c52;
  box-shadow: inset 0 1px 2px rgba(17, 78, 104, .015);
}
.pj-ui-2026 .form-control:focus { border-color: #22acbd; box-shadow: 0 0 0 4px rgba(32,177,192,.12); }
.pj-ui-2026 .form-control::placeholder { color: #90a5b1; }
.pj-ui-2026 .alert { border-radius: 16px; }
.pj-ui-2026 th { background: #f6fbfd; color: #6b8191; }
.pj-ui-2026 tr:hover td { background: #f6fbfd; }
.pj-ui-2026 .balance-positive { color: #15885d; }
.pj-ui-2026 .balance-negative { color: #bd4661; }

/* Inicio. */
.pj-home-lead {
  background: linear-gradient(115deg, #22c6af 0%, #1ca6c2 57%, #258bc7 100%);
  color: #fff;
  border-radius: 25px;
  padding: clamp(22px, 4vw, 35px);
  margin-bottom: 26px;
  box-shadow: 0 14px 30px rgba(21, 151, 178, .14);
  position: relative;
  overflow: hidden;
}
.pj-home-lead::after {
  content: ''; position: absolute; width: 170px; height: 170px;
  background: rgba(255,255,255,.07); border-radius: 50%;
  right: -50px; top: -55px; pointer-events: none;
}
.pj-home-eyebrow { display: block; font-size: .85rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; opacity: .88; }
.pj-home-lead h2 { margin: 7px 0 9px; font-size: clamp(1.4rem, 4.2vw, 2rem); letter-spacing: -.05em; line-height: 1.15; }
.pj-home-lead p { max-width: 48ch; color: rgba(255,255,255,.89); font-size: 1rem; line-height: 1.5; }
.pj-ui-2026 .group-card {
  border: 1px solid #dbebef;
  background: #fff;
  border-radius: 23px;
  padding: 23px;
  box-shadow: var(--shadow);
}
.pj-ui-2026 .group-card::before { width: 0; }
.pj-ui-2026 .group-card:hover { border-color: #88d4dd; box-shadow: 0 15px 38px rgba(14, 131, 160, .13); }
.pj-ui-2026 .group-avatar { background: linear-gradient(145deg, #20c2b0, #288fc8); border-radius: 16px; box-shadow: 0 7px 14px rgba(16, 159, 179, .18); }
.pj-ui-2026 .group-currency { background: #e9f8fb; border: 1px solid #cdebef; color: #187894; border-radius: 999px; }
.pj-ui-2026 .group-card-meta { color: #637f8f; }
.pj-ui-2026 .group-card-meta span { background: #f4fafc; border-color: #e5eff3; }
.pj-ui-2026 .group-card-meta .group-bal-pos { background: #e9faef !important; color: #147b56 !important; }
.pj-ui-2026 .group-card-meta .group-bal-neg { background: #fff1f3 !important; color: #b54463 !important; }
.pj-ui-2026 .group-card-meta .group-card-go { background: #e3f6fb !important; color: #1687a1 !important; border-color: transparent !important; }

/* Pantalla principal de cada grupo, paralela a la imagen aportada. */
.pj-ui-2026 .group-hero {
  background: #fff;
  border: 1px solid #e2edf2;
  box-shadow: var(--shadow);
  border-radius: 25px;
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 22px;
}
.pj-ui-2026 .group-kicker { color: #1596ac; font-size: .77rem; }
.pj-ui-2026 .group-hero h1 { font-size: clamp(1.55rem, 4vw, 2.05rem); letter-spacing: -.05em; }
.pj-ui-2026 .group-desc { font-size: .94rem; }
.pj-bill-panel {
  margin: 22px 0 12px;
  padding: clamp(14px, 2.5vw, 22px);
  background: #f6fbfd;
  border: 1px solid #e6f1f5;
  border-radius: 23px;
}
.pj-bill-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; gap: 12px; }
.pj-bill-heading h2 { color: #22485d; font-size: 1.12rem; letter-spacing: -.04em; font-weight: 800; }
.pj-bill-symbol {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: #e6f9fb; color: #17a5b6; font-size: 1.3rem;
}
.pj-bill-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.pj-bill-stat {
  border-radius: 18px; padding: 17px 17px 16px; background: white;
  border: 1px solid #e2edf2;
  box-shadow: 0 6px 14px rgba(29,91,111,.035);
  min-width: 0;
}
.pj-bill-label { display: block; font-size: .83rem; line-height: 1.25; color: #637e8f; font-weight: 690; }
.pj-bill-stat strong { display: block; margin: 6px 0 3px; font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.15; font-weight: 850; letter-spacing: -.055em; color: #1c4f68; overflow-wrap: anywhere; }
.pj-bill-hint { display: block; color: #8196a3; font-size: .77rem; line-height: 1.3; }
.pj-bill-stat .pj-owes { color: #c64a61; }
.pj-bill-stat .pj-owed { color: #179b68; }
.pj-people-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 23px 1px 12px; gap: 12px; }
.pj-people-heading h3 { font-size: 1.12rem; letter-spacing: -.04em; font-weight: 800; }
.pj-people-heading span { font-size: .86rem; color: #78909f; }
.pj-people-strip { display: flex; align-items: flex-start; gap: 14px; overflow-x: auto; padding: 0 2px 9px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.pj-person { display: flex; flex-direction: column; align-items: center; flex: 0 0 64px; gap: 5px; min-width: 0; }
.pj-person .avatar { width: 54px; height: 54px; border: 3px solid white; box-shadow: 0 0 0 2px #a3e3e1, 0 5px 11px rgba(15,101,139,.11); }
.pj-person:nth-child(4n+2) .avatar { box-shadow: 0 0 0 2px #9ccdf7, 0 5px 11px rgba(15,101,139,.11); }
.pj-person:nth-child(4n+3) .avatar { box-shadow: 0 0 0 2px #f7cb86, 0 5px 11px rgba(15,101,139,.11); }
.pj-person:nth-child(4n+4) .avatar { box-shadow: 0 0 0 2px #dfbef5, 0 5px 11px rgba(15,101,139,.11); }
.pj-person span { color: #435f74; font-size: .78rem; font-weight: 680; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 78px; }
.pj-quick-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 480px; margin: 18px auto 2px; }
.pj-action {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 54px; border-radius: 999px; color: #fff !important;
  font-size: .97rem; font-weight: 850; letter-spacing: .045em;
  text-decoration: none !important; transition: transform .15s ease, filter .15s ease;
  box-shadow: 0 7px 12px rgba(24, 142, 166, .11);
}
.pj-action:hover { transform: translateY(-2px); filter: brightness(.98); }
.pj-action:active { transform: translateY(0); }
.pj-action-check {
  position: absolute; left: 14px; width: 27px; height: 27px;
  border-radius: 50%; background: rgba(255,255,255,.95);
  color: #1588a3; display: inline-flex; align-items: center;
  justify-content: center; font-size: 1rem; font-weight: 850;
}
.pj-action-register { background: linear-gradient(100deg,#34cf99,#27c6a8); }
.pj-action-register .pj-action-check { color: #23b987; }
.pj-action-split { background: linear-gradient(100deg,#21b8b5,#239fb8); }
.pj-action-split .pj-action-check { color: #1c9eb0; }
.pj-action-calculate { background: linear-gradient(100deg,#269ed1,#287dc5); }
.pj-action-calculate .pj-action-check { color: #2a8aca; }
.pj-ui-2026 .group-balance {
  margin-top: 15px; background: #eff9fc; border-radius: 15px;
  padding: 12px 15px; color: #235973; font-size: .97rem;
}
.pj-ui-2026 .group-balance.is-ok { background: #e8faf0; color: #177a56; }
.pj-ui-2026 .group-actions { margin-top: 13px; padding-top: 14px; border-top: 1px solid #eaf0f4; }
.pj-ui-2026 .group-actions .btn { font-size: .88rem; }
.pj-ui-2026 .more-block > summary { border-radius: 12px; padding: 12px 14px; color: #29617a; background: #e8f7fb; }
.pj-ui-2026 .more-block[open] > summary { margin-bottom: 12px; }
.pj-ui-2026 .member-chip { background: #e6f9f5; color: #276d75; }
.pj-ui-2026 .cat-btn { background: #fff; border: 1.5px solid #d8e8ed; color: #34627b; border-radius: 999px; }
.pj-ui-2026 .cat-btn.is-on { background: #daf8f4; border-color: #24adb9; color: #107e93; box-shadow: 0 0 0 2px rgba(18, 159, 180, .11); }
.pj-ui-2026 .split-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pj-ui-2026 .split-option { background: #f4f9fc; border: 1.5px solid #d5e7ee; border-radius: 18px; font-weight: 800; min-height: 60px; }
.pj-ui-2026 .split-option.active, .pj-ui-2026 .split-option:hover { border-color: #27b6c5; background: #dcf8f8; color: #147e92; }
.pj-ui-2026 .pj-save-expense { background: linear-gradient(100deg,#35cF98,#21bca8); box-shadow: 0 8px 17px rgba(41,181,137,.18); }
.pj-ui-2026 .pj-save-expense:hover { background: linear-gradient(100deg,#24b987,#1dafa0); }
.pj-ui-2026 #pj-split-controls { scroll-margin-top: 100px; }
.pj-ui-2026 #splitPreview { background: #e8f9f8 !important; border: 1px solid #b8ece8 !important; border-radius: 17px !important; }
.pj-ui-2026 .exp-item { border-color: #ecf3f6; border-radius: 12px; padding: 14px 8px; }
.pj-ui-2026 .exp-item:hover { background: #f3fafc; }
.pj-ui-2026 .exp-amt { color: #22627f; }
.pj-ui-2026 .cat-mini { color: #2589a0; }
.pj-ui-2026 .amount-big { color: #198eaa; }
.pj-ui-2026 .auth-container { max-width: 470px; }
.pj-ui-2026 .auth-card { padding: clamp(22px, 4vw, 36px); }
.pj-ui-2026 .auth-brand .brand-icon { background: linear-gradient(135deg,#27c3ae,#2396c4); }
.pj-ui-2026 .auth-card h1 { letter-spacing: -.045em; }
.pj-ui-2026 .footer { background: #fff; border-top: 1px solid #e4eff4; }
.pj-ui-2026 .footer-link { color: #118fa6; }
.pj-ui-2026 .invite-box { background: #ebfbfa; border-color: #abebe6; }
.pj-ui-2026 .lang-switch a.is-active { border-radius: 999px; }
.pj-ui-2026 .legal-banner { background: #163e54; }
.pj-ui-2026 .legal-banner a { color: #a6f6e5; }
.pj-ui-2026 .help-dot { border-color: #b4dfe6; color: #1c8b9e; }
.pj-ui-2026 .help-dot:hover { background: #22b3bd; color: #fff; }

@media (max-width: 900px) {
  .pj-ui-2026 .nav { gap: 2px; }
  .pj-ui-2026 .nav a:not(.btn) { padding: 7px 7px; font-size: .82rem; }
  .pj-ui-2026 .nav-user { display: none; }
}
@media (max-width: 720px) {
  .pj-ui-2026 .header { padding: 10px 0; }
  .pj-ui-2026 .header-inner { min-height: 48px; flex-wrap: nowrap; }
  .pj-ui-2026 .logo-text { font-size: 1.38rem; }
  .pj-ui-2026 .logo-img { width: 37px; height: 37px; border-radius: 12px; }
  .pj-ui-2026 .header.pj-nav-enhanced .pj-menu-toggle {
    display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,.19);
    padding: 8px 12px; border: 1px solid rgba(255,255,255,.34); border-radius: 999px;
    color: white; font: 700 .88rem/1 var(--font); min-height: 40px; cursor: pointer;
  }
  .pj-ui-2026 .header.pj-nav-enhanced .nav {
    display: none; position: absolute; top: calc(100% + 11px); left: 0; right: 0;
    background: white; border: 1px solid #e6eff3; border-radius: 20px; box-shadow: 0 18px 42px rgba(16,81,107,.19);
    padding: 12px; flex-direction: column; align-items: stretch; gap: 2px; z-index: 500;
  }
  .pj-ui-2026 .header.pj-nav-enhanced.pj-nav-open .nav { display: flex; }
  .pj-ui-2026 .header.pj-nav-enhanced .nav a:not(.btn),
  .pj-ui-2026 .header.pj-nav-enhanced .nav .nav-user {
    color: #26536a; display: block; width: 100%; border-radius: 11px; text-align: left; padding: 11px 13px; font-size: .96rem;
  }
  .pj-ui-2026 .header.pj-nav-enhanced .nav a:not(.btn):hover { background: #ecf9fc; color: #0e829d; }
  .pj-ui-2026 .header.pj-nav-enhanced .nav .nav-admin { color: #186b83 !important; background: #e4f7fb !important; }
  .pj-ui-2026 .header.pj-nav-enhanced .nav .btn-ghost,
  .pj-ui-2026 .header.pj-nav-enhanced .nav .btn-primary { color: #196b80 !important; background: #eaf8fb; }
  .pj-ui-2026 .header.pj-nav-enhanced .nav .lang-switch { display: flex; justify-content: flex-start; margin: 5px 0; }
  .pj-ui-2026 .header.pj-nav-enhanced .nav .lang-switch a { display: inline-flex; width: auto; color: #366981 !important; padding: 9px 16px; }
  .pj-ui-2026 .header.pj-nav-enhanced .nav .lang-switch a.is-active { background: #dff5f7; color: #137f96 !important; }
  .pj-ui-2026 .main-content { padding-top: 18px; padding-bottom: 44px; }
  .pj-ui-2026 .card { padding: 18px; }
  .pj-ui-2026 .group-hero { padding: 18px 14px 16px; }
  .pj-ui-2026 .group-hero-top { gap: 8px; }
  .pj-ui-2026 .group-hero h1 { font-size: 1.48rem; }
  .pj-bill-panel { margin-top: 14px; padding: 13px 12px; border-radius: 19px; }
  .pj-bill-stats { gap: 9px; }
  .pj-bill-stat { padding: 13px 11px; border-radius: 16px; }
  .pj-bill-stat strong { font-size: clamp(1.13rem, 6vw, 1.55rem); }
  .pj-bill-label { font-size: .77rem; }
  .pj-people-strip { gap: 9px; }
  .pj-person { flex-basis: 61px; }
  .pj-person .avatar { width: 48px; height: 48px; }
  .pj-action { min-height: 51px; font-size: .91rem; }
  .pj-ui-2026 .group-actions .btn { flex: 1; }
  .pj-ui-2026 .page-header { margin-bottom: 18px; }
  .pj-ui-2026 .page-header > div { flex-wrap: wrap; width: 100%; }
  .pj-ui-2026 .page-header .btn { flex: 1; padding: 11px 12px; font-size: .86rem; }
  .pj-ui-2026 .grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .pj-ui-2026 .split-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .pj-ui-2026 .split-option { min-height: 55px; font-size: .88rem; padding: 11px 5px; }
  .pj-ui-2026 .card table { font-size: .88rem; }
  .pj-ui-2026 .card th, .pj-ui-2026 .card td { padding: 13px 7px; }
  .pj-ui-2026 .card td .avatar { vertical-align: middle; margin-right: 4px; width: 32px; height: 32px; }
  .pj-ui-2026 .card .settlement-item { flex-wrap: wrap; gap: 8px; }
  .pj-home-lead { padding: 23px 20px; margin-bottom: 18px; }
}
@media (max-width: 365px) {
  .pj-ui-2026 .container { padding-left: 12px; padding-right: 12px; }
  .pj-ui-2026 .logo-text { font-size: 1.2rem; }
  .pj-bill-label { font-size: .72rem; }
  .pj-bill-stat strong { font-size: 1.12rem; }
  .pj-people-strip { gap: 6px; }
  .pj-ui-2026 .group-card-meta span { font-size: .79rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pj-ui-2026 *, .pj-ui-2026 *::before, .pj-ui-2026 *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .pj-ui-2026 .header, .pj-ui-2026 .footer, .pj-menu-toggle, .pj-quick-actions { display: none !important; }
  .pj-ui-2026 { background: white !important; }
  .pj-ui-2026 .card { box-shadow: none; }
}
