/* Mi obra · Grupo Valle Proyectos — estilos de la app (pensada primero para el móvil) */
@font-face{font-family:'Source Sans Pro';src:url('fonts/source-sans-pro-400.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Source Sans Pro';src:url('fonts/source-sans-pro-600.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:'Source Sans Pro';src:url('fonts/source-sans-pro-700.woff2') format('woff2');font-weight:700;font-display:swap}

:root{
  color-scheme:light;
  --ink:#12180f;--text:#3f4a38;--muted:#5f6b57;--line:#e2e9d8;
  --lime:#8cc63f;--lime-bright:#a6dc4f;--lime-deep:#5fa019;--green:#2f6b1c;--forest:#173a14;--dark:#0e1f0d;
  --bg:#eff5e6;--card:#fff;--sage:#e6f2d4;
  --amber:#f2a516;--amber-soft:#fff3d6;--amber-ink:#7a4a00;
  --danger:#c8362c;--danger-soft:#fde8e5;
  --radius:18px;--radius-s:12px;
  --shadow:0 1px 2px rgba(18,40,12,.06),0 8px 24px rgba(18,40,12,.07);
  --bar-h:58px;--tab-h:64px;
  --safe-t:env(safe-area-inset-top,0px);--safe-b:env(safe-area-inset-bottom,0px);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Source Sans Pro',system-ui,-apple-system,Arial,sans-serif;font-size:17px;line-height:1.5;font-synthesis:none;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}
img{display:block;max-width:100%;height:auto}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
h1,h2{margin:0;font-weight:700;line-height:1.15;letter-spacing:-.02em}
h1{font-size:clamp(26px,7vw,34px)}
h2{font-size:20px}
p{margin:0}
:focus-visible{outline:3px solid var(--lime-deep);outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.muted{color:var(--muted)}
.small{font-size:14.5px}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--lime-deep);margin-bottom:4px}
.icon{width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Botones */
.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:54px;padding:12px 22px;border:0;border-radius:14px;background:linear-gradient(180deg,var(--lime-bright),var(--lime));color:#10210a;font-weight:700;font-size:17px;text-decoration:none;box-shadow:0 2px 0 var(--lime-deep),0 8px 18px rgba(95,160,25,.28);transition:transform .12s,box-shadow .12s,background-color .2s}
.button:active{transform:translateY(2px);box-shadow:0 0 0 var(--lime-deep),0 4px 10px rgba(95,160,25,.22)}
.button:disabled{opacity:.5;box-shadow:none;cursor:not-allowed}
.button.ghost{background:#fff;color:var(--forest);box-shadow:inset 0 0 0 2px #cfe0bd}
.button.ghost:active{background:var(--sage)}
.button.danger{background:#fff;color:var(--danger);box-shadow:inset 0 0 0 2px #f0b9b3}
.button.danger:active{background:var(--danger-soft)}
.link-button{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 0;border:0;background:none;color:var(--green);font-weight:700;font-size:16px;text-decoration:underline;text-underline-offset:3px}
.link-button.danger{color:var(--danger)}
.icon-button{width:44px;height:44px;border:0;border-radius:12px;background:none;font-size:26px;line-height:1;color:var(--muted)}
.icon-button:active:not(:disabled){background:var(--danger-soft);color:var(--danger)}
.icon-button:disabled{opacity:.3;cursor:not-allowed}

/* Barra superior */
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;min-height:calc(var(--bar-h) + var(--safe-t));padding:var(--safe-t) 16px 0;background:linear-gradient(120deg,var(--dark),var(--forest) 55%,#2c6a1b);color:#fff;box-shadow:0 4px 18px rgba(14,31,13,.25)}
.topbar img{height:38px;width:auto;border-radius:8px;background:#fff;padding:3px}
.topbar-back{display:grid;place-items:center;width:44px;height:44px;margin-left:-8px;border-radius:50%;color:#fff;background:rgba(255,255,255,.12)}
.topbar-back:active{background:rgba(255,255,255,.25)}
.topbar-back .icon{width:26px;height:26px;stroke-width:2.4}
.topbar-title{font-weight:700;font-size:20px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Barra inferior */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;justify-content:space-around;padding:6px max(8px,calc((100vw - 620px)/2)) calc(6px + var(--safe-b));background:rgba(255,255,255,.96);border-top:1px solid var(--line);box-shadow:0 -6px 24px rgba(18,40,12,.08);backdrop-filter:blur(12px)}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:52px;padding:4px 2px;color:var(--muted);font-size:12.5px;font-weight:600;text-decoration:none;border-radius:12px}
.tab-icon{position:relative;display:grid;place-items:center;width:56px;height:30px;border-radius:15px;transition:background-color .2s,color .2s}
.tab .icon{width:23px;height:23px}
.tab.is-active{color:var(--forest);font-weight:700}
.tab.is-active .tab-icon{background:var(--lime);color:#10210a}
.tab:active .tab-icon{background:var(--sage)}
.badge{position:absolute;top:-5px;right:2px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--danger);color:#fff;font-size:12px;font-weight:700;line-height:20px;text-align:center;box-shadow:0 0 0 2px #fff}

/* Contenedores */
main{padding:16px 16px calc(var(--tab-h) + var(--safe-b) + 28px);margin:0 auto}
.client,.admin.narrow{max-width:620px}
.admin{max-width:780px}
.panel{margin-top:14px;padding:20px 18px;background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel>h2{margin-bottom:12px}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:8px}
.page-head .button{min-height:46px;padding:8px 16px;font-size:16px}
.greeting{font-size:17px;font-weight:600;color:var(--muted);margin:2px 2px 0}
.preview-note{margin-bottom:10px;padding:12px 14px;border-radius:var(--radius-s);background:var(--amber-soft);color:var(--amber-ink);font-size:15px;font-weight:600}

/* Formularios */
label{display:block;margin:16px 0 6px;font-size:15.5px;font-weight:700}
input:not([type=radio]):not([type=range]):not([type=file]),select,textarea{display:block;width:100%;min-height:52px;padding:12px 14px;border:2px solid #d6e2c8;border-radius:var(--radius-s);background:#f8fbf3;font-size:17px;appearance:none}
select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='m2 2 6 6 6-6' fill='none' stroke='%232f6b1c' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;padding-right:44px}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--lime-deep);background-color:#fff;box-shadow:0 0 0 4px rgba(140,198,63,.3)}
input[type=file]{font-size:15px;max-width:100%}
textarea{resize:vertical}
form .button{width:100%;margin-top:20px}
form .link-button{width:100%;justify-content:center;margin-top:6px}
.pair{display:grid;grid-template-columns:1fr;gap:0}
.form-error{margin-top:14px;padding:12px 14px;border-radius:var(--radius-s);background:var(--danger-soft);color:#7a1810;font-size:15.5px;font-weight:600}
.thumb{width:160px;aspect-ratio:16/10;object-fit:cover;border-radius:var(--radius-s);margin-bottom:10px}
.photo-drop{display:flex;align-items:center;justify-content:center;gap:12px;min-height:84px;margin:0;padding:16px;border:2px dashed #b9d39c;border-radius:var(--radius);background:var(--sage);color:var(--forest);font-size:17px;font-weight:700;text-align:center;cursor:pointer}
.photo-drop .icon{width:30px;height:30px}
.photo-drop.is-ready{border-style:solid;border-color:var(--lime-deep);background:#dff3c2}
.sr-only:focus-visible+*,.photo-drop:focus-within{outline:3px solid var(--lime-deep)}

/* Acceso */
.login{max-width:520px;padding:0 16px calc(32px + var(--safe-b))}
.login-hero{margin:0 -16px;padding:calc(34px + var(--safe-t)) 24px 46px;background:linear-gradient(150deg,var(--dark),var(--forest) 55%,#3a8322);color:#fff;text-align:center;border-radius:0 0 34px 34px}
.login-hero h1{font-size:34px}
.login-hero p{margin-top:6px;color:#d4ecbb;font-size:17px}
.login-logo{width:104px;margin:0 auto 16px;border-radius:22px;background:#fff;padding:8px;box-shadow:0 12px 30px rgba(0,0,0,.3)}
.login .panel:first-of-type{margin-top:-24px;position:relative}
.demo-box{background:var(--sage);box-shadow:none}
.demo-box ul{display:grid;gap:8px;margin:14px 0;padding:0;list-style:none}
.demo-user{display:flex;flex-direction:column;width:100%;min-height:56px;padding:10px 14px;border:0;border-radius:var(--radius-s);background:#fff;text-align:left;box-shadow:var(--shadow)}
.demo-user:active{background:#f3f9ea}
.demo-user span{font-weight:700}
.demo-user small{color:var(--muted);font-size:14px}
.demo-note{margin-top:14px}

/* Anillo de avance */
.ring{display:grid;place-items:center;flex-shrink:0;width:108px;height:108px;border-radius:50%;background:conic-gradient(var(--lime-deep),var(--lime-bright) calc(var(--value)*1%),#e3ecd6 0)}
.ring strong{display:grid;grid-auto-flow:column;place-content:center;align-items:baseline;gap:1px;width:82px;height:82px;border-radius:50%;background:#fff;font-size:30px;font-weight:700;letter-spacing:-.02em;color:var(--forest)}
.ring small{font-size:15px;font-weight:700}
.ring.small{width:62px;height:62px}
.ring.small strong{width:46px;height:46px;font-size:17px}
.ring.small small{font-size:10px}
.progress-row{display:flex;align-items:center;gap:16px}
.progress-headline{display:block;font-size:21px;font-weight:700;letter-spacing:-.01em;line-height:1.2}
.progress-row p{color:var(--text);margin-top:4px}

/* Cliente */
.hero-card{margin-top:10px;overflow:hidden;background:var(--card);border-radius:22px;box-shadow:var(--shadow)}
.hero-photo{width:100%;aspect-ratio:16/9;object-fit:cover}
.hero-body{padding:18px}
.hero-body h1{margin-bottom:16px}
.tile{display:flex;align-items:center;gap:14px;margin-top:12px;padding:14px 12px 14px 14px;background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);text-decoration:none;min-height:72px}
.tile:active{background:#f6faef}
.tile>.icon{color:var(--lime-deep)}
.tile-icon{display:grid;place-items:center;flex-shrink:0;width:46px;height:46px;border-radius:14px;background:var(--sage);color:var(--green)}
.tile-icon.amber{background:var(--amber-soft);color:var(--amber-ink)}
.tile-text{flex:1;min-width:0}
.tile-text small{display:block;font-size:13.5px;font-weight:600;color:var(--muted)}
.tile-text b{display:block;font-size:17px;font-weight:700;line-height:1.25}
.tile.alert{background:var(--amber-soft);box-shadow:inset 0 0 0 2px #f5d58a}
.tile.alert .tile-icon{background:var(--amber);color:#fff}
.clamp{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.phases{margin:0;padding:0;list-style:none}
.phases>li{display:flex;gap:14px;padding:14px 10px;border-top:1px solid var(--line)}
.phases>li:first-child{border-top:0}
.phases i{display:grid;place-items:center;flex-shrink:0;width:34px;height:34px;border-radius:50%;background:#eaf0e2;color:var(--muted);font-style:normal;font-size:15px;font-weight:700}
.phases i .icon{width:18px;height:18px;stroke-width:3}
.phases div{flex:1;min-width:0}
.phases b{display:block;font-weight:700}
.phases small{font-size:14.5px;color:var(--muted)}
.phases .done i{background:var(--lime);color:#10210a}
.phases .current{background:#f0f8e2;border-radius:var(--radius-s);border-top-color:transparent;box-shadow:inset 0 0 0 2px #cfe6ac}
.phases .current+li{border-top-color:transparent}
.phases .current i{background:var(--forest);color:#fff}
.phases .current small{color:var(--green);font-weight:700}
.phases .pending b{color:var(--muted)}
.bar{display:block;height:8px;margin-top:8px;border-radius:4px;background:#dfe9d2;overflow:hidden}
.bar span{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,var(--lime-deep),var(--lime-bright));transition:width .5s}
.phase-items{margin-top:6px}
.phase-items summary,.phase-summary summary{display:inline-flex;align-items:center;min-height:44px;padding:4px 0;color:var(--green);font-size:16px;font-weight:700;cursor:pointer}
.phase-items ul{margin:2px 0 6px;padding-left:20px;color:var(--text);font-size:16px}
.phase-items li{padding:3px 0}
.next-note{margin-top:14px;padding-top:14px;border-top:1px solid var(--line);font-size:15.5px;color:var(--text)}
.updates{margin:0;padding:0;list-style:none}
.updates li{padding:16px 0;border-top:1px solid var(--line)}
.updates li:first-child{border-top:0;padding-top:0}
.updates time{display:inline-block;padding:3px 10px;border-radius:20px;background:var(--sage);font-size:13px;font-weight:700;color:var(--green)}
.updates p{margin-top:8px;color:#2a3324;overflow-wrap:anywhere}
.updates img{margin-top:12px;width:100%;max-height:380px;object-fit:cover;border-radius:14px}
.updates.editable{margin-top:22px;padding-top:6px;border-top:1px solid var(--line)}
.updates.editable li:first-child{padding-top:16px}
.updates.editable img{max-width:280px}
.actions{display:grid;gap:10px;margin-top:14px}

/* Administración */
.project-list{display:grid;gap:12px;margin:14px 0;padding:0;list-style:none}
.project-card{display:flex;align-items:center;gap:14px;min-height:88px;padding:14px 12px 14px 14px;background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);text-decoration:none}
.project-card:active{background:#f6faef}
.project-card div:not(.ring){flex:1;min-width:0}
.project-card b{display:block;font-size:18px;font-weight:700;line-height:1.2}
.project-card span{display:block;color:var(--text);font-size:15px}
.project-card small{color:var(--lime-deep);font-size:14px;font-weight:700}
.project-card>.icon{color:var(--lime-deep)}
.fab{position:fixed;right:max(16px,calc((100vw - 780px)/2 + 16px));bottom:calc(var(--tab-h) + var(--safe-b) + 18px);z-index:15;display:inline-flex;align-items:center;gap:8px;min-height:56px;padding:0 22px 0 18px;border-radius:28px;background:linear-gradient(180deg,var(--lime-bright),var(--lime));color:#10210a;font-size:17px;font-weight:700;text-decoration:none;box-shadow:0 2px 0 var(--lime-deep),0 12px 26px rgba(47,107,28,.38)}
.fab:active{transform:translateY(2px)}
.fab .icon{width:24px;height:24px;stroke-width:2.6}
.admin:has(.fab){padding-bottom:calc(var(--tab-h) + var(--safe-b) + 100px)}
.phase-editor{margin:18px 0 8px;padding:0;border:0}
.phase-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px;border-radius:var(--radius-s)}
.phase-row.is-current{background:#f0f8e2;box-shadow:inset 0 0 0 2px #cfe6ac}
.phase-row input[type=radio]{width:26px;height:26px;accent-color:var(--green);flex-shrink:0}
.phase-row .phase-name{flex:1;min-width:0;min-height:46px}
.phase-row label{margin:0;font-weight:400;padding:10px 0}
.phase-state{display:none}
.phase-summary{flex-basis:100%;padding-left:36px}
.phase-summary textarea{min-height:110px}
.slider{margin-top:18px;padding-top:6px;border-top:1px solid var(--line)}
.slider input{width:100%;height:38px;accent-color:var(--lime-deep)}
.slider output{color:var(--green)}
.danger-zone{box-shadow:inset 0 0 0 2px #f3c9c4}
.danger-zone .button{margin-top:14px;width:100%}
.panel>.button{width:100%}

/* Partes del equipo de obra */
.pending-box{background:#fffaf0;box-shadow:inset 0 0 0 2px #f5d58a}
.reports,.team{margin:0;padding:0;list-style:none}
.report{padding:16px 0;border-top:1px solid var(--line)}
.report:first-child{border-top:0;padding-top:0}
.report-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px}
.report-head b{font-size:18px;font-weight:700}
.report-text{margin-top:6px;color:#2a3324;overflow-wrap:anywhere}
.report img{margin-top:12px;width:100%;max-height:340px;object-fit:cover;border-radius:14px}
.report-note{margin-top:10px;padding:10px 14px;border-radius:var(--radius-s);background:var(--amber-soft);color:var(--amber-ink);font-size:15.5px}
.report-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.report-actions .button{flex:1 1 140px}
.chip{display:inline-block;padding:4px 12px;border-radius:20px;background:var(--amber-soft);color:var(--amber-ink);font-size:13px;font-weight:700;white-space:nowrap}
.chip.approved{background:#dff3c2;color:#2a5a12}
.chip.rejected{background:var(--danger-soft);color:#7a1810}
.team li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;padding:12px 0;border-top:1px solid var(--line)}
.team li:first-child{border-top:0;padding-top:0}
.team b,.team small{display:block}
.team b{overflow-wrap:anywhere}
.team small{color:var(--muted);font-size:14.5px}
.team-actions{display:flex;gap:18px}
.profile{display:flex;align-items:center;gap:14px}
.profile b,.profile small{display:block}
.profile b{font-size:18px;overflow-wrap:anywhere}
.profile small{color:var(--muted);font-size:15px}

/* Acceso recién creado y WhatsApp */
.access-box{margin:14px 0;padding:14px 16px;border-radius:var(--radius-s);background:var(--sage);box-shadow:inset 0 0 0 2px #cfe6ac;flex-basis:100%}
.access-box p{margin-top:4px;overflow-wrap:anywhere}
.access-pass{font-size:21px;letter-spacing:.02em;user-select:all}
.welcome-text{white-space:pre-wrap;font-size:15px;color:var(--text)}
.update-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;margin-top:12px}
.whatsapp{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:10px 18px;border-radius:14px;background:#1fa855;color:#fff;font-size:16px;font-weight:700;text-decoration:none;box-shadow:0 2px 0 #157a3d}
.whatsapp:active{transform:translateY(2px);box-shadow:none}

/* Avisos */
#toast{position:fixed;left:50%;bottom:calc(var(--tab-h) + var(--safe-b) + 18px);z-index:40;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:12px 20px;border-radius:30px;background:var(--dark);color:#fff;font-size:15.5px;font-weight:700;box-shadow:0 10px 30px rgba(0,0,0,.3);text-align:center}
#install{position:fixed;left:12px;right:12px;bottom:calc(var(--tab-h) + var(--safe-b) + 14px);z-index:30;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 18px;max-width:560px;margin:0 auto;padding:14px 18px;border-radius:var(--radius);background:#fff;box-shadow:0 14px 40px rgba(0,0,0,.22)}
#install[hidden]{display:none}
#install p{flex:1 1 220px;font-size:15.5px}
#install div{display:flex;align-items:center;gap:16px}
#install .button{min-height:44px;padding:8px 18px}

@media(min-width:700px){
  .pair{grid-template-columns:1fr 1fr;gap:14px}
  .actions{grid-template-columns:1fr 1fr}
  .phase-state{display:block;width:92px;font-size:14px;color:var(--muted)}
  .is-current .phase-state{color:var(--green);font-weight:700}
  .panel{padding:24px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.phase-row .phase-name{font-size:16px;padding:10px 12px}

/* Categorías dentro de una etapa */
.group{margin-top:10px}
.group:first-of-type{margin-top:4px}
.group h3{margin:0;font-size:15px;font-weight:700;letter-spacing:.02em;color:var(--forest)}
.group ul{margin:2px 0 0;padding-left:20px;color:var(--text);font-size:16px}
.group li{padding:2px 0}
.condition{margin:0;border-top:1px solid var(--line)}
.condition:first-of-type{border-top:0}
.condition summary{width:100%;min-height:50px}
.phase-tools{display:flex;flex-wrap:wrap;gap:4px 22px}

/* Menú de vistas (esquina superior derecha) */
.topbar-title{flex:1;min-width:0}
.role-menu{position:relative;flex-shrink:0}
.role-menu summary{display:flex;align-items:center;gap:6px;min-height:40px;padding:0 12px 0 10px;border-radius:20px;background:rgba(255,255,255,.14);color:#fff;font-size:14.5px;font-weight:700;cursor:pointer;list-style:none;white-space:nowrap}
.role-menu summary::-webkit-details-marker{display:none}
.role-menu summary .icon{width:19px;height:19px}
.role-menu[open] summary{background:var(--lime);color:#10210a}
.role-list{position:absolute;right:0;top:calc(100% + 10px);z-index:30;width:min(300px,calc(100vw - 24px));padding:8px;border-radius:var(--radius);background:#fff;color:var(--ink);box-shadow:0 18px 50px rgba(14,31,13,.35)}
.role-list p{padding:8px 10px 4px;font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.role-list a{display:flex;align-items:center;gap:12px;min-height:60px;padding:8px 10px;border-radius:var(--radius-s);text-decoration:none}
.role-list a:active{background:var(--sage)}
.role-list a[aria-current]{background:#f0f8e2}
.role-list a>span:nth-child(2){flex:1;min-width:0}
.role-list b,.role-list small{display:block}
.role-list small{font-size:13.5px;color:var(--muted)}
.role-list a>.icon{color:var(--lime-deep);stroke-width:3}
.role-list .tile-icon{width:40px;height:40px;border-radius:12px}
.preview-note p{margin:0}
.preview-note select{margin-top:8px;min-height:46px;font-size:16px;background-color:#fff;border-color:#f5d58a}

/* Pasos de una obra */
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:14px;padding:6px;border-radius:var(--radius);background:#dfead0}
.step{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:58px;padding:6px 2px;border-radius:13px;color:var(--text);font-size:13.5px;font-weight:700;text-decoration:none;text-align:center}
.step b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#fff;color:var(--green);font-size:13px}
.step.is-active{background:#fff;color:var(--forest);box-shadow:var(--shadow)}
.step.is-active b{background:var(--lime);color:#10210a}
.step .badge{top:2px;right:6px;font-style:normal}
.step-help{margin:12px 4px 0;color:var(--muted);font-size:15.5px}

/* Mensajes por obra */
.steps{grid-template-columns:repeat(5,1fr);gap:4px}
.step{font-size:12.5px}
.has-chat{padding-bottom:calc(var(--tab-h) + var(--safe-b) + 96px)}
.chat-list{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none}
.msg{max-width:86%;padding:10px 14px;border-radius:18px;overflow-wrap:anywhere}
.msg p{white-space:pre-wrap}
.msg small{display:block;margin-top:4px;font-size:12.5px;opacity:.75}
.msg.theirs{align-self:flex-start;background:#eef3e6;border-bottom-left-radius:6px}
.msg.mine{align-self:flex-end;background:var(--forest);color:#fff;border-bottom-right-radius:6px}
.chat-form{position:fixed;left:0;right:0;bottom:calc(var(--tab-h) + var(--safe-b));z-index:18;display:flex;align-items:flex-end;gap:8px;padding:10px max(12px,calc((100vw - 620px)/2 + 12px));background:rgba(239,245,230,.96);border-top:1px solid var(--line);backdrop-filter:blur(10px)}
.chat-form textarea{flex:1;min-height:50px;max-height:140px;border-radius:25px;padding:12px 18px;background:#fff;resize:none}
.chat-form .button{width:52px;min-height:50px;padding:0;margin:0;border-radius:50%;flex-shrink:0}
.chat-form .button .icon{width:22px;height:22px}

/* WhatsApp como contacto destacado */
.whatsapp.big{display:flex;justify-content:center;width:100%;min-height:58px;margin-top:12px;font-size:18px;border-radius:16px;box-shadow:0 2px 0 #157a3d,0 10px 22px rgba(31,168,85,.3)}
.whatsapp.big .icon{width:26px;height:26px}
.contact-panel .actions{margin-top:10px}
.project-card em.chip{font-style:normal;margin-top:4px}

/* Estado del correo de bienvenida */
.mail-ok,.mail-off{display:flex;align-items:flex-start;gap:8px;margin-top:10px!important;padding:10px 12px;border-radius:var(--radius-s);font-size:15.5px;font-weight:600}
.mail-ok{background:#dff3c2;color:#2a5a12}
.mail-off{background:var(--amber-soft);color:var(--amber-ink)}
.mail-ok .icon,.mail-off .icon{width:20px;height:20px;margin-top:2px}
