/* ==========================================================================
   CYP · Portales (clientes y trabajadores) · se carga después de app.css
   ========================================================================== */

.portal { display: flex; flex-direction: column; min-height: calc(var(--vh) * 100); background: var(--cyp-bg); }

/* Header -------------------------------------------------------------------- */
.ph { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border); }
.ph__bar { max-width: 1280px; margin: 0 auto; height: 68px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.ph__brand { display: flex; align-items: center; gap: 14px; color: var(--text); flex: none; }
.ph__brand:hover { color: var(--text); }
.ph__brand img { width: auto; height: 40px; object-fit: contain; }
.ph__portal { padding-left: 14px; border-left: 1px solid var(--border); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.ph__nav { flex: 1; display: flex; align-items: stretch; gap: 2px; min-width: 0; height: 100%; overflow-x: auto; scrollbar-width: none; }
.ph__nav::-webkit-scrollbar { display: none; }
.ph__link {
    position: relative; display: inline-flex; align-items: center; padding: 0 12px;
    color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap;
    transition: color var(--dur) var(--ease);
}
.ph__link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: transparent; transition: background var(--dur) var(--ease); }
.ph__link:hover { color: var(--text); }
.ph__link.is-active { color: var(--text); font-weight: 600; }
.ph__link.is-active::after { background: var(--cyp-blue); }
.ph__user { flex: none; }
.ph__me {
    display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 8px 0 4px; border-radius: var(--radius-md);
    border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-2);
    transition: border-color var(--dur) var(--ease);
}
.ph__me:hover { border-color: var(--border); }
.ph__me .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.ph__who { display: flex; flex-direction: column; text-align: left; line-height: 1.2; max-width: 180px; }
.ph__who strong { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph__who small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph__user .dropdown__menu form { margin: 0; }
.ph__user .dropdown__item { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; font: inherit; }

/* Page ---------------------------------------------------------------------- */
.pp { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 24px 56px; }
.pf {
    max-width: 1280px; width: 100%; margin: 0 auto; padding: 18px 24px 28px;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    color: var(--text-3); font-size: 12.5px; border-top: 1px solid var(--border);
}
.pf a { color: var(--text-2); }

.p-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.p-head__eyebrow { font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.p-head__eyebrow .icon { display: none; }
.p-head .label-tech { margin-bottom: 6px; }
.p-head__title { font-size: 28px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.p-head__sub { margin-top: 6px; color: var(--text-2); font-size: 14.5px; max-width: 680px; }
.p-head__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.p-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.p-back .icon { width: 14px; height: 14px; }
.p-back:hover { color: var(--cyp-blue); }

.p-section { margin-top: 32px; }
.p-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.p-section__title { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.p-section__title .icon { display: none; }

/* Client home: greeting + textual band ------------------------------------- */
.p-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.p-intro__title { margin-top: 6px; font-size: 30px; font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
.p-intro__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.p-band { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 0; font-size: 14.5px; color: var(--text-2); }
.p-band > span { padding: 0 16px; border-left: 1px solid var(--border); }
.p-band > span:first-child { padding-left: 0; border-left: 0; }
.p-band strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.p-band .text-danger strong { color: var(--danger); }

/* Project list -------------------------------------------------------------- */
.p-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.p-projects--rows { grid-template-columns: 1fr; gap: 12px; }
.p-project {
    display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius-md);
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    transition: border-color var(--dur) var(--ease);
}
.p-project:hover { color: var(--text); border-color: var(--border-strong); }
.p-project__top { display: flex; gap: 12px; align-items: flex-start; }
.p-project__name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.p-project__meta { font-size: 12.5px; color: var(--text-2); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.p-project__meta span { display: inline-flex; align-items: center; gap: 5px; }
.p-project__meta .icon { display: none; }
.p-project__badge { margin-left: auto; }
.p-project__foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--border-2); padding-top: 12px; }

.p-project--row { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: 0; padding: 0; overflow: hidden; }
.p-project__photo { position: relative; background: var(--surface-3); min-height: 170px; }
.p-project__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.p-project__main { display: flex; flex-direction: column; gap: 10px; padding: 18px 22px; min-width: 0; }
.p-project__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.p-project__code { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-project__side { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 18px 22px; border-left: 1px solid var(--border-2); background: var(--surface-2); }
.p-project__facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.p-project__facts dt { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.p-project__facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 500; color: var(--text); }
.p-project__go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--cyp-blue-ink); }
.p-project__go .icon { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.p-project--row:hover .p-project__go .icon { transform: translateX(2px); }

/* Neutral tiles (legacy list markers) */
.p-tile { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.p-tile .icon { width: 17px; height: 17px; }
.p-tile--sm { width: 32px; height: 32px; }
.p-tile--sm .icon { width: 15px; height: 15px; }
.p-tile--pdf { color: var(--danger); }
.p-tile--warn { color: var(--warning); border-color: #E6D2AE; }
.p-tile--danger { color: var(--danger); border-color: #E3C3C3; }
.p-tile--ok { color: var(--success); border-color: #BFD8CB; }

/* Stage stepper ------------------------------------------------------------- */
.p-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.p-step { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.p-step::before { content: ""; height: 3px; background: var(--surface-3); }
.p-step.is-done { color: var(--text-2); }
.p-step.is-done::before { background: var(--cyp-navy); }
.p-step.is-current { color: var(--text); font-weight: 600; }
.p-step.is-current::before { background: var(--cyp-blue); }
.p-steps--lg .p-step { font-size: 13px; }
.p-steps--lg .p-step::before { height: 4px; }

.p-progress { display: flex; align-items: center; gap: 12px; }
.p-progress .progress { flex: 1; }
.p-progress strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* Project detail: photo hero + executive band ------------------------------ */
.p-cover { position: relative; height: 260px; border-radius: var(--radius-md) var(--radius-md) 0 0; overflow: hidden; background: var(--cyp-navy); }
.p-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 40, 59, .05) 30%, rgba(16, 40, 59, .78) 100%); }
.p-cover__body { position: absolute; left: 28px; right: 200px; bottom: 24px; z-index: 1; color: #fff; }
.p-cover__code { font-size: 12.5px; font-weight: 500; letter-spacing: .04em; opacity: .88; }
.p-cover__title { margin-top: 6px; font-size: 28px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.p-cover__stage { position: absolute; right: 24px; bottom: 26px; z-index: 1; padding: 6px 12px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .94); color: var(--cyp-navy); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

.p-exec { background: var(--surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); margin-bottom: 22px; }
.p-exec__band { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
.p-exec__item { display: flex; flex-direction: column; gap: 6px; padding: 16px 22px; min-width: 0; }
.p-exec__item + .p-exec__item { border-left: 1px solid var(--border-2); }
.p-exec__label { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.p-exec__value { font-size: 14px; font-weight: 600; line-height: 1.35; }
.p-exec__steps { padding: 16px 22px 18px; border-top: 1px solid var(--border-2); }

.p-detail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr); gap: 20px; align-items: start; }
.p-summary { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.p-sticky { position: sticky; top: 92px; }

/* Viewer -------------------------------------------------------------------- */
.p-viewer { position: relative; height: 560px; }
.p-viewer .mv-stage { height: 100%; min-height: 0; }
.p-viewer__bar { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.p-viewer__bar > * { pointer-events: auto; }
.p-viewer__title { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; background: rgba(255, 255, 255, .94); border: 1px solid var(--border); border-radius: var(--radius-md); }
.p-viewer__title strong { font-size: 14px; font-weight: 600; }
.p-viewer__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.p-viewer__tools .segmented { background: rgba(255, 255, 255, .94); border: 1px solid var(--border); padding: 3px; }
.p-viewer__tools .segmented button { height: 30px; }
.p-viewer__progress { position: absolute; left: 14px; bottom: 14px; z-index: 3; padding: 12px 14px; width: 230px; background: rgba(255, 255, 255, .94); border: 1px solid var(--border); border-radius: var(--radius-md); }
.p-viewer__progress .progress-label { margin-bottom: 8px; }
.p-viewer__note { position: absolute; right: 16px; bottom: 16px; z-index: 3; font-size: 11.5px; color: var(--text-2); }

/* Milestones ---------------------------------------------------------------- */
.p-timeline { display: flex; flex-direction: column; }
.p-tl { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: start; position: relative; padding-bottom: 14px; }
.p-tl:last-child { padding-bottom: 0; }
.p-tl::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 1px; background: var(--border); }
.p-tl:last-child::before { display: none; }
.p-tl.is-done::before { background: var(--cyp-navy); }
.p-tl__dot { width: 13px; height: 13px; margin-top: 4px; border-radius: 50%; background: #fff; border: 2px solid var(--border-strong); position: relative; z-index: 1; }
.p-tl.is-done .p-tl__dot { background: var(--cyp-navy); border-color: var(--cyp-navy); }
.p-tl.is-current .p-tl__dot { border-color: var(--cyp-blue); background: var(--cyp-blue); }
.p-tl__label { font-weight: 500; font-size: 13.5px; line-height: 21px; }
.p-tl.is-current .p-tl__label { font-weight: 600; }
.p-tl.is-pending .p-tl__label { color: var(--text-2); font-weight: 400; }
.p-tl__date { font-size: 12px; color: var(--text-3); line-height: 21px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.p-contact__name { font-weight: 600; font-size: 14.5px; }
.p-contact__role { font-size: 12.5px; color: var(--text-2); }
.p-contact__links { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 13px; }
.p-contact__links a { color: var(--cyp-blue-ink); }

/* Facts (worker task header) */
.p-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border: 1px solid var(--border-2); border-radius: var(--radius-md); }
.p-fact { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; min-width: 0; }
.p-fact + .p-fact { border-left: 1px solid var(--border-2); }
.p-fact__label { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.p-fact__value { font-size: 14px; font-weight: 600; line-height: 1.35; }

/* Activity feed (vertical timeline) ---------------------------------------- */
.p-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.p-feed__item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 18px; }
.p-feed__item:last-child { padding-bottom: 0; }
.p-feed__item::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 1px; background: var(--border); }
.p-feed__item:last-child::before { display: none; }
.p-feed__dot { width: 13px; height: 13px; margin-top: 3px; border-radius: 50%; background: #fff; border: 2px solid var(--cyp-blue); position: relative; z-index: 1; }
.p-feed__item:first-child .p-feed__dot { background: var(--cyp-blue); }
.p-feed__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.p-feed__title { font-weight: 600; font-size: 13.5px; }
.p-feed__date { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.p-feed__text { margin: 3px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.55; }

/* Editorial gallery + lightbox ---------------------------------------------- */
.p-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.p-gallery--editorial { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; grid-auto-flow: dense; }
.p-gallery--editorial .p-photo { aspect-ratio: auto; }
.p-gallery--editorial .p-photo:nth-child(6n + 1) { grid-column: span 2; grid-row: span 2; }
.p-gallery--editorial .p-photo:nth-child(6n + 4) { grid-column: span 2; }
.p-gallery--editorial.p-gallery--mini { grid-template-columns: 2fr 1fr; grid-auto-rows: 140px; }
.p-gallery--editorial.p-gallery--mini .p-photo:nth-child(1) { grid-column: 1; grid-row: span 2; }
.p-gallery--editorial.p-gallery--mini .p-photo:nth-child(n + 2) { grid-column: 2; grid-row: auto; }
.p-photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); }
.p-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity var(--dur) var(--ease); }
.p-photo:hover img { opacity: .9; }
.p-photo__date { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 11.5px; font-weight: 500; color: #fff; background: linear-gradient(180deg, transparent, rgba(16, 40, 59, .7)); }

.lightbox { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; position: fixed; inset: 0; width: auto; height: auto; margin: 0; }
.lightbox::backdrop { background: rgba(10, 22, 33, .9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__figure { margin: 0; max-width: min(1400px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox__figure img { max-width: 100%; max-height: calc(var(--vh) * 84); object-fit: contain; border-radius: var(--radius-sm); }
.lightbox__caption { color: rgba(255, 255, 255, .8); font-size: 13px; white-space: pre; }
.lightbox__btn { position: fixed; width: 44px; height: 44px; border-radius: var(--radius-md); border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: background var(--dur) var(--ease); }
.lightbox__btn:hover { background: rgba(255, 255, 255, .18); }
.lightbox__btn--close { top: 20px; right: 20px; }
.lightbox__btn--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 20px; top: 50%; transform: translateY(-50%); }

.p-pdf { height: calc(var(--vh) * 100 - 210px); min-height: 520px; }

/* Lists --------------------------------------------------------------------- */
.p-list { display: flex; flex-direction: column; }
.p-item { display: flex; align-items: center; gap: 14px; padding: 12px 18px; min-height: 52px; border-bottom: 1px solid var(--border-2); color: var(--text); }
.p-item:last-child { border-bottom: 0; }
a.p-item { transition: background var(--dur) var(--ease); }
a.p-item:hover { background: var(--surface-2); color: var(--text); }
.p-item__main { flex: 1; min-width: 0; }
.p-item__title { display: block; font-weight: 500; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.p-item__title:hover { color: var(--cyp-blue-ink); }
.p-item__meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 2px 0; }
.p-item__meta > span + span::before { content: "·"; margin: 0 7px; color: var(--text-3); }
.p-item__side { display: flex; align-items: center; gap: 8px; flex: none; }
.p-item__amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-list--compact .p-item { padding: 10px 18px; gap: 12px; }
.p-list--compact .p-item__side .btn--ghost { display: none; }

.p-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.p-pill {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; font-weight: 500;
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.p-pill:hover { color: var(--text); border-color: var(--border-strong); }
.p-pill.is-active { background: var(--cyp-navy); border-color: var(--cyp-navy); color: #fff; }

/* Requests (tickets) -------------------------------------------------------- */
.p-tickets { display: flex; flex-direction: column; }
.p-ticket { padding: 16px 18px; border-bottom: 1px solid var(--border-2); scroll-margin-top: 92px; }
.p-ticket:last-child { border-bottom: 0; }
.p-ticket:target { background: var(--surface-2); }
.p-ticket__head { display: flex; align-items: flex-start; gap: 14px; }
.p-ticket__no { flex: none; min-width: 48px; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.p-ticket--claim .p-ticket__no { color: var(--warning); }
.p-ticket .p-thread { margin: 12px 0 0 62px; }
.p-thread { display: flex; flex-direction: column; gap: 8px; }
.p-msg { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-2); font-size: 13.5px; white-space: pre-line; }
.p-msg--reply { background: var(--surface); border-color: var(--border-2); border-left: 3px solid var(--cyp-blue); }
.p-msg__who { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; white-space: normal; }

/* Quote document ------------------------------------------------------------ */
.q-doc { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 40px 44px; }
.q-doc__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--cyp-navy); }
.q-doc__brand { display: flex; gap: 16px; align-items: center; }
.q-doc__brand img { width: auto; height: 50px; }
.q-doc__brand strong { display: block; font-size: 14px; font-weight: 600; }
.q-doc__brand span { font-size: 12px; color: var(--text-2); }
.q-doc__num { text-align: right; }
.q-doc__num strong { display: block; font-size: 20px; font-weight: 600; }
.q-doc__num span { font-size: 12.5px; color: var(--text-2); }
.q-doc__parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 22px 0; }
.q-doc__label { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.q-doc .table-scroll { border-top: 1px solid var(--border); }
.q-doc .table th { background: var(--surface-2); }
.q-totals { margin-left: auto; width: min(340px, 100%); margin-top: 18px; display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; font-size: 13.5px; }
.q-totals dt { color: var(--text-2); }
.q-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.q-totals .is-total { font-size: 16px; font-weight: 600; color: var(--text); border-top: 1px solid var(--border); padding-top: 10px; }
.q-terms { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border-2); font-size: 13px; color: var(--text-2); white-space: pre-line; }

/* Worker: today ------------------------------------------------------------- */
.w-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }

.w-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.w-hello__greet { font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0; }
.w-hello__title { font-size: 28px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin: 4px 0 0; }
.w-hello__sub { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }

.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; font-weight: 600; border-radius: var(--radius-md); gap: 10px; }
.btn--lg .icon { width: 18px; height: 18px; }

.w-today { display: flex; flex-direction: column; }
.w-today__item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 18px; min-height: 60px; border-bottom: 1px solid var(--border-2); color: var(--text); transition: background var(--dur) var(--ease); }
.w-today__item:last-child { border-bottom: 0; }
.w-today__item:hover { background: var(--surface-2); color: var(--text); }
.w-today__time { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text); padding-right: 12px; border-right: 1px solid var(--border); }
.w-today__item.is-late .w-today__time { color: var(--danger); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.w-today__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w-today__main strong { font-size: 14.5px; font-weight: 600; }
.w-today__main span { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-next { display: flex; flex-direction: column; gap: 6px; font-size: 13px; align-items: flex-start; }
.w-next a { color: var(--text); }
.w-next a:hover { color: var(--cyp-blue-ink); }
.link-more { font-size: 13px; font-weight: 500; color: var(--cyp-blue-ink); }

/* Attendance (sober block) */
.w-clock { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--cyp-navy); border-radius: var(--radius-md); padding: 16px 18px 18px; }
.w-clock__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.w-clock__label { font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.w-clock__time { font-size: 28px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.w-clock__state { margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border-2); border-radius: var(--radius-sm); }
.w-clock__state > div { padding: 8px 12px; min-width: 0; }
.w-clock__state > div + div { border-left: 1px solid var(--border-2); }
.w-clock__state dt { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.w-clock__state dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-clock__form { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.w-clock__form .btn { width: 100%; height: 42px; }
.w-clock__done { margin-top: 14px; font-size: 13.5px; font-weight: 500; color: var(--success); }
.w-clock__link { display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.w-clock__link:hover { color: var(--cyp-blue-ink); }

/* Notices: industrial style with a side line */
.w-notice { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--cyp-navy); border-radius: var(--radius-sm); padding: 16px 20px; display: flex; gap: 14px; }
.w-notice--importante { border-left-color: var(--warning); }
.w-notice--critico { border-left-color: var(--danger); }
.w-notice__body { flex: 1; min-width: 0; }
.w-notice__kicker { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.w-notice--importante .w-notice__kicker { color: var(--warning); }
.w-notice--critico .w-notice__kicker { color: var(--danger); }
.w-notice__title { margin-top: 4px; font-weight: 600; font-size: 16px; line-height: 1.35; }
.w-notice__text { margin-top: 6px; color: var(--text-2); font-size: 14px; white-space: pre-line; }
.w-notice__foot { margin-top: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.w-notice.is-read { border-left-color: var(--border-strong); }
.w-notice.is-read .w-notice__kicker { color: var(--text-3); }

.w-site__code { font-size: 12px; font-weight: 500; color: var(--text-3); }
.w-site__name { font-size: 16px; font-weight: 600; line-height: 1.3; margin-top: 2px; }
.w-site__dl { margin-top: 12px; }
.w-site__meta { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.w-site__meta .icon { display: none; }

/* Tasks */
.w-task { display: flex; align-items: flex-start; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border-2); }
.w-task:last-child { border-bottom: 0; }
.w-task form { margin: 0; }
.w-task__box {
    width: 24px; height: 24px; border-radius: var(--radius-xs, 4px); border: 2px solid var(--border-strong); background: #fff; display: grid; place-items: center;
    cursor: pointer; color: transparent; margin-top: 1px; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.w-task__box:hover { border-color: var(--success); color: var(--success); }
.w-task__box .icon { width: 13px; height: 13px; stroke-width: 3; }
.w-task.is-done .w-task__box { background: var(--success); border-color: var(--success); color: #fff; }
.w-task__main { flex: 1; min-width: 0; }
.w-task__title { display: block; font-weight: 600; font-size: 14.5px; color: var(--text); }
a.w-task__title:hover { color: var(--cyp-blue-ink); }
.w-task.is-done .w-task__title { color: var(--text-3); text-decoration: line-through; }
.w-task__desc { font-size: 13px; color: var(--text-2); margin-top: 3px; white-space: pre-line; }
.w-task__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; }
.w-task__meta .badge .icon { display: none; }

.w-check { display: flex; flex-direction: column; }
.w-check__item { display: flex; align-items: center; gap: 12px; padding: 13px 18px; min-height: 52px; border-bottom: 1px solid var(--border-2); cursor: pointer; }
.w-check__item:last-child { border-bottom: 0; }
.w-check__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.w-check__box { width: 24px; height: 24px; flex: none; border-radius: 4px; border: 2px solid var(--border-strong); display: grid; place-items: center; color: transparent; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.w-check__box .icon { width: 13px; height: 13px; stroke-width: 3; }
.w-check__item input:checked + .w-check__box { background: var(--success); border-color: var(--success); color: #fff; }
.w-check__item input:checked ~ .w-check__label { color: var(--text-3); text-decoration: line-through; }
.w-check__item input:focus-visible + .w-check__box { box-shadow: 0 0 0 3px rgba(40, 120, 212, .25); }
.w-check__label { font-size: 14px; }

/* Progress report (single step) */
.w-report { max-width: 620px; display: flex; flex-direction: column; gap: 18px; }
.w-report__task { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--cyp-blue); }
.w-report__task div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w-report__task strong { font-size: 14.5px; font-weight: 600; }
.w-report__task span { font-size: 12.5px; color: var(--text-2); }
.w-report__alt { text-align: center; }

.w-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
    padding: 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; color: var(--text-2);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.w-drop:hover { border-color: var(--cyp-blue); background: var(--surface-2); }
.w-drop .icon { width: 24px; height: 24px; color: var(--text-2); }
.w-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.w-drop strong { color: var(--text); font-weight: 600; }
.w-drop--big { padding: 32px 22px; }
.w-drop--big .icon { width: 30px; height: 30px; }
.w-drop--big strong { font-size: 16px; }
.w-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.w-previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-2); }

.w-status { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.w-status legend { grid-column: 1 / -1; margin-bottom: 6px; }
.w-status__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.w-status__opt span {
    display: flex; align-items: center; justify-content: center; height: 46px; padding: 0 8px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border-strong); margin-left: -1px; font-size: 14px; font-weight: 500; color: var(--text-2);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.w-status__opt:first-of-type span { border-radius: var(--radius-md) 0 0 var(--radius-md); margin-left: 0; }
.w-status__opt:last-of-type span { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.w-status__opt span .icon { display: none; }
.w-status__opt input:checked + span { position: relative; z-index: 1; border-color: var(--cyp-navy); background: var(--cyp-navy); color: #fff; font-weight: 600; }
.w-status__opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(40, 120, 212, .3); }

.w-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.w-photo { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); }
.w-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--dur) var(--ease); }
.w-photo:hover img { opacity: .9; }

.w-items { display: flex; flex-direction: column; gap: 8px; }
.w-items__row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px 36px; gap: 8px; align-items: center; }
.w-items__head { font-size: 12px; font-weight: 500; color: var(--text-2); }

.w-day { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; min-height: 50px; border-bottom: 1px solid var(--border-2); font-size: 13.5px; }
.w-day:last-child { border-bottom: 0; }
.w-day__date { font-weight: 500; }
.w-day__date::first-letter { text-transform: uppercase; }
.w-day__hours { font-variant-numeric: tabular-nums; color: var(--text-2); display: inline-flex; gap: 8px; align-items: center; }

/* Login (50/50) ------------------------------------------------------------- */
.pl { min-height: calc(var(--vh) * 100); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); }
.pl__panel { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(28px, 7vw, 112px); }
.pl__brand { display: inline-flex; margin-bottom: 56px; }
.pl__brand img { width: auto; height: 56px; }
.pl__card { width: min(400px, 100%); }
.pl__eyebrow { font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.pl__title { margin-top: 8px; font-size: 28px; font-weight: 600; letter-spacing: -.015em; }
.pl__text { margin-top: 6px; color: var(--text-2); font-size: 14px; margin-bottom: 26px; }
.pl__submit { height: 42px; font-size: 14.5px; margin-top: 6px; }
.pl__help { margin-top: 18px; font-size: 12.5px; color: var(--text-2); }
.pl__switch { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border-2); width: min(400px, 100%); display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; }
.pl__switch a { color: var(--text-2); }
.pl__switch a:hover { color: var(--cyp-blue-ink); }
.pl__visual { position: relative; overflow: hidden; background: var(--cyp-navy); }
.pl__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 40, 59, .08) 40%, rgba(16, 40, 59, .78) 100%); }
.pl__caption { position: absolute; left: 44px; right: 44px; bottom: 40px; z-index: 1; margin: 0; color: #fff; font-size: clamp(20px, 2vw, 26px); font-weight: 500; line-height: 1.3; max-width: 520px; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1100px) {
    .ph__who { display: none; }
    .ph__bar { gap: 18px; }
    .ph__portal { display: none; }
    .p-detail, .w-grid { grid-template-columns: 1fr; }
    .p-project--row { grid-template-columns: 200px minmax(0, 1fr); }
    .p-project--row .p-project__side { grid-column: 1 / -1; flex-direction: row; align-items: center; border-left: 0; border-top: 1px solid var(--border-2); padding: 12px 22px; }
    .p-project--row .p-project__facts { flex-direction: row; flex-wrap: wrap; gap: 6px 26px; }
    .p-sticky { position: static; }
}
@media (max-width: 860px) {
    .pl { grid-template-columns: 1fr; }
    .pl__visual { display: none; }
    .p-exec__band { grid-template-columns: 1fr 1fr; }
    .p-exec__item:nth-child(3) { border-left: 0; }
    .p-exec__item:nth-child(n + 3) { border-top: 1px solid var(--border-2); }
    .p-gallery--editorial { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
    .q-doc { padding: 22px; }
    .q-doc__parties { grid-template-columns: 1fr; }
    .p-facts { grid-template-columns: 1fr 1fr; }
    .p-fact:nth-child(3) { border-left: 0; }
    .p-fact:nth-child(n + 3) { border-top: 1px solid var(--border-2); }
    .p-cover { height: 230px; }
    .p-cover__body { right: 24px; bottom: 56px; left: 20px; }
    .p-cover__stage { left: 20px; right: auto; bottom: 20px; }
}
@media (max-width: 720px) {
    .ph__bar { height: auto; flex-wrap: wrap; padding: 10px 14px 0; gap: 4px 12px; }
    .ph__brand { order: 1; padding: 2px 0 6px; }
    .ph__brand img { height: 34px; }
    .ph__user { order: 2; margin-left: auto; }
    .ph__nav { order: 3; flex-basis: calc(100% + 28px); margin: 0 -14px; padding: 0 6px; height: 44px; border-top: 1px solid var(--border-2); }
    .ph__link { font-size: 13.5px; padding: 0 10px; }
    .ph__link::after { left: 10px; right: 10px; }
    .pp { padding: 18px 14px 40px; }
    .pf { padding: 16px 14px 24px; }
    .p-head__title, .w-hello__title { font-size: 24px; }
    .p-intro__title { font-size: 25px; }
    .p-intro__actions { width: 100%; }
    .p-intro__actions .btn { flex: 1; }
    .p-band { flex-direction: column; gap: 4px; }
    .p-band > span { padding: 0; border-left: 0; }
    .p-projects { grid-template-columns: 1fr; }
    .p-project--row { grid-template-columns: 1fr; }
    .p-project__photo { min-height: 0; aspect-ratio: 16 / 8; }
    .p-project--row .p-project__main { padding: 14px 16px; }
    .p-project--row .p-project__side { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
    .p-cover { height: 220px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
    .p-cover::after { background: linear-gradient(180deg, rgba(16, 40, 59, .15) 0%, rgba(16, 40, 59, .86) 70%); }
    .p-cover__code { opacity: 1; }
    .p-cover__title { font-size: 22px; }
    .p-exec__band { grid-template-columns: 1fr; }
    .p-exec__item + .p-exec__item { border-left: 0; border-top: 1px solid var(--border-2); }
    .p-exec__item { padding: 12px 16px; }
    .p-exec__steps { padding: 14px 16px; }
    .p-steps--lg .p-step { font-size: 11.5px; }
    .p-viewer { height: 440px; }
    .p-viewer__progress, .p-viewer__title { display: none; }
    .p-viewer__note { left: 14px; }
    .p-gallery--editorial, .p-gallery--editorial.p-gallery--mini { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 120px; }
    .p-gallery--editorial .p-photo:nth-child(6n + 4) { grid-column: span 1; }
    .p-gallery--editorial.p-gallery--mini .p-photo:nth-child(1) { grid-column: 1 / -1; grid-row: span 2; }
    .p-gallery--editorial.p-gallery--mini .p-photo:nth-child(n + 2) { grid-column: auto; }
    .p-ticket .p-thread { margin-left: 0; }
    .w-hello__cta { width: 100%; }
    .w-today__item { grid-template-columns: 56px minmax(0, 1fr); padding: 12px 14px; }
    .w-today__item .badge { display: none; }
    .p-facts { grid-template-columns: 1fr; }
    .p-fact + .p-fact { border-left: 0; border-top: 1px solid var(--border-2); }
    .w-items__row { grid-template-columns: minmax(0, 1fr) 80px 80px 32px; }
    .w-day { grid-template-columns: 1fr auto; }
    .w-day__project { grid-column: 1 / -1; order: 3; }
    .p-item { padding: 12px 14px; }
    .p-item__side .btn span { display: none; }
    .lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: 20px; transform: none; }
}

@media print {
    .ph, .pf, .p-head__actions, .p-back, .flash, .toast-region, .pvbar { display: none !important; }
    .portal { background: #fff; }
    .pp { padding: 0; max-width: none; }
    .q-doc { border: 0; padding: 0; }
}
