.ues-app { --ues-wine: #651d32; --ues-gold: #a8833a; color: #252b35; max-width: 1440px; margin: 0 auto 2rem; }
.ues-app .ues-header { display: flex; gap: 1rem; align-items: center; padding: 1.4rem 1.6rem; background: #651d32; border-radius: 14px 14px 0 0; color: #fff; }
.ues-app .ues-brandmark { border: 1px solid #d7b875; color: #f4dca7; width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; flex-shrink: 0; }
.ues-app .ues-eyebrow { color: #f4dca7; letter-spacing: .16em; font-size: .69rem; font-weight: 700; }
.ues-app .ues-header h2 { font-size: 1.35rem; margin: .1rem 0; color: #fff; }
.ues-app .ues-header p { margin: 0; opacity: .88; font-size: .83rem; }
.ues-app .ues-nav { display: flex; flex-wrap: wrap; gap: .3rem; background: #f7f4f2; border: 1px solid #e8e1df; padding: .55rem .8rem; border-radius: 0 0 12px 12px; margin-bottom: 1.5rem; }
.ues-app .ues-navlink { border-radius: 7px; padding: .6rem .95rem; color: #4f4650; font-size: .9rem; text-decoration: none; }
.ues-app .ues-navlink.is-active { background: #fff; color: #651d32; font-weight: 700; box-shadow: 0 1px 4px #00000012; }
.ues-app .ues-navlink:hover { background: #eee5e8; }
.ues-app a:focus-visible, .ues-app button:focus-visible, .ues-app input:focus-visible { outline: 3px solid #a8833a; outline-offset: 3px; }
.ues-app .ues-titlebar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0; }
.ues-app .ues-titlebar h3 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .35rem; }
.ues-app .ues-titlebar p { font-size: .9rem; color: #656b75; margin: 0; }
.ues-app .ues-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.ues-app .ues-metric { padding: 1rem 1.2rem; border: 1px solid #e1e5ea; border-radius: 12px; background: #fff; border-top: 3px solid #a8833a; }
.ues-app .ues-metric span, .ues-app .ues-metric small { display: block; font-size: .85rem; color: #606775; }
.ues-app .ues-metric strong { font-size: 2rem; color: #651d32; line-height: 1.65; }
.ues-app .ues-panel { border: 1px solid #e1e5ea; background: #fff; border-radius: 12px; padding: 1.2rem; margin-bottom: 1.2rem; }
.ues-app .ues-panel h4 { font-size: 1.02rem; margin: 0 0 1rem; font-weight: 700; }
.ues-app .ues-actiongrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.ues-app .ues-action { color: #3c3340; border: 1px solid #e8e1df; padding: 1rem; border-radius: 10px; text-decoration: none; display: grid; gap: .4rem; }
.ues-app .ues-action strong { color: #651d32; font-size: .95rem; }
.ues-app .ues-action span { font-size: .83rem; color: #636874; }
.ues-app .ues-action:hover { background: #faf6f4; border-color: #a8833a; }
.ues-app .ues-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin-bottom: 1rem; }
.ues-app .ues-search { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; flex: 1; }
.ues-app .ues-search input { min-width: 190px; max-width: 400px; }
.ues-app .ues-tablewrap { overflow-x: auto; border: 1px solid #e1e5ea; border-radius: 10px; }
.ues-app .ues-tablewrap table { margin: 0; font-size: .87rem; }
.ues-app .ues-tablewrap th { background: #f7f4f2; white-space: nowrap; }
.ues-app .ues-reference { font-size: .75rem; color: #6b5961; display: block; margin-top: .2rem; }
.ues-app .ues-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 2rem; margin: 0; }
.ues-app .ues-details dt { font-size: .77rem; text-transform: uppercase; letter-spacing: .04em; color: #6d6872; }
.ues-app .ues-details dd { overflow-wrap: anywhere; margin: .2rem 0 0; font-size: .95rem; }
.ues-app .ues-empty { text-align: center; padding: 2.5rem 1rem; color: #68626c; }
.ues-app .ues-empty h4 { color: #651d32; margin-bottom: .5rem; }
.ues-app .ues-hint { background: #faf7ef; border-left: 3px solid #a8833a; border-radius: 5px; padding: .8rem 1rem; font-size: .87rem; color: #5b503b; margin: 1rem 0; }
.ues-app .btn-primary { background-color: #651d32; border-color: #651d32; color: #fff; }
.ues-app .btn-primary:hover { background-color: #4f1426; border-color: #4f1426; }
.ues-app .ues-danger { margin-top: 1.5rem; border-top: 1px solid #e8e1df; padding-top: 1rem; }
.ues-app.ues-public { max-width: 880px; margin: 2rem auto; padding: 0 1rem; }
.ues-public #fitem_id_website { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 767px) {
    .ues-app .ues-header { padding: 1rem; gap: .75rem; }
    .ues-app .ues-header h2 { font-size: 1.1rem; }
    .ues-app .ues-brandmark { width: 44px; height: 44px; }
    .ues-app .ues-metrics, .ues-app .ues-actiongrid, .ues-app .ues-details { grid-template-columns: 1fr; }
    .ues-app .ues-nav { gap: .15rem; padding: .4rem; }
    .ues-app .ues-navlink { padding: .5rem .6rem; font-size: .83rem; }
    .ues-app .ues-metric { padding: .75rem 1rem; }
    .ues-app .ues-metric strong { font-size: 1.6rem; }
}
.ues-app .ues-curriculum-filter select { max-width: 100%; min-width: 0; }
.ues-app #ues-plan-filter { flex: 1 1 360px; }
.ues-app .ues-curriculum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ues-app .ues-curriculum-period { padding: 0; overflow: hidden; margin-bottom: 0; }
.ues-app .ues-curriculum-period h5 { background: #651d32; color: #fff; padding: .8rem 1rem; font-size: 1rem; margin: 0; }
.ues-app .ues-subject-list { list-style: none; margin: 0; padding: .5rem 1rem; }
.ues-app .ues-subject-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem 0; border-bottom: 1px solid #e5e7eb; }
.ues-app .ues-subject-list li:last-child { border-bottom: 0; }
.ues-app .ues-subject-number { background: #a8833a; color: #fff; min-width: 1.8rem; text-align: center; border-radius: .25rem; padding: .1rem; font-size: .8rem; }
.ues-app .ues-subject-name { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.ues-app .ues-subject-name a { color: #4c1c2c; }
.ues-app .ues-subject-name small { display: block; color: #68626c; font-size: .72rem; margin-top: .2rem; }
@media (max-width: 1000px) { .ues-app .ues-curriculum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ues-app .ues-curriculum-grid { grid-template-columns: 1fr; } }

/* ===== 0.4.0 · Public pages: registration wizard, tracking and recovery ===== */
body.ues-public-body { background: #f6f1ec; }
body.ues-public-body #page, body.ues-public-body #page-wrapper, body.ues-public-body .pagelayout-embedded { background: transparent; }
.ues-pub {
    --w: #651d32; --w-deep: #3f0f1f; --w-soft: #f6eef1; --g: #d9962b; --g-soft: #fbf2e2; --ink: #2b2530;
    --muted: #6f6773; --line: #e7dfdb; --ok: #1e6b3a; --ok-soft: #e8f5ec; --bad: #a1202b; --bad-soft: #fbe9ea;
    --warn: #8a5a00; --warn-soft: #fff4e0; --radius: 18px;
    color: var(--ink); min-height: 100vh; padding-bottom: 3rem;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(217, 150, 43, .14), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(101, 29, 50, .10), transparent 60%),
        #f6f1ec;
    font-size: 16px; line-height: 1.5;
}
.ues-pub *, .ues-pub *::before, .ues-pub *::after { box-sizing: border-box; }
.ues-hero {
    position: relative; overflow: hidden; color: #fff; padding: 2.4rem 1.25rem 5.5rem;
    background: linear-gradient(135deg, #7a2440 0%, #651d32 45%, #3f0f1f 100%);
}
.ues-hero-pattern {
    position: absolute; inset: 0; opacity: .13; pointer-events: none;
    background-image:
        radial-gradient(circle at 20px 20px, transparent 9px, #f3d9a4 10px, transparent 11px),
        linear-gradient(45deg, transparent 47%, #f3d9a4 48%, #f3d9a4 52%, transparent 53%),
        linear-gradient(-45deg, transparent 47%, #f3d9a4 48%, #f3d9a4 52%, transparent 53%);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 95%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 95%);
}
.ues-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, transparent, var(--g), transparent); }
.ues-hero-inner { position: relative; max-width: 980px; margin: 0 auto; }
.ues-hero-logo { display: block; width: 220px; max-width: 62vw; height: auto; margin-bottom: 1.6rem; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.ues-hero-eyebrow { margin: 0 0 .35rem; color: #f3d9a4; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.ues-hero-title { margin: 0; color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.ues-hero-subtitle { margin: .55rem 0 0; color: rgba(255, 255, 255, .86); font-size: 1.05rem; max-width: 46rem; }
.ues-hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.2rem 0 0; }
.ues-chip { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff; padding: .35rem .85rem; border-radius: 999px; font-size: .85rem; backdrop-filter: blur(4px); }
.ues-chip.is-accent { background: var(--g); border-color: var(--g); color: #2d1a00; font-weight: 700; }
.ues-shell { position: relative; max-width: 760px; margin: -3.8rem auto 0; padding: 0 1rem; }
.ues-shell.is-wide { max-width: 980px; }
.ues-card { background: #fff; border-radius: var(--radius); box-shadow: 0 18px 50px rgba(63, 15, 31, .12), 0 2px 6px rgba(63, 15, 31, .06); padding: clamp(1.25rem, 3.5vw, 2.5rem); }
.ues-pubfoot { text-align: center; color: var(--muted); font-size: .82rem; margin: 1.5rem 0 0; }
.ues-instructions { background: var(--g-soft); border: 1px solid #f0dcb4; border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1.6rem; color: #5a4220; font-size: .95rem; }
.ues-instructions strong { display: block; color: #3d2a0c; margin-bottom: .25rem; }
.ues-empty-state { text-align: center; padding: 2rem 0; color: var(--muted); }

/* Stepper */
.ues-stepper { display: none; margin-bottom: 1.8rem; }
.ues-reg.is-enhanced .ues-stepper { display: block; }
.ues-progress { height: 6px; background: #f0e8e4; border-radius: 99px; overflow: hidden; margin-bottom: 1rem; }
.ues-progress-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--w), var(--g)); border-radius: 99px; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.ues-steps { display: flex; justify-content: space-between; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.ues-stepitem { flex: 1 1 0; min-width: 0; }
.ues-stepbtn { display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 100%; border: 0; background: none; padding: .2rem; color: var(--muted); cursor: pointer; font: inherit; }
.ues-stepbtn:disabled { cursor: default; opacity: .65; }
.ues-stepnum { position: relative; width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); background: #fff; font-weight: 700; font-size: .95rem; transition: all .25s; }
.ues-stepnum-ok { display: none; }
.ues-steplabel { font-size: .8rem; font-weight: 600; text-align: center; line-height: 1.2; }
.ues-stepitem.is-current .ues-stepnum { border-color: var(--w); background: var(--w); color: #fff; box-shadow: 0 0 0 5px rgba(101, 29, 50, .12); }
.ues-stepitem.is-current .ues-steplabel { color: var(--w); }
.ues-stepitem.is-done .ues-stepnum { border-color: var(--g); background: var(--g); color: #fff; }
.ues-stepitem.is-done .ues-stepnum-n { display: none; }
.ues-stepitem.is-done .ues-stepnum-ok { display: block; }
.ues-stepitem.has-error .ues-stepnum { border-color: var(--bad); color: var(--bad); }
.ues-stepitem.has-error.is-current .ues-stepnum { background: var(--bad); color: #fff; }

/* Steps */
.ues-step { animation: ues-fade .35s ease both; }
.ues-reg:not(.is-enhanced) .ues-step + .ues-step { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px dashed var(--line); }
.ues-reg:not(.is-enhanced) [data-next], .ues-reg:not(.is-enhanced) [data-prev] { display: none; }
@keyframes ues-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ues-stephead { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.ues-stepicon { flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; background: var(--w-soft); color: var(--w); }
.ues-stepicon svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ues-stepcount { margin: 0; color: var(--g); font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.ues-steptitle { margin: .1rem 0 .2rem; font-size: 1.45rem; font-weight: 800; color: var(--ink); outline: none; }
.ues-stepintro { margin: 0; color: var(--muted); }
.ues-subtitle { font-size: 1.05rem; font-weight: 700; color: var(--w); margin: 0 0 .8rem; }

/* Fields */
.ues-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.1rem 1.1rem; }
.ues-col-full { grid-column: span 6; }
.ues-col-half { grid-column: span 3; }
.ues-col-third { grid-column: span 2; }
.ues-field.is-hidden { display: none; }
.ues-field { min-width: 0; }
.ues-label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 .4rem; color: var(--ink); padding: 0; float: none; width: auto; }
.ues-req { color: var(--bad); }
.ues-opt { color: var(--muted); font-weight: 400; font-size: .8rem; }
.ues-pub .ues-input {
    display: block; width: 100%; min-height: 3rem; padding: .7rem .95rem; font: inherit; font-size: 1rem; color: var(--ink);
    background: #fdfbfa; border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s, background .2s;
    appearance: none; -webkit-appearance: none;
}
.ues-pub .ues-input:hover { border-color: #d6c9c4; }
.ues-pub .ues-input:focus { outline: none; border-color: var(--w); background: #fff; box-shadow: 0 0 0 4px rgba(101, 29, 50, .12); }
.ues-pub .ues-input::placeholder { color: #b3a9ad; }
.ues-pub .ues-input.is-upper { text-transform: uppercase; letter-spacing: .04em; }
.ues-pub .ues-textarea { min-height: 6rem; resize: vertical; line-height: 1.55; }
.ues-selectwrap { position: relative; }
.ues-selectwrap::after { content: ""; position: absolute; right: 1rem; top: 50%; width: .55rem; height: .55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.ues-pub .ues-select { padding-right: 2.5rem; cursor: pointer; }
.ues-field.has-error .ues-input { border-color: var(--bad); background: #fffafa; }
.ues-field.has-error .ues-input:focus { box-shadow: 0 0 0 4px rgba(161, 32, 43, .12); }
.ues-hintline { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.ues-hintline:empty, .ues-error:empty { display: none; }
.ues-error { color: var(--bad); font-size: .84rem; font-weight: 600; margin-top: .35rem; }
.ues-counter { text-align: right; font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.ues-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.ues-choice legend { font-size: .92rem; }
.ues-pills { display: inline-flex; gap: .5rem; flex-wrap: wrap; }
.ues-pill-input, .ues-card-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ues-pill { margin: 0; padding: .6rem 1.4rem; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; background: #fdfbfa; transition: all .2s; min-width: 5rem; text-align: center; }
.ues-pill:hover { border-color: var(--w); }
.ues-pill-input:checked + .ues-pill { background: var(--w); border-color: var(--w); color: #fff; box-shadow: 0 6px 14px rgba(101, 29, 50, .22); }
.ues-pill-input:focus-visible + .ues-pill, .ues-card-input:focus-visible + .ues-optcard { outline: 3px solid var(--g); outline-offset: 2px; }
.ues-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.ues-optcard { position: relative; display: flex; flex-direction: column; gap: .3rem; margin: 0; padding: 1rem 1rem 1rem 2.9rem; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: #fdfbfa; transition: all .2s; height: 100%; }
.ues-optcard:hover { border-color: #cdb8be; transform: translateY(-1px); }
.ues-optcard-dot { position: absolute; left: 1rem; top: 1.1rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 2px solid #c9bcc0; background: #fff; transition: all .2s; }
.ues-optcard-title { font-weight: 700; }
.ues-optcard-desc { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.ues-card-input:checked + .ues-optcard { border-color: var(--w); background: var(--w-soft); box-shadow: 0 6px 16px rgba(101, 29, 50, .10); }
.ues-card-input:checked + .ues-optcard .ues-optcard-dot { border-color: var(--w); background: var(--w); box-shadow: inset 0 0 0 3px #fff; }
.ues-range { display: flex; align-items: center; gap: 1rem; padding: .5rem 0; }
.ues-range-input { --fill: 50%; flex: 1; height: 8px; border-radius: 99px; appearance: none; -webkit-appearance: none; cursor: pointer;
    background: linear-gradient(90deg, var(--w) 0, var(--g) var(--fill), #eadfdb var(--fill)); }
.ues-range-input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--w); box-shadow: 0 2px 8px rgba(63, 15, 31, .25); }
.ues-range-input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--w); box-shadow: 0 2px 8px rgba(63, 15, 31, .25); }
.ues-range-input:focus-visible { outline: 3px solid var(--g); outline-offset: 6px; }
.ues-range-value { min-width: 4.5rem; text-align: center; font-size: 1.4rem; font-weight: 800; color: var(--w); background: var(--w-soft); border-radius: 12px; padding: .3rem .6rem; }

/* Confirmation step */
.ues-summary { background: #fcfaf8; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; margin-bottom: 1.4rem; }
.ues-summary-group + .ues-summary-group { border-top: 1px solid var(--line); margin-top: .9rem; padding-top: .9rem; }
.ues-summary-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.ues-summary dl { display: grid; grid-template-columns: minmax(8rem, 38%) 1fr; gap: .3rem 1rem; margin: 0; font-size: .9rem; }
.ues-summary dt { color: var(--muted); font-weight: 500; }
.ues-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.ues-linkbtn { border: 0; background: none; color: var(--w); font-weight: 700; font-size: .85rem; cursor: pointer; padding: .2rem .4rem; border-radius: 6px; }
.ues-linkbtn:hover { background: var(--w-soft); }
.ues-privacy-text { max-height: 14rem; overflow: auto; white-space: pre-line; background: #fcfaf8; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; font-size: .88rem; color: #4a4250; margin-bottom: 1rem; }
.ues-privacy-text:focus { outline: 3px solid var(--g); outline-offset: 2px; }
.ues-check { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; font-weight: 600; margin: 0; }
.ues-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ues-checkbox { flex: 0 0 auto; width: 1.45rem; height: 1.45rem; border: 2px solid #c9bcc0; border-radius: 7px; background: #fff; margin-top: .05rem; transition: all .2s; position: relative; }
.ues-check input:checked + .ues-checkbox { background: var(--w); border-color: var(--w); }
.ues-check input:checked + .ues-checkbox::after { content: ""; position: absolute; left: .42rem; top: .16rem; width: .4rem; height: .75rem; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.ues-check input:focus-visible + .ues-checkbox { outline: 3px solid var(--g); outline-offset: 2px; }

/* Buttons and navigation */
.ues-stepnav { display: flex; align-items: center; gap: .75rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.ues-stepnav-spacer { flex: 1; }
.ues-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.6rem; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; border: 1.5px solid transparent; transition: all .2s; text-decoration: none; }
.ues-btn-primary { background: linear-gradient(135deg, #7a2440, #651d32); color: #fff; box-shadow: 0 8px 20px rgba(101, 29, 50, .28); }
.ues-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(101, 29, 50, .32); color: #fff; }
.ues-btn-primary:disabled { opacity: .75; transform: none; cursor: wait; }
.ues-btn-ghost { background: #fff; color: var(--w); border-color: var(--line); }
.ues-btn-ghost:hover { border-color: var(--w); background: var(--w-soft); color: var(--w); }
.ues-btn-small { min-height: 2.2rem; padding: .35rem 1rem; font-size: .85rem; }
.ues-btn:focus-visible { outline: 3px solid var(--g); outline-offset: 3px; }
.ues-spinner { display: none; width: 1.1rem; height: 1.1rem; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: ues-spin .8s linear infinite; }
.ues-btn.is-loading .ues-spinner { display: inline-block; }
@keyframes ues-spin { to { transform: rotate(360deg); } }
.ues-alert { display: flex; flex-direction: column; gap: .2rem; background: var(--bad-soft); border: 1px solid #f2c5c8; color: var(--bad); border-radius: 14px; padding: .9rem 1.1rem; margin-bottom: 1.4rem; outline: none; }
.ues-secure { display: flex; align-items: center; justify-content: center; gap: .45rem; color: var(--muted); font-size: .82rem; margin: 1.6rem 0 0; }
.ues-secure svg, .ues-done-mail svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ues-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Completion */
.ues-done { text-align: center; padding: .5rem 0; }
.ues-done-icon svg { width: 76px; height: 76px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ues-done-icon circle { stroke: var(--ok); stroke-width: 2.5; fill: var(--ok-soft); }
.ues-done-icon path { stroke: var(--ok); stroke-width: 3.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: ues-draw .6s .2s ease forwards; }
@keyframes ues-draw { to { stroke-dashoffset: 0; } }
.ues-done-title { font-size: 1.8rem; font-weight: 800; margin: .8rem 0 .3rem; outline: none; }
.ues-done-lead { color: var(--muted); margin: 0 auto 1.4rem; max-width: 34rem; }
.ues-folio { display: inline-flex; flex-direction: column; align-items: center; gap: .3rem; background: linear-gradient(135deg, var(--w-soft), var(--g-soft)); border: 1px dashed #d8b98a; border-radius: 16px; padding: 1rem 2rem; margin-bottom: 1rem; }
.ues-folio-label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ues-folio-value { font-size: 1.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--w); letter-spacing: .03em; }
.ues-done-mail { display: flex; justify-content: center; align-items: center; gap: .5rem; color: var(--muted); margin-bottom: 1.8rem; }
.ues-done .ues-subtitle { text-align: left; }
.ues-timeline { list-style: none; margin: 0 0 1.4rem; padding: 0; text-align: left; counter-reset: ues; }
.ues-timeline li { position: relative; padding: 0 0 1.1rem 2.6rem; counter-increment: ues; }
.ues-timeline li::before { content: counter(ues); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; background: #fff; border: 2px solid var(--line); color: var(--muted); }
.ues-timeline li::after { content: ""; position: absolute; left: .85rem; top: 1.9rem; bottom: .1rem; width: 2px; background: var(--line); }
.ues-timeline li:last-child::after { display: none; }
.ues-timeline li.is-done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.ues-timeline li.is-current::before { background: var(--w); border-color: var(--w); color: #fff; box-shadow: 0 0 0 4px rgba(101, 29, 50, .12); }
.ues-timeline li.is-stopped::before { content: "✕"; background: var(--bad); border-color: var(--bad); color: #fff; }
.ues-timeline strong { display: block; }
.ues-timeline span { display: block; color: var(--muted); font-size: .9rem; }
.ues-done-note { font-size: .85rem; color: var(--muted); background: #fcfaf8; border-radius: 12px; padding: .9rem 1rem; text-align: left; }
.ues-done-actions { margin-top: 1.2rem; }

/* Tracking */
.ues-track-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.6rem; }
.ues-track-head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.ues-track-head p { margin: .2rem 0 0; color: var(--muted); }
.ues-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.ues-badge::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.ues-tone-success { background: var(--ok-soft); color: var(--ok); }
.ues-tone-danger { background: var(--bad-soft); color: var(--bad); }
.ues-tone-warning { background: var(--warn-soft); color: var(--warn); }
.ues-tone-info { background: var(--w-soft); color: var(--w); }
.ues-tone-muted { background: #f1eeee; color: var(--muted); }
.ues-result { border-radius: 16px; padding: 1.2rem 1.3rem; margin: 0 0 1.4rem; }
.ues-result h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: inherit; }
.ues-result p { margin: .3rem 0 0; color: var(--ink); white-space: pre-line; }
.ues-result .ues-result-big { font-size: 1.6rem; font-weight: 800; }
.ues-confirmbox { text-align: center; padding: 1rem 0; }
.ues-confirmbox p { color: var(--muted); max-width: 32rem; margin: 0 auto 1.2rem; }
.ues-publinks { text-align: center; margin-top: 1.4rem; font-size: .9rem; }
.ues-publinks a { color: var(--w); font-weight: 600; }
.ues-pubform { max-width: 26rem; margin: 0 auto; display: grid; gap: 1rem; }

@media (max-width: 767px) {
    .ues-hero { padding: 1.6rem 1rem 4.8rem; }
    .ues-hero-logo { width: 170px; margin-bottom: 1.1rem; }
    .ues-grid { grid-template-columns: 1fr; }
    .ues-col-full, .ues-col-half, .ues-col-third { grid-column: auto; }
    .ues-steplabel { display: none; }
    .ues-stepitem.is-current .ues-steplabel { display: block; position: absolute; left: 0; right: 0; margin-top: 2.9rem; }
    .ues-steps { position: relative; padding-bottom: 1.3rem; }
    .ues-stephead { gap: .75rem; }
    .ues-stepicon { width: 2.6rem; height: 2.6rem; }
    .ues-steptitle { font-size: 1.25rem; }
    .ues-stepnav { flex-wrap: wrap; }
    .ues-stepnav .ues-btn { flex: 1 1 auto; }
    .ues-stepnav-spacer { display: none; }
    .ues-summary dl { grid-template-columns: 1fr; gap: 0; }
    .ues-summary dd { margin-bottom: .5rem; }
    .ues-folio { padding: .9rem 1.2rem; }
    .ues-folio-value { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ues-pub *, .ues-pub *::before, .ues-pub *::after { animation: none !important; transition: none !important; }
    .ues-done-icon path { stroke-dashoffset: 0; }
}

/* Staff header logo and grant panel */
.ues-app .ues-brandlogo { height: 46px; width: auto; display: block; }
.ues-app .ues-header .ues-brandtext { border-left: 1px solid rgba(255, 255, 255, .25); padding-left: 1rem; }
.ues-app .ues-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; font-weight: 700; font-size: .8rem; }
.ues-app .ues-tone-success { background: #e8f5ec; color: #1e6b3a; }
.ues-app .ues-tone-danger { background: #fbe9ea; color: #a1202b; }
.ues-app .ues-tone-warning { background: #fff4e0; color: #8a5a00; }
.ues-app .ues-tone-info { background: #f6eef1; color: #651d32; }
.ues-app .ues-tone-muted { background: #f1eeee; color: #6f6773; }
.ues-app .ues-grantcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.ues-app .ues-grantbox { border: 1px solid #e8e1df; border-radius: 10px; padding: .9rem 1rem; }
.ues-app .ues-grantbox h5 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #6d6872; margin: 0 0 .5rem; }
.ues-app .ues-mailpreview { width: 100%; height: 720px; border: 1px solid #e1e5ea; border-radius: 12px; background: #f4efea; }
@media (max-width: 767px) { .ues-app .ues-grantcols { grid-template-columns: 1fr; } }

/* ===== 0.5.0 · Applicant documents ===== */
.ues-notice { border-radius: 12px; padding: .85rem 1rem; margin-bottom: 1.2rem; font-weight: 600; }
.ues-docs { border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem; margin-bottom: 1.6rem; background: #fdfbfa; scroll-margin-top: 1rem; }
.ues-docs-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; }
.ues-doclist { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .7rem; }
.ues-doc { display: flex; gap: 1rem; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 4px solid #d8cfcb; border-radius: 12px; padding: .9rem 1rem; }
.ues-doc-success { border-left-color: var(--ok); }
.ues-doc-warning { border-left-color: #e0a100; background: #fffcf4; }
.ues-doc-info { border-left-color: var(--w); }
.ues-doc-main { min-width: 0; flex: 1; }
.ues-doc-title { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ues-doc-help, .ues-doc-file { margin: .25rem 0 0; font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.ues-doc-note { margin: .45rem 0 0; font-size: .88rem; background: var(--warn-soft); color: #5a3d00; border-radius: 8px; padding: .45rem .65rem; }
.ues-doc-side { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; flex: 0 0 auto; }
.ues-chip-mini { font-size: .72rem; font-weight: 700; background: var(--g-soft); color: #7a4d00; border-radius: 999px; padding: .1rem .55rem; }
.ues-filebtn { position: relative; display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .45rem 1rem; border-radius: 999px; border: 1.5px solid var(--w); color: var(--w); font-weight: 700; font-size: .85rem; cursor: pointer; background: #fff; transition: all .2s; }
.ues-filebtn::before { content: "⇪"; font-size: 1rem; }
.ues-filebtn:hover { background: var(--w); color: #fff; }
.ues-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ues-filebtn:focus-within { outline: 3px solid var(--g); outline-offset: 2px; }
.ues-filebtn.is-loading { opacity: .7; pointer-events: none; }
.ues-filebtn.is-loading::before { content: ""; width: .9rem; height: .9rem; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: ues-spin .8s linear infinite; }
.ues-docs-submit { margin-top: 1rem; text-align: right; }
.ues-timeline li.is-warn::before { content: "!"; background: #e0a100; border-color: #e0a100; color: #fff; }
@media (max-width: 767px) {
    .ues-doc { flex-direction: column; align-items: stretch; }
    .ues-doc-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
    .ues-docs-submit .ues-btn { width: 100%; }
}

/* ===== 0.5.0 · Staff: stage, documents review, students ===== */
.ues-app .ues-stage { border-left: 4px solid #651d32; }
.ues-app .ues-stage h4 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ues-app .ues-doctable td { vertical-align: top; min-width: 160px; }
.ues-app .ues-doctable textarea { min-width: 220px; }
.ues-app .ues-payrow { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.ues-app .ues-checklist li { padding: .25rem 0; }
.ues-app .ues-meter { height: 10px; border-radius: 99px; background: #efe7e4; overflow: hidden; }
.ues-app .ues-meter-bar { height: 100%; background: linear-gradient(90deg, #651d32, #d9962b); border-radius: 99px; }
.ues-app .ues-term-current { box-shadow: 0 0 0 2px #d9962b; }
.ues-app .ues-term-current h5 { background: #d9962b; color: #2d1a00; }
.ues-app .ues-term-past h5 { background: #8a5a6a; }
.ues-app .ues-term-future { opacity: .85; }
.ues-app .ues-term-future h5 { background: #b9aeb2; color: #2b2530; }

/* ===== 0.6.0 · Tabs, fast review, groups, student record ===== */
.ues-app .ues-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid #eee5e8; margin: .5rem 0 1.2rem; }
.ues-app .ues-tab { padding: .6rem 1rem; color: #5b5260; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600; font-size: .92rem; }
.ues-app .ues-tab:hover { color: #651d32; background: #faf6f4; }
.ues-app .ues-tab.is-active { color: #651d32; border-bottom-color: #651d32; }
.ues-app .ues-tabcount { display: inline-block; min-width: 1.6rem; text-align: center; background: #f1e9ec; color: #651d32; border-radius: 999px; font-size: .75rem; padding: .05rem .4rem; margin-left: .25rem; }
.ues-app .ues-tab.is-active .ues-tabcount { background: #651d32; color: #fff; }

/* Fast review */
.ues-rv-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1rem; align-items: start; }
.ues-rv-list { position: sticky; top: 4.5rem; border: 1px solid #e1e5ea; border-radius: 12px; background: #fff; padding: .8rem; max-height: calc(100vh - 6rem); overflow: auto; }
.ues-rv-listhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.ues-rv-count { font-weight: 700; color: #651d32; }
.ues-rv-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.ues-rv-item { width: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .55rem; text-align: left; border: 1px solid transparent; background: none; border-radius: 9px; padding: .5rem .6rem; cursor: pointer; font: inherit; }
.ues-rv-item:hover { background: #faf6f4; }
.ues-rv-item.is-active { background: #f6eef1; border-color: #651d32; }
.ues-rv-dot { grid-row: span 2; width: .8rem; height: .8rem; border-radius: 50%; margin-top: .3rem; background: #c9bcc0; }
.ues-rv-entregado { background: #651d32; box-shadow: 0 0 0 3px #f1e3e8; }
.ues-rv-aceptado { background: #1e8a4c; }
.ues-rv-aceptado_obs { background: #d9962b; }
.ues-rv-requiere_correccion { background: #c0392b; }
.ues-rv-pendiente { background: transparent; border: 2px dashed #c9bcc0; }
.ues-rv-name { font-weight: 600; font-size: .9rem; line-height: 1.25; }
.ues-rv-state { color: #6d6872; font-size: .75rem; }
.ues-rv-keys { font-size: .72rem; color: #7a7280; margin: .8rem 0 0; }
.ues-rv-panel { border: 1px solid #e1e5ea; border-radius: 12px; background: #fff; padding: 1rem; margin-bottom: 1rem; }
.ues-rv-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: .8rem; }
.ues-rv-head h4 { margin: 0; font-size: 1.1rem; }
.ues-rv-links { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.ues-rv-preview { height: 62vh; min-height: 360px; background: #f3efed; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.ues-rv-preview iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.ues-rv-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ues-rv-older { margin: .6rem 0 0; font-size: .85rem; }
.ues-rv-decision { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: .9rem 0 .6rem; }
.ues-rv-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ues-rv-opt { margin: 0; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid #ddd3d6; cursor: pointer; font-weight: 700; font-size: .9rem; background: #fff; }
.ues-rv-opt kbd { font-size: .7rem; padding: .05rem .3rem; background: #f1eeee; color: #5b5260; border-radius: 4px; margin-left: .2rem; }
.ues-rv-opt-e { color: #6d6872; font-weight: 600; }
.ues-rv-opt-a { color: #1e6b3a; }
.ues-rv-opt-o { color: #8a5a00; }
.ues-rv-opt-r { color: #a1202b; }
.ues-rv-radio:checked + .ues-rv-opt-e { background: #f1eeee; border-color: #6d6872; }
.ues-rv-radio:checked + .ues-rv-opt-a { background: #1e8a4c; border-color: #1e8a4c; color: #fff; }
.ues-rv-radio:checked + .ues-rv-opt-o { background: #d9962b; border-color: #d9962b; color: #fff; }
.ues-rv-radio:checked + .ues-rv-opt-r { background: #c0392b; border-color: #c0392b; color: #fff; }
.ues-rv-radio:checked + .ues-rv-opt kbd { background: rgba(255, 255, 255, .25); color: #fff; }
.ues-rv-radio:focus-visible + .ues-rv-opt { outline: 3px solid #d9962b; outline-offset: 2px; }
.ues-rv-empty { padding: 2rem; text-align: center; color: #6d6872; background: #faf8f7; border-radius: 10px; }
.ues-rv-nav { display: flex; justify-content: space-between; margin-top: .5rem; }
.ues-rv-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: .6rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; background: rgba(255, 255, 255, .96); border: 1px solid #e1e5ea; border-radius: 12px; padding: .7rem 1rem; box-shadow: 0 -6px 18px rgba(63, 15, 31, .08); margin-top: 1rem; }
.ues-rv-summary { margin-right: auto; font-size: .85rem; color: #5b5260; }
@media (max-width: 900px) {
    .ues-rv-grid { grid-template-columns: 1fr; }
    .ues-rv-list { position: static; max-height: none; }
    .ues-rv-preview { height: 55vh; }
}

/* Groups */
.ues-app .ues-groupgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.ues-app .ues-groupcard { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem; border: 1px solid #e1e5ea; border-radius: 14px; background: #fff; color: #2b2530; text-decoration: none; border-top: 4px solid #651d32; transition: all .2s; }
.ues-app .ues-groupcard:hover { box-shadow: 0 8px 22px rgba(63, 15, 31, .1); transform: translateY(-2px); color: #2b2530; }
.ues-app .ues-groupcode { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: #a8833a; text-transform: uppercase; }
.ues-app .ues-groupcard strong { font-size: 1.1rem; color: #651d32; }
.ues-app .ues-groupprog, .ues-app .ues-groupcount { font-size: .82rem; color: #6d6872; }
.ues-app .ues-groupterm { font-weight: 700; font-size: .9rem; margin-top: .3rem; }
.ues-app .ues-action form { margin-top: .4rem; }

/* Student record */
.ues-app .ues-studenthead { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 .4rem; }
.ues-app .ues-avatar { width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #7a2440, #3f0f1f); color: #f3d9a4; font-weight: 800; font-size: 1.2rem; flex: 0 0 auto; }
.ues-app .ues-studentname { flex: 1; min-width: 220px; }
.ues-app .ues-studentname h3 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.ues-app .ues-studentname p { margin: .2rem 0 0; color: #5b5260; font-size: .9rem; }
.ues-app .ues-miniform { display: grid; gap: .45rem; margin-top: .4rem; }
.ues-app .ues-miniform label { margin: 0; }
.ues-app .ues-inline { display: flex; gap: .3rem; align-items: center; flex-wrap: nowrap; }
.ues-app .ues-inline .form-control { width: 4.5rem; }
.ues-app .ues-kardex td { vertical-align: middle; }
.ues-app .ues-reasonbox summary { cursor: pointer; color: #a1202b; font-size: .82rem; }
.ues-app .ues-reasonbox form { display: flex; gap: .3rem; margin-top: .3rem; }
.ues-app .ues-metrics-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ues-app .ues-metric strong { font-size: 1.6rem; }
@media (max-width: 767px) { .ues-app .ues-metrics-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== 0.6.1 · Application shell: top bar + side menu by process ===== */
body.ues-body #page-header { display: none; }
.ues-shellapp { max-width: 1600px; margin: 0 auto 2rem; }
.ues-topbar { display: flex; align-items: center; gap: 1rem; padding: .7rem 1.1rem; border-radius: 14px; color: #fff;
    background: linear-gradient(120deg, #7a2440 0%, #651d32 50%, #3f0f1f 100%); box-shadow: 0 4px 14px rgba(63, 15, 31, .18); }
.ues-topbrand { display: flex; align-items: center; gap: .9rem; color: #fff; text-decoration: none; }
.ues-topbrand:hover { color: #fff; text-decoration: none; }
.ues-toplogo { height: 38px; width: auto; }
.ues-topname { font-weight: 800; font-size: 1.1rem; padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .3); }
.ues-topinst { margin-left: auto; font-size: .82rem; opacity: .85; }
.ues-menubtn { display: none; align-items: center; gap: .4rem; margin: 0 0 0 auto; padding: .4rem .8rem; border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .35); cursor: pointer; font-weight: 700; font-size: .9rem; }
.ues-menubtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ues-navtoggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ues-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 1.25rem; margin-top: 1rem; align-items: start; }
.ues-side { position: sticky; top: 4.5rem; background: #fff; border: 1px solid #e8e1df; border-radius: 14px; padding: .8rem .6rem;
    max-height: calc(100vh - 5.5rem); overflow: auto; }
.ues-sidegroup + .ues-sidegroup { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid #f0e9e6; }
.ues-sidetitle { margin: 0 0 .3rem .55rem; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #a8833a; }
.ues-side ul { list-style: none; margin: 0; padding: 0; }
.ues-sidelink { display: flex; align-items: center; gap: .6rem; padding: .48rem .6rem; border-radius: 9px; color: #3c3340;
    text-decoration: none; font-size: .92rem; font-weight: 600; border-left: 3px solid transparent; }
.ues-sidelink:hover { background: #faf6f4; color: #651d32; text-decoration: none; }
.ues-sidelink.is-active { background: #f6eef1; color: #651d32; border-left-color: #651d32; }
.ues-sidelink:focus-visible { outline: 3px solid #d9962b; outline-offset: 1px; }
.ues-icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ues-sidecount { margin-left: auto; min-width: 1.5rem; padding: .05rem .45rem; border-radius: 999px; background: #651d32; color: #fff;
    font-size: .72rem; font-weight: 800; text-align: center; }
.ues-main { min-width: 0; }
@media (max-width: 991px) {
    .ues-topinst { display: none; }
    .ues-menubtn { display: inline-flex; }
    .ues-layout { grid-template-columns: 1fr; }
    .ues-side { display: none; position: static; max-height: none; }
    .ues-navtoggle:checked ~ .ues-side { display: block; }
    .ues-toplogo { height: 30px; }
    .ues-topname { font-size: .95rem; }
}

/* Home pipeline */
.ues-dashgrid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.ues-pipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.ues-pipestep { position: relative; display: flex; flex-direction: column; gap: .1rem; height: 100%; padding: .9rem .9rem .8rem;
    border: 1px solid #e8e1df; border-radius: 12px; color: #2b2530; text-decoration: none; background: #fdfbfa; transition: all .2s; }
.ues-pipestep:hover { border-color: #651d32; box-shadow: 0 6px 16px rgba(63, 15, 31, .08); text-decoration: none; color: #2b2530; }
.ues-pipestep.is-hot { border-color: #d9962b; background: #fffaf0; }
.ues-pipen { position: absolute; top: .6rem; right: .7rem; font-size: .7rem; font-weight: 800; color: #b9aeb2; }
.ues-pipevalue { font-size: 2rem; font-weight: 800; color: #651d32; line-height: 1.1; }
.ues-pipestep.is-hot .ues-pipevalue { color: #b8740f; }
.ues-pipelabel { font-weight: 700; font-size: .9rem; }
.ues-pipehint { font-size: .76rem; color: #6d6872; }
.ues-todo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ues-todo a { display: flex; justify-content: space-between; gap: .6rem; padding: .7rem .85rem; border-radius: 10px; background: #fffaf0;
    border: 1px solid #f0dcb4; color: #5a3d00; font-weight: 600; text-decoration: none; }
.ues-todo a:hover { background: #fdf1d8; text-decoration: none; }
.ues-todo-none { color: #1e6b3a; font-weight: 600; margin: 0; }
@media (max-width: 991px) { .ues-dashgrid { grid-template-columns: 1fr; } }

/* Record header, pager and stage path */
.ues-recordnav { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.ues-backlink { font-weight: 600; color: #651d32; }
.ues-pager { display: flex; align-items: center; gap: .4rem; }
.ues-pagerpos { font-size: .82rem; color: #6d6872; min-width: 4.5rem; text-align: center; }
.ues-recordhead { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; background: #fff;
    border: 1px solid #e8e1df; border-radius: 14px; border-left: 5px solid #651d32; }
.ues-recordname { flex: 1; min-width: 220px; }
.ues-recordname h3 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.ues-recordname p { margin: .15rem 0 0; color: #6d6872; font-size: .9rem; }
.ues-recordbadges { display: flex; gap: .4rem; flex-wrap: wrap; }
.ues-stepper2 { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; padding: 0; margin: .8rem 0 1rem; }
.ues-stepper2 li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding-top: .1rem; }
.ues-stepper2 li::before { content: ""; position: absolute; top: 1rem; left: -50%; width: 100%; height: 3px; background: #e8e1df; z-index: 0; }
.ues-stepper2 li:first-child::before { display: none; }
.ues-stepper2 li.is-done::before, .ues-stepper2 li.is-current::before, .ues-stepper2 li.is-warn::before { background: #651d32; }
.ues-step2n { position: relative; z-index: 1; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
    background: #fff; border: 2px solid #ddd3d6; color: #8a8090; font-weight: 800; font-size: .85rem; }
.ues-stepper2 .is-done .ues-step2n { background: #1e8a4c; border-color: #1e8a4c; color: #fff; }
.ues-stepper2 .is-current .ues-step2n { background: #651d32; border-color: #651d32; color: #fff; box-shadow: 0 0 0 4px rgba(101, 29, 50, .15); }
.ues-stepper2 .is-warn .ues-step2n { background: #d9962b; border-color: #d9962b; color: #fff; }
.ues-stepper2 .is-stopped .ues-step2n { background: #c0392b; border-color: #c0392b; color: #fff; }
.ues-step2t { font-weight: 700; font-size: .85rem; }
.ues-step2d { font-size: .74rem; color: #6d6872; line-height: 1.25; }

/* Detail layout: data on the left, actions on the right */
.ues-detailgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.ues-detailside { position: sticky; top: 4.5rem; display: grid; gap: 0; }
.ues-detailside .btn-block { display: block; width: 100%; margin-bottom: .5rem; }
.ues-stageactions { display: grid; gap: .5rem; }
.ues-stageactions .btn, .ues-stageactions .singlebutton, .ues-stageactions form, .ues-stageactions button { width: 100%; margin: 0; }
.ues-sections { display: grid; gap: 1rem; }
.ues-sections .ues-panel { margin-bottom: 0; }
.ues-sectiontitle { display: flex; align-items: center; gap: .6rem; font-size: 1.02rem; font-weight: 800; color: #651d32; margin: 0 0 1rem;
    padding-bottom: .7rem; border-bottom: 1px solid #f0e9e6; }
.ues-sectionicon { width: 2rem; height: 2rem; border-radius: 9px; background: #f6eef1; display: grid; place-items: center; }
.ues-sectionicon svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: #651d32; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ues-fieldgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 1.4rem; margin: 0; }
.ues-fielditem.is-wide { grid-column: 1 / -1; }
.ues-fielditem dt { font-size: .74rem; font-weight: 700; color: #7a7280; margin-bottom: .2rem; }
.ues-fielditem dd { margin: 0; font-size: .97rem; color: #2b2530; overflow-wrap: anywhere; white-space: pre-line; }
.ues-fielditem.is-wide dd { background: #fcfaf8; border-radius: 10px; padding: .7rem .85rem; line-height: 1.55; }
.ues-yesno { display: inline-block; padding: .1rem .65rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.ues-yesno.is-yes { background: #e8f5ec; color: #1e6b3a; }
.ues-yesno.is-no { background: #f1eeee; color: #6d6872; }
.ues-submitted { font-size: .8rem; color: #7a7280; margin: 0; }
.ues-linklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.ues-linklist a { font-weight: 700; }
@media (max-width: 1199px) { .ues-fieldgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991px) {
    .ues-detailgrid { grid-template-columns: 1fr; }
    .ues-detailside { position: static; }
    .ues-stepper2 { grid-template-columns: 1fr; gap: .5rem; }
    .ues-stepper2 li { flex-direction: row; text-align: left; gap: .6rem; }
    .ues-stepper2 li::before { display: none; }
}
@media (max-width: 575px) { .ues-fieldgrid { grid-template-columns: 1fr; } }

/* Lists */
.ues-app .ues-listtable td { vertical-align: middle; }
.ues-personcell { display: flex; align-items: center; gap: .7rem; }
.ues-miniavatar { width: 2.3rem; height: 2.3rem; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
    background: #f6eef1; color: #651d32; font-weight: 800; font-size: .82rem; }
.ues-rowtitle { font-weight: 700; color: #2b2530; }
.ues-app .ues-reference { display: block; }
@media (max-width: 991px) {
    .ues-detailgrid { display: flex; flex-direction: column; }
    .ues-detailside { order: -1; }
}
@media (max-width: 480px) { .ues-topname { display: none; } }
