/* Azel 6.0 · nuevo orden (parte 1: menú, migas, buscador) + 5.4 reclamaciones. Usa las variables del tema 5.0. */
/* menú lateral por fases */
.rail .rail-nav+.rail-sec{margin-top:12px}
.rail-f .rail-sec{margin-top:0}
.rail-it b.hot{background:rgba(242,181,68,.18);color:#F5CB78}
.mnav-sec{margin:14px 6px 0;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:600}
.mnav-sec:first-child{margin-top:6px}
/* cada opción enseña solo lo suyo dentro de la pantalla de siempre */
html[data-nav6="solicitudes"] [data-view="relaciones"] .subnav,
html[data-nav6="agenda"] [data-view="relaciones"] .subnav,
html[data-nav6="prospeccion"] [data-view="relaciones"] .subnav,
html[data-nav6="solicitudes"] #pipeline,
html[data-nav6="obras"] [data-view="finanzas"] .subnav,
html[data-nav6="reglas"] [data-view="finanzas"] .subnav,
html[data-nav6="clientes"] [data-view="relaciones"] [data-rv="agenda"],
html[data-nav6="clientes"] [data-view="relaciones"] [data-rv="prospectar"],
html[data-nav6="cobros"] [data-fv-go="obras"],
html[data-nav6="cobros"] [data-fv-go="reglas"],
html[data-nav6="cobros"] [data-fo-new],
html[data-nav6="reglas"] [data-fo-new]{display:none!important}
.reglas-back{display:none}
html[data-nav6="reglas"] .reglas-back{display:inline-flex}
/* 5.4 · hojas de reclamación en la ficha */
.recl-l{display:flex;flex-direction:column;gap:6px}
.recl-it{display:flex;align-items:center;gap:10px;width:100%;padding:11px 12px;border-radius:var(--r-sm);background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px var(--line);text-align:left;color:var(--fg)}
.recl-it .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.recl-it b{font-weight:500;font-size:14px;overflow-wrap:anywhere}
.recl-it small{font-size:12.5px;color:var(--muted)}
.recl-it.warn{box-shadow:inset 0 0 0 1px rgba(242,181,68,.55)}.recl-it.warn small{color:#F5CB78}
.recl-it.late{box-shadow:inset 0 0 0 1px rgba(240,107,91,.6)}.recl-it.late small{color:var(--crit)}
.recl-it.ok small{color:var(--good)}
.recl-it .i{width:16px;height:16px;flex:none;color:var(--muted)}
.recl-pl{margin:-4px 0 0}
.recl-warn,.recl-late{color:var(--crit)}.recl-warn{color:#F5CB78}.recl-ok{color:var(--good)}
.recl-foto{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.recl-top{display:flex;align-items:center;gap:12px;width:100%;margin:0 0 12px;padding:12px 14px;border-radius:var(--r-md);background:rgba(240,107,91,.1);box-shadow:inset 0 0 0 1px rgba(240,107,91,.45);text-align:left;color:var(--fg)}
.recl-top.open{background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px var(--line)}.recl-top.warn{background:rgba(242,181,68,.1);box-shadow:inset 0 0 0 1px rgba(242,181,68,.45)}
.recl-top span{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.recl-top small{font-size:12.5px;color:var(--muted)}.recl-top .i{width:18px;height:18px;flex:none}
/* menú lateral compacto: cabe entero en una pantalla de portátil */
@media (min-width:1024px){
  .rail{gap:3px;padding-top:16px;padding-bottom:12px}
  .rail .rail-it{padding:8px 12px;font-size:14px}
  .rail .rail-it.sm{padding:7px 12px;font-size:13.5px}
  .rail .rail-sec{margin:8px 10px 2px}
  .rail .rail-new{margin:6px 2px 4px;min-height:40px}
  .rail .rail-search{margin-bottom:2px}
  .rail .rail-f{padding-top:8px;gap:1px}
  .rail .rail-user{margin-top:4px;padding:7px 8px 7px 10px}
}
.rail-user .rail-out+.rail-out{margin-left:0}.rail-av6{position:relative}.rail-av6 .rail-dot{left:auto;right:5px;top:5px}
@media (min-width:1024px){.rail .rail-brand{padding-top:0;padding-bottom:2px}.rail .rail-it{padding-top:7px;padding-bottom:7px}.rail .rail-sec{margin-top:6px}}
@media (min-width:1024px) and (max-height:760px){.rail .rail-brand small{display:none}.rail .rail-it{padding-top:5px;padding-bottom:5px}}
/* 6.0 · parte 2: Clientes */
.cli-seg{margin:0 0 10px;align-self:flex-start}
.cli-seg[hidden]{display:none}
.pboard.emb6{align-items:start}
.pboard.emb6 .pb-col{min-height:0}
.emb-more6{width:100%;min-height:38px;border-radius:12px;border:1px dashed rgba(255,255,255,.16);color:var(--accent-2,#8FB8FF);font-size:13px;font-weight:500;background:none}
@media (max-width:760px){.cli-seg{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}}
/* 6.0 · parte 3: nuevo presupuesto */
.p6{display:flex;flex-direction:column;gap:14px;max-width:880px;margin:0 auto;width:100%}
.p6-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.p6-steps button{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);text-align:left;color:var(--fg)}
.p6-steps button:disabled{opacity:.45}
.p6-steps button.on{background:var(--accent-soft);box-shadow:inset 0 0 0 1px rgba(47,123,255,.6)}
.p6-steps i{width:28px;height:28px;flex:none;border-radius:50%;display:grid;place-items:center;font-style:normal;font-weight:600;font-size:13px;background:rgba(255,255,255,.08)}
.p6-steps .on i{background:var(--accent);color:#fff}.p6-steps .ok i{background:var(--good);color:#05070B}
.p6-steps span{min-width:0}.p6-steps b{display:block;font-size:14px}.p6-steps small{display:block;font-size:12px;color:var(--muted)}
.p6-sum{border-radius:var(--r-md);background:var(--card);box-shadow:inset 0 0 0 1px var(--line);padding:12px 14px}
.p6-sum summary{display:flex;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;font-size:14px}.p6-sum summary::-webkit-details-marker{display:none}
.p6-sum summary span{color:var(--muted)}
.p6-si{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-top:10px}
.p6-si>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px;align-items:center;padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.04)}
.p6-si span{font-size:12px;color:var(--muted)}.p6-si b{font-weight:500;font-size:14px;overflow-wrap:anywhere}.p6-si .lnk{grid-column:2;grid-row:1/3}
.p6-card{display:flex;flex-direction:column;gap:14px;padding:18px;border-radius:var(--r);background:var(--card);box-shadow:inset 0 0 0 1px var(--line)}
.p6-card h2{margin:0;font-size:18px}
.p6-q{margin:4px 0 -4px;font-weight:600;font-size:15px}.p6-q small{display:block;font-weight:400;font-size:12.5px;color:var(--muted)}
.p6-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.p6-opt{display:flex;flex-direction:column;gap:6px;padding:14px;border-radius:16px;background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px var(--line);text-align:left;color:var(--fg)}
.p6-opt[aria-pressed="true"]{background:var(--accent-soft);box-shadow:inset 0 0 0 2px var(--accent)}
.p6-opt b{font-size:15.5px}.p6-opt span{font-size:13px;color:var(--muted)}
.p6-list{display:flex;flex-direction:column;gap:6px;max-height:300px;overflow:auto}
.p6-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);text-align:left;color:var(--fg)}
.p6-row[aria-pressed="true"]{background:var(--accent-soft);box-shadow:inset 0 0 0 1px rgba(47,123,255,.6)}
.p6-row span{flex:1;min-width:0;display:flex;flex-direction:column}.p6-row small{font-size:12px;color:var(--muted)}.p6-row em{font-style:normal;font-size:12px;color:var(--accent-2,#8FB8FF)}
.p6-g{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.p6-g3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end}
.p6-line{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:16px;background:rgba(255,255,255,.03);box-shadow:inset 0 0 0 1px var(--line)}
.p6-xh{display:flex;gap:8px}.p6-xh input{flex:1;min-width:0;min-height:42px;padding:0 12px;border-radius:10px;background:rgba(255,255,255,.05);box-shadow:inset 0 0 0 1px var(--line);font-weight:600}
.p6-x{display:flex;flex-direction:column;gap:10px}
.p6-imp{display:flex;align-items:center;min-height:46px;font-size:16px;font-variant-numeric:tabular-nums}
.p6-chips{display:flex;flex-wrap:wrap;gap:6px}
.p6-totb,.p6-doc{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:16px;background:rgba(255,255,255,.04)}
.p6-kv{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 14px;font-size:14px}.p6-kv span{color:var(--muted)}.p6-kv b{font-weight:500;text-align:right;font-variant-numeric:tabular-nums}
.p6-tot{display:flex;justify-content:space-between;padding-top:8px;border-top:1px solid var(--line);font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
.p6-note{margin:0;padding:10px 12px;border-radius:12px;background:rgba(242,181,68,.1);box-shadow:inset 0 0 0 1px rgba(242,181,68,.3);font-size:13px}
.p6-note b{color:#F8D48E}.p6-ok{margin:0;color:var(--good);font-size:14px}
.p6-conf{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:var(--r);background:#121722;box-shadow:inset 0 0 0 1px rgba(47,123,255,.5),0 20px 50px -20px #000}
.p6-chg{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);font-size:14px}
.p6-chg div{display:flex;justify-content:space-between;gap:10px}.p6-chg s{color:var(--muted)}
.p6-acts{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.p6-seg{flex-wrap:wrap}
.t6-g{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.t6-in{position:relative;display:block}.t6-in input{width:100%;padding-right:64px}.t6-in em{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-style:normal;font-size:12.5px;color:var(--muted)}
#p6Act{margin-left:auto}
@media (max-width:760px){.p6-two,.p6-g,.t6-g{grid-template-columns:1fr}.p6-g3{grid-template-columns:repeat(2,minmax(0,1fr))}.p6-steps small{display:none}.p6-steps button{flex-direction:column;gap:4px;padding:8px 4px;text-align:center}.p6-steps b{font-size:12px}#p6Act{margin-left:0}}
/* 6.0 · parte 4: arrastrar con el dedo */
[data-cc],[data-cu-drag]{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.t6-ghost{position:fixed;left:0;top:0;z-index:2000;pointer-events:none;opacity:.95;box-shadow:0 24px 50px -10px rgba(0,0,0,.8);border-radius:14px}
/* 6.0 · parte 5: barra inferior del móvil (solo iconos) */
.bnav6{display:none}
@media (max-width:1023px){
  .bnav6{display:flex;align-items:center;justify-content:space-between;position:fixed;z-index:650;left:max(14px,env(safe-area-inset-left,0px));right:max(14px,env(safe-area-inset-right,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px));height:64px;padding:0 10px;border-radius:26px;background:rgba(18,22,30,.74);-webkit-backdrop-filter:saturate(1.6) blur(22px);backdrop-filter:saturate(1.6) blur(22px);box-shadow:inset 0 0 0 1px rgba(255,255,255,.09),inset 0 1px 0 rgba(255,255,255,.08),0 22px 50px -12px rgba(0,0,0,.85)}
  .bnav6 button{position:relative;display:grid;place-items:center;width:52px;height:48px;border-radius:17px;color:var(--muted);transition:background .2s,color .2s}
  .bnav6 button .i{width:23px;height:23px}
  .bnav6 button[aria-current="page"]{background:var(--accent);color:#fff;box-shadow:0 10px 24px -10px var(--accent)}
  .bnav6 .b6-plus{width:56px;height:56px;margin-top:-30px;border-radius:50%;background:linear-gradient(180deg,#5B9BFF,#2F7BFF);color:#fff;box-shadow:0 0 0 5px var(--bg),0 14px 30px -8px rgba(47,123,255,.9)}
  .bnav6 .b6-plus .i{width:25px;height:25px;stroke-width:2.3}
  .b6-dot{position:absolute;top:9px;right:12px;width:8px;height:8px;border-radius:50%;background:var(--warn)}
  html.has-bnav6 #barNew{display:none}
  html.has-bnav6 #toasts{bottom:calc(90px + env(safe-area-inset-bottom,0px))}
  html.has-bnav6 .wrap{padding-bottom:calc(120px + env(safe-area-inset-bottom,0px))}
  html.mnav-open .bnav6,html.locked .bnav6{display:none}
  html.has-bnav6 .pr-bar{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  html.has-bnav6.prbar-on #toasts{bottom:calc(160px + env(safe-area-inset-bottom,0px))}
}
