:root { color-scheme:light; font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif; font-synthesis:none; --ink:#062449; --muted:#657a96; --line:#dbe4ee; --blue:#087df5; }
* { box-sizing:border-box; }
html { background:#f4f7fb; min-width:320px; }
body { background:#f4f7fb; color:var(--ink); margin:0; min-height:100dvh; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.62; }
a { color:#076dd1; }
h1,h2,p { margin-top:0; }
h1 { font-size:clamp(1.9rem,4vw,2.8rem); letter-spacing:-.035em; line-height:1.05; margin-bottom:.45rem; }
h2 { font-size:1.15rem; margin-bottom:.45rem; }
.page-heading { align-items:flex-end; display:flex; gap:1.2rem; justify-content:space-between; margin-bottom:1.35rem; }
.eyebrow { color:#087df5; font-size:.73rem; font-weight:850; letter-spacing:.15em; margin-bottom:.5rem; text-transform:uppercase; }
.page-subtitle { color:var(--muted); margin-bottom:0; }
.migration-badge { background:#e4f2ff; border-radius:999px; color:#096cc5; font-size:.78rem; font-weight:750; padding:.45rem .75rem; }
.stats-grid { display:grid; gap:1rem; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:1rem; }
.stat-card { align-items:center; background:#fff; border:1px solid var(--line); border-radius:.85rem; display:flex; gap:.9rem; min-height:92px; padding:1rem; }
.stat-card strong,.stat-card span { display:block; }
.stat-card strong { font-size:1.45rem; line-height:1.1; }
.stat-card div span { color:var(--muted); font-size:.8rem; margin-top:.25rem; }
.stat-icon { align-items:center; background:#e7f2ff; border-radius:.7rem; color:#087df5; display:flex!important; flex:0 0 42px; height:42px; justify-content:center; }
.stat-icon.amber { background:#fff2d5; color:#c97800; }
.stat-icon.green { background:#e4f7ec; color:#118447; font-size:1.3rem; }
.stat-icon .app-icon { height:1.3rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:1.3rem; }
.content-card { background:#fff; border:1px solid var(--line); border-radius:.9rem; padding:clamp(1rem,2vw,1.5rem); }
.migration-status { align-items:flex-start; display:grid; gap:2rem; grid-template-columns:minmax(0,1.5fr) minmax(230px,.75fr); }
.migration-status p:last-child,.content-card p:last-child { color:var(--muted); margin-bottom:0; }
.status-list { display:grid; gap:.65rem; }
.status-list span { border-radius:.5rem; font-size:.85rem; font-weight:650; padding:.65rem .75rem; }
.status-list a { align-items:center; display:flex; gap:.65rem; text-decoration:none; }
.status-list a .app-icon { flex:0 0 1.05rem; height:1.05rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:1.05rem; }
.status-list .done { background:#e7f7ed; color:#08783d; }
.status-list .pending { background:#fff3d8; color:#926000; }
.primary-action { background:#087df5; border:0; border-radius:.6rem; box-shadow:0 8px 20px rgba(8,125,245,.2); color:#fff; font-weight:750; min-height:44px; padding:.7rem 1.15rem; }
.secondary-action { background:#fff; border:1px solid #cbd9e8; border-radius:.6rem; color:var(--ink); font-weight:750; min-height:42px; padding:.65rem 1rem; }
.secondary-action:hover { background:#f5f9fd; border-color:#9db8d5; }
.secondary-action.compact { font-size:.78rem; min-height:34px; padding:.4rem .65rem; white-space:nowrap; }
.notice-banner { border-radius:.7rem; font-size:.86rem; font-weight:700; margin-bottom:1rem; padding:.8rem 1rem; }
.notice-banner.success { background:#e7f7ed; color:#08783d; }
.notice-banner.error { background:#fff0f0; color:#bb2424; }
.empty-state { align-items:center; display:flex; flex-direction:column; justify-content:center; min-height:330px; text-align:center; }
.empty-state>.app-icon { background:#e7f2ff; border-radius:999px; color:#087df5; height:66px; margin-bottom:1rem; padding:18px; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.5; width:66px; }
.empty-state p { max-width:580px; }
.data-card { overflow:hidden; padding:0; }
.loading-state { align-items:center; color:var(--muted); display:flex; justify-content:center; min-height:180px; }
.compact-empty { align-items:center; display:flex; flex-direction:column; justify-content:center; min-height:280px; padding:2rem; text-align:center; }
.compact-empty>.app-icon { background:#e7f2ff; border-radius:999px; color:#087df5; height:58px; margin-bottom:1rem; padding:16px; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.5; width:58px; }
.compact-empty p { color:var(--muted); margin:0; }
.access-denied-actions { align-items:center; display:flex; flex-wrap:wrap; gap:.75rem; justify-content:center; margin-top:1.5rem; }
.access-denied-actions form { margin:0; }
.table-scroll { overflow-x:auto; }
.data-table { border-collapse:collapse; min-width:760px; width:100%; }
.data-table th,.data-table td { border-bottom:1px solid var(--line); padding:.95rem 1rem; text-align:left; vertical-align:middle; }
.data-table th { background:#f8fafc; color:#60748e; font-size:.72rem; letter-spacing:.045em; text-transform:uppercase; }
.data-table tbody tr:last-child td { border-bottom:0; }
.data-table td { font-size:.86rem; }
.data-table td small,.data-table td span { display:block; }
.data-table td small { color:var(--muted); margin-top:.2rem; }
.status-pill { background:#e8f5ec; border-radius:999px; color:#167640; display:inline-block!important; font-size:.73rem; font-weight:750; padding:.32rem .58rem; white-space:nowrap; }
.progress-cell { align-items:center; display:flex; gap:.55rem; min-width:115px; }
.progress-cell>span { background:#dce6f1; border-radius:999px; height:6px; overflow:hidden; width:72px; }
.progress-cell i { background:#087df5; border-radius:inherit; display:block; height:100%; }
.progress-cell small { margin:0!important; white-space:nowrap; }
.agenda-list { display:grid; }
.agenda-item { align-items:center; border-bottom:1px solid var(--line); display:grid; gap:1rem; grid-template-columns:64px minmax(0,1fr) auto; padding:1rem 1.2rem; }
.agenda-item:last-child { border-bottom:0; }
.agenda-item time { align-items:center; background:#edf5ff; border-radius:.7rem; color:#076dd1; display:flex; flex-direction:column; justify-content:center; min-height:58px; text-transform:uppercase; }
.agenda-item time strong { font-size:1.25rem; line-height:1; }
.agenda-item time span,.appointment-type { font-size:.68rem; font-weight:750; letter-spacing:.05em; }
.agenda-item h2 { margin:.18rem 0; }
.agenda-item p { color:var(--muted); font-size:.82rem; margin:0; }
.appointment-type { color:#087df5; text-transform:uppercase; }
.modal-backdrop { align-items:center; background:rgba(5,28,54,.62); display:flex; inset:0; justify-content:center; padding:1rem; position:fixed; z-index:1000; }
.dialog-card { background:#fff; border-radius:1rem; box-shadow:0 28px 80px rgba(0,25,55,.28); max-height:calc(100dvh - 2rem); max-width:760px; overflow:auto; width:100%; }
.dialog-card.small { max-width:620px; }
.dialog-card>header { align-items:flex-start; border-bottom:1px solid var(--line); display:flex; gap:1rem; justify-content:space-between; padding:1.25rem 1.4rem; }
.dialog-card>header h2 { font-size:1.45rem; margin-bottom:.3rem; }
.dialog-card>header p:last-child { color:var(--muted); margin:0; }
.icon-button { align-items:center; background:transparent; border:0; color:#60748e; display:flex; flex:0 0 40px; font-size:1.7rem; height:40px; justify-content:center; }
.dialog-card form { padding:1.3rem 1.4rem; }
.form-grid { display:grid; gap:1rem; grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-grid.single { grid-template-columns:1fr; }
.field { display:grid; gap:.42rem; }
.field.full { grid-column:1/-1; }
.field>span { font-size:.78rem; font-weight:800; }
.field em { color:#dd4c40; font-size:.72rem; font-weight:500; }
.field input,.field select { background:#fff; border:1px solid #bdcee0; border-radius:.45rem; color:var(--ink); min-height:44px; padding:.65rem .75rem; width:100%; }
.field input:focus,.field select:focus { border-color:#087df5; box-shadow:0 0 0 3px rgba(8,125,245,.12); outline:0; }
.dialog-card form>footer { border-top:1px solid var(--line); display:flex; gap:.75rem; justify-content:flex-end; margin:1.3rem -1.4rem -1.3rem; padding:1rem 1.4rem; }
.form-errors { background:#fff0f0; border-radius:.55rem; color:#b42323; font-size:.8rem; margin-bottom:1rem; padding:.7rem 1rem; }
.form-errors:empty { display:none; }
.responsive-card-grid { display:grid; gap:1rem; grid-template-columns:repeat(3,minmax(0,1fr)); }
.validation-message { color:#c62828; }
.vp-content:has(.questionnaire-shell) { max-width:1800px; padding:1.35rem clamp(1rem,2vw,2rem) 2rem; }
.form-context-toolbar { align-items:center; background:#fff; border:1px solid #d8e4ef; border-radius:.7rem; box-shadow:0 5px 18px rgba(15,57,94,.055); display:flex; justify-content:space-between; margin-bottom:1rem; min-height:48px; padding:.65rem .9rem; }
.form-context-toolbar a { color:#0878f9; font-size:.84rem; font-weight:800; text-decoration:none; }
.form-context-toolbar span { color:#6a8198; font-size:.76rem; }
.form-context-toolbar strong { color:#153b61; }
.form-page-heading { align-items:flex-end; display:flex; gap:1rem; justify-content:space-between; margin-bottom:1rem; padding:0 .15rem; }
.form-page-heading h1 { font-size:clamp(2.2rem,3vw,3.15rem); letter-spacing:-.045em; line-height:1; margin:.2rem 0 .45rem; }
.form-page-heading .page-subtitle { font-size:.92rem; }
.back-link { display:inline-block; font-size:.78rem; font-weight:750; margin-bottom:.8rem; text-decoration:none; }
.questionnaire-shell { align-items:start; display:grid; gap:1.15rem; grid-template-columns:minmax(245px,275px) minmax(0,1fr); }
.questionnaire-navigation { background:#07335c; border-radius:.9rem; display:grid; overflow:hidden; position:sticky; top:1rem; }
.questionnaire-navigation a { border-bottom:1px solid rgba(255,255,255,.11); color:#dceaff; display:grid; gap:.16rem; grid-template-columns:30px 1fr; min-height:59px; padding:.78rem .9rem; text-decoration:none; }
.questionnaire-navigation a:last-child { border-bottom:0; }
.questionnaire-navigation a:hover,.questionnaire-navigation a.active { background:#087df5; color:#fff; }
.questionnaire-navigation a>span { align-items:center; background:rgba(255,255,255,.14); border-radius:999px; display:flex; font-size:.76rem; font-weight:800; grid-row:1/3; height:27px; justify-content:center; width:27px; }
.questionnaire-navigation strong { font-size:.84rem; line-height:1.25; }
.questionnaire-navigation small { color:inherit; font-size:.73rem; opacity:.82; }
.questionnaire-content { background:#fff; border:1px solid var(--line); border-radius:.9rem; min-width:0; overflow:hidden; }
.questionnaire-content>header { align-items:center; border-bottom:1px solid var(--line); display:flex; gap:1rem; justify-content:space-between; padding:1.25rem 1.5rem; }
.questionnaire-content>header h2 { font-size:1.35rem; }
.questionnaire-content>header h2,.questionnaire-content>header p { margin-bottom:0; }
.step-progress { background:#dfe9f4; border-radius:999px; height:7px; min-width:150px; overflow:hidden; width:26%; }
.step-progress i { background:#087df5; border-radius:inherit; display:block; height:100%; }
.step-note { background:#edf6ff; color:#345879; font-size:.82rem; margin:1rem 1.25rem 0; padding:.75rem .85rem; }
.readonly-notice { background:#fff7df; border-radius:.55rem; color:#7c5a00; font-size:.76rem; margin:1rem 1.25rem 0; padding:.7rem .85rem; }
.question-grid { display:grid; column-gap:1rem; grid-template-columns:repeat(2,minmax(0,1fr)); padding:1.15rem 1.5rem; }
.question-grid>.question-field { border-bottom:1px solid #e6edf5; grid-column:1/-1; padding:1.05rem 0 1.2rem; }
.question-grid>.question-field:first-child { padding-top:.25rem; }
.question-grid>.question-field:last-child { border-bottom:0; padding-bottom:.35rem; }
.question-field { display:grid; gap:.5rem; min-width:0; }
.question-field.wide { grid-column:1/-1; }
.question-field label { font-size:.88rem; font-weight:800; line-height:1.35; }
.question-field label em { color:#df4e42; font-size:.68rem; font-weight:500; }
.question-field>small { color:var(--muted); font-size:.76rem; line-height:1.4; }
.readonly-value { align-items:center; background:#f8fafc; border:1px solid #cbd9e8; border-radius:.45rem; color:#183a5e; display:flex; min-height:43px; overflow-wrap:anywhere; padding:.62rem .72rem; }
.readonly-value.multiline { align-items:flex-start; min-height:68px; white-space:pre-wrap; }
.readonly-options { display:flex; flex-wrap:wrap; gap:.5rem; min-height:43px; }
.readonly-options span { align-items:center; background:#f8fafc; border:1px solid #cbd9e8; border-radius:999px; color:#5f728b; display:flex; font-size:.78rem; padding:.45rem .7rem; }
.readonly-options span.selected { background:#e4f2ff; border-color:#087df5; color:#0566c4; font-weight:800; }
.question-field>input,.question-field>select,.question-field>textarea { background:#fff; border:1px solid #bdcee0; border-radius:.52rem; color:var(--ink); font-size:.96rem; min-height:48px; padding:.7rem .8rem; width:100%; }
.question-field>textarea { min-height:88px; resize:vertical; }
.question-field>input:focus,.question-field>select:focus,.question-field>textarea:focus { border-color:#087df5; box-shadow:0 0 0 3px rgba(8,125,245,.12); outline:0; }
.location-select { position:relative; width:100%; z-index:1; }
.location-select.open { z-index:20; }
.location-select .location-search { background:#fff; border:1px solid #bdcee0; border-radius:.52rem; color:var(--ink); font-size:.96rem; min-height:48px; padding:.7rem 2.8rem .7rem .8rem; width:100%; }
.location-select .location-search:focus { border-color:#087df5; box-shadow:0 0 0 3px rgba(8,125,245,.12); outline:0; }
.location-select .location-toggle { align-items:center; background:transparent; border:0; bottom:1px; cursor:pointer; display:flex; justify-content:center; padding:0; position:absolute; right:1px; top:1px; width:46px; }
.location-select .location-toggle span { border-left:5px solid transparent; border-right:5px solid transparent; border-top:7px solid #173852; transition:transform .16s ease; }
.location-select.open .location-toggle span { transform:rotate(180deg); }
.location-select.disabled .location-search { background:#edf1f5; border-color:#d5dde5; color:#7a8997; cursor:not-allowed; }
.location-select.disabled .location-toggle { cursor:not-allowed; opacity:.45; }
.location-options { background:#fff; border:1px solid #bfd0e3; border-radius:.65rem; box-shadow:0 14px 34px rgba(10,42,74,.18); left:0; margin-top:.35rem; max-height:270px; overflow:auto; padding:.35rem; position:absolute; right:0; top:100%; }
.location-options button { background:transparent; border:0; border-radius:.42rem; color:var(--ink); cursor:pointer; display:block; font:inherit; font-size:.92rem; padding:.7rem .8rem; text-align:left; width:100%; }
.location-options button:hover,.location-options button[aria-selected=true] { background:#eaf4ff; color:#006fe8; }
.location-empty { color:var(--muted); display:block; font-size:.88rem; padding:.85rem; }
.vp-date-field { width:100%; }
.vp-date-trigger { align-items:center; background:#fff; border:1px solid #b9d0e6; border-radius:.58rem; color:#153958; cursor:pointer; display:flex; font:inherit; justify-content:space-between; min-height:48px; padding:.7rem .85rem; text-align:left; transition:border-color .15s ease,box-shadow .15s ease; width:100%; }
.vp-date-trigger:hover,.vp-date-trigger:focus-visible { border-color:#1686f7; box-shadow:0 0 0 3px rgba(22,134,247,.12); outline:0; }
.vp-date-trigger .placeholder { color:#526c84; }
.vp-date-trigger svg { fill:none; flex:0 0 auto; height:20px; margin-left:.75rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:20px; }
.vp-date-field.disabled .vp-date-trigger { background:#edf2f6; color:#8a9bab; cursor:not-allowed; }
.vp-date-backdrop { align-items:center; backdrop-filter:blur(5px); background:rgba(6,28,50,.55); display:flex; inset:0; justify-content:center; padding:1rem; position:fixed; z-index:1500; }
.vp-date-dialog { background:#fff; border:1px solid rgba(255,255,255,.72); border-radius:1rem; box-shadow:0 28px 80px rgba(4,29,54,.3); color:#102f4e; overflow:hidden; width:min(480px,calc(100vw - 2rem)); }
.vp-date-dialog>header { align-items:flex-start; background:linear-gradient(135deg,#0b6fd3,#168bf8); color:#fff; display:flex; justify-content:space-between; min-height:96px; padding:1.2rem 1.35rem; }
.vp-date-dialog>header div { display:grid; gap:.3rem; }
.vp-date-dialog>header small { font-size:.68rem; font-weight:800; letter-spacing:.08em; opacity:.86; text-transform:uppercase; }
.vp-date-dialog>header strong { font-size:1.15rem; line-height:1.3; text-transform:capitalize; }
.vp-date-close { align-items:center; background:rgba(255,255,255,.15); border:0; border-radius:50%; color:#fff; cursor:pointer; display:flex; font-size:1.45rem; height:36px; justify-content:center; line-height:1; width:36px; }
.vp-date-close:hover { background:rgba(255,255,255,.25); }
.vp-date-jump { background:#f4f9ff; border-bottom:1px solid #dce8f3; display:grid; gap:.75rem; grid-template-columns:1.4fr 1fr; padding:.9rem 1.2rem; }
.vp-date-jump label { color:#35536f; display:grid; font-size:.68rem; font-weight:800; gap:.32rem; }
.vp-date-jump select,.vp-date-jump input { appearance:auto; background:#fff; border:1px solid #bdd2e5; border-radius:.5rem; color:#123654; font:inherit; font-weight:700; min-height:43px; padding:.55rem .65rem; width:100%; }
.vp-date-navigation { align-items:center; display:grid; grid-template-columns:44px 1fr 44px; padding:1rem 1.15rem .55rem; text-align:center; }
.vp-date-navigation strong { font-size:1rem; text-transform:capitalize; }
.vp-date-navigation button { align-items:center; background:#e9f4ff; border:0; border-radius:.5rem; color:#0878e8; cursor:pointer; display:flex; font-size:1.65rem; height:40px; justify-content:center; }
.vp-date-navigation button:hover { background:#d7ebff; }
.vp-date-weekdays,.vp-date-grid { display:grid; grid-template-columns:repeat(7,1fr); padding-left:1.15rem; padding-right:1.15rem; }
.vp-date-weekdays { color:#72879a; font-size:.66rem; font-weight:850; padding-bottom:.35rem; text-align:center; text-transform:uppercase; }
.vp-date-grid { gap:.2rem; padding-bottom:.8rem; }
.vp-date-grid button { aspect-ratio:1; background:transparent; border:0; border-radius:.58rem; color:#173b5a; cursor:pointer; font:inherit; font-size:.8rem; font-weight:750; min-height:42px; }
.vp-date-grid button:hover { background:#e5f2ff; color:#076fd8; }
.vp-date-grid button.outside { color:#b2c0cd; }
.vp-date-grid button.today { box-shadow:inset 0 0 0 2px #74b8f8; color:#0878e8; }
.vp-date-grid button.selected { background:#087df5; box-shadow:0 7px 15px rgba(8,125,245,.26); color:#fff; }
.vp-date-dialog>footer { align-items:center; border-top:1px solid #e3ebf2; display:flex; justify-content:space-between; padding:.85rem 1.2rem; }
.vp-date-dialog>footer button { border-radius:.52rem; cursor:pointer; font:inherit; font-size:.75rem; font-weight:850; min-height:40px; padding:.55rem .9rem; }
.vp-date-clear { background:#fff; border:1px solid #cbd9e5; color:#536d84; }
.vp-date-today { background:#087df5; border:1px solid #087df5; color:#fff; }
@media(max-width:520px){.vp-date-backdrop{align-items:flex-end;padding:0}.vp-date-dialog{border-radius:1rem 1rem 0 0;width:100%}.vp-date-dialog>header{min-height:86px}.vp-date-grid button{min-height:40px}.vp-date-jump{grid-template-columns:1fr 1fr}}
.edit-options { display:flex; flex-wrap:wrap; gap:.55rem; min-height:43px; }
.edit-options label { align-items:center; background:#f8fafc; border:1px solid #cbd9e8; border-radius:999px; cursor:pointer; display:flex; font-size:.78rem; gap:.4rem; padding:.45rem .7rem; }
.edit-options label.selected { background:#e4f2ff; border-color:#087df5; color:#0566c4; }
.edit-options input { accent-color:#087df5; margin:0; }
.answer-toggles { display:flex; flex-wrap:wrap; gap:.5rem; }
.answer-toggles button { background:#fff; border:1px solid #cbd9e8; border-radius:.4rem; color:#45617e; font-size:.72rem; padding:.35rem .6rem; }
.answer-toggles button.active { background:#e4f2ff; border-color:#087df5; color:#0566c4; font-weight:800; }
.field-error { color:#bf2727; font-size:.72rem; font-weight:700; }
.protected-field { color:#8a6705!important; }
.repeat-editor { display:grid; gap:.85rem; }
.repeat-record { background:#f3f8fd; border:1px solid #cfdeec; border-radius:.65rem; overflow:hidden; }
.repeat-record>header { align-items:center; border-bottom:1px solid #d8e4ef; display:flex; justify-content:space-between; padding:.75rem .9rem; }
.repeat-record>header button { background:#fff; border:1px solid #efb7b7; border-radius:.4rem; color:#c52d2d; font-size:.7rem; font-weight:750; padding:.3rem .55rem; }
.repeat-fields { display:grid; column-gap:1rem; grid-template-columns:repeat(2,minmax(0,1fr)); padding:1rem; }
.repeat-fields>.question-field { grid-column:1/-1; }
.question-field.date-range-start { grid-column:1!important; padding-right:.25rem; }
.question-field.date-range-end { grid-column:2!important; padding-left:.25rem; }
.question-label-row { align-items:center;display:flex;gap:.45rem;justify-content:flex-start; }
.question-aid-control { display:inline-flex;position:relative; }
.question-aid { align-items:center;background:#e8f3ff;border:1px solid #c4ddf7;border-radius:50%;color:#0878f9;cursor:pointer;display:inline-flex;flex:0 0 19px;font-family:inherit;font-size:.7rem;font-weight:850;height:19px;justify-content:center;line-height:1;padding:0;width:19px; }
.question-aid:hover,.question-aid-control.open .question-aid { background:#0878f9;border-color:#0878f9;color:#fff; }
.question-aid:focus-visible { outline:3px solid rgba(8,120,249,.25);outline-offset:2px; }
.question-aid-popover { background:#fff;border:1px solid #b9d5f2;border-radius:.6rem;box-shadow:0 12px 30px rgba(0,42,82,.18);color:#173c5f;font-size:.78rem;font-weight:600;left:-.7rem;line-height:1.45;padding:.65rem .75rem;position:absolute;top:calc(100% + .55rem);width:min(19rem,calc(100vw - 2rem));z-index:80; }
.question-aid-popover::before { background:#fff;border-left:1px solid #b9d5f2;border-top:1px solid #b9d5f2;content:"";height:.55rem;left:.95rem;position:absolute;top:-.34rem;transform:rotate(45deg);width:.55rem; }
.question-help { background:#f2f7fc;border-left:3px solid #79b9f8;border-radius:.25rem;color:#506d88!important;display:block;margin-top:.55rem;padding:.5rem .65rem; }
.question-field input:disabled,.question-field select:disabled,.question-field textarea:disabled { background:#edf1f5!important;border-color:#d5dde5!important;color:#7a8997;cursor:not-allowed; }
.repeat-fields:has(> :only-child) { grid-template-columns:1fr; }
.repeat-fields .question-field>input,.repeat-fields .question-field>select,.repeat-fields .question-field>textarea { background:#fff; border:1px solid #bdcee0; border-radius:.5rem; font-size:.95rem; min-height:46px; padding:.66rem .75rem; width:100%; }
.add-record { justify-self:start; }
.questionnaire-content>.notice-banner { margin:1rem 1.25rem 0; }
.questionnaire-actions { align-items:center; border-top:1px solid var(--line); display:flex; justify-content:space-between; padding:1.15rem 1.5rem; }
.questionnaire-actions a { align-items:center; display:inline-flex; text-decoration:none; }
.save-actions { display:flex; gap:.65rem; }
.review-grid { display:grid; gap:1rem; }
.review-section { background:#fff; border:1px solid var(--line); border-radius:.8rem; overflow:hidden; }
.review-section>header { align-items:center; background:#f7faff; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; padding:.85rem 1rem; }
.review-section>header span { color:#087df5; font-size:.68rem; font-weight:800; text-transform:uppercase; }
.review-section>header h2 { margin:.15rem 0 0; }
.review-section>header a { font-size:.78rem; font-weight:800; }
.review-section dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; }
.review-answer { border-bottom:1px solid #edf1f5; display:grid; gap:.25rem; padding:.75rem 1rem; }
.review-answer dt { color:#61758f; font-size:.7rem; font-weight:800; }
.review-answer dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.review-finalize { align-items:center; background:#fff; border:1px solid var(--line); border-radius:.8rem; display:flex; gap:1rem; justify-content:flex-end; margin-top:1rem; padding:1rem; }
.valid.modified:not([type=checkbox]) { outline:1px solid #1b9b55; }
.invalid { outline:1px solid #c62828; }
@media (max-width:1000px) { .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .responsive-card-grid { grid-template-columns:1fr; } .questionnaire-shell { grid-template-columns:1fr; } .questionnaire-navigation { display:flex; overflow-x:auto; position:static; } .questionnaire-navigation a { border-bottom:0; border-right:1px solid rgba(255,255,255,.11); flex:0 0 180px; } }
@media (max-width:640px) {
  input,select,textarea { font-size:16px; }
  .form-context-toolbar { align-items:flex-start; flex-direction:column; gap:.4rem; }
  .form-context-toolbar span { line-height:1.4; }
  .page-heading { align-items:stretch; flex-direction:column; }
  .page-heading .primary-action { width:100%; }
  .stats-grid { grid-template-columns:1fr; }
  .migration-status { grid-template-columns:1fr; }
  .migration-badge { align-self:flex-start; }
  .table-scroll { overflow:visible; }
  .data-table { min-width:0; }
  .data-table thead { display:none; }
  .data-table tbody,.data-table tr,.data-table td { display:block; width:100%; }
  .data-table tr { border-bottom:1px solid var(--line); padding:.65rem 1rem; }
  .data-table tr:last-child { border-bottom:0; }
  .data-table td { align-items:flex-start; border:0; display:grid; gap:.6rem; grid-template-columns:minmax(90px,.7fr) minmax(0,1.3fr); padding:.38rem 0; }
  .data-table td::before { color:#60748e; content:attr(data-label); font-size:.69rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
  .agenda-item { align-items:start; grid-template-columns:52px minmax(0,1fr); padding:.9rem; }
  .agenda-item>.status-pill { grid-column:2; justify-self:start; }
  .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .dialog-card { border-radius:.8rem; max-height:calc(100dvh - 1rem); }
  .modal-backdrop { align-items:flex-end; padding:.5rem; }
  .dialog-card form>footer { align-items:stretch; flex-direction:column-reverse; }
  .dialog-card form>footer button { width:100%; }
  .form-page-heading { align-items:flex-start; flex-direction:column; }
  .questionnaire-content>header { align-items:flex-start; flex-direction:column; }
  .step-progress { width:100%; }
  .question-grid { grid-template-columns:1fr; padding:1rem; }
  .repeat-fields { grid-template-columns:1fr; }
  .question-field.date-range-start,.question-field.date-range-end { grid-column:1!important; padding-left:0; padding-right:0; }
  .question-field.wide { grid-column:auto; }
  .readonly-notice,.step-note { margin-left:1rem; margin-right:1rem; }
  .questionnaire-actions { align-items:stretch; flex-direction:column; }
  .save-actions { flex-direction:column; }
  .questionnaire-actions a,.questionnaire-actions button { justify-content:center; width:100%; }
  .review-section dl { grid-template-columns:1fr; }
  .review-finalize { align-items:stretch; flex-direction:column; }
}

.customer-portal-heading { margin:1.5rem 0 1rem; }
.customer-application-grid { display:grid; gap:1rem; grid-template-columns:repeat(3,minmax(0,1fr)); }
.customer-application-card { display:grid; gap:1rem; padding:1.25rem; }
.customer-application-card h2 { color:#082746; font-size:1.2rem; margin:.25rem 0; }
.customer-application-card p { color:#607990; margin:.15rem 0; }
.customer-application-card .primary-action { justify-content:center; text-decoration:none; }
.client-preview-controls form { margin:0; }
.client-preview-controls form button { border:0; cursor:pointer; font:inherit; }
@media (max-width:1000px) { .customer-application-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:680px) { .customer-application-grid { grid-template-columns:1fr; } }

/* Portal de clientes */
.customer-loading { align-items:center; color:#55718c; display:flex; font-weight:750; justify-content:center; min-height:320px; }
.portal-hero,.portal-page-heading { align-items:center; background:linear-gradient(105deg,rgba(238,247,255,.98),rgba(255,255,255,.88)); border:1px solid #dbe8f3; border-radius:1rem; display:flex; justify-content:space-between; min-height:126px; overflow:hidden; padding:1.35rem 1.65rem; position:relative; }
.portal-hero::after,.portal-page-heading::after { background:radial-gradient(circle at center,rgba(8,125,245,.12),transparent 68%); content:""; height:220px; position:absolute; right:-25px; top:-90px; width:390px; }
.portal-hero h1,.portal-page-heading h1 { color:#06294e; font-size:clamp(1.8rem,3vw,2.65rem); letter-spacing:-.035em; margin:0; }
.portal-hero p,.portal-page-heading p { color:#496b89; margin:.3rem 0 0; max-width:680px; }
.portal-hero>.app-icon,.portal-page-heading>.app-icon { color:#0a7ff3; height:4.1rem; margin-right:3rem; opacity:.18; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.6; width:4.1rem; z-index:1; }
.portal-metrics { display:grid; gap:1rem; grid-template-columns:repeat(3,minmax(0,1fr)); margin:1rem 0 1.25rem; }
.portal-metrics article { align-items:center; background:#fff; border:1px solid #dce6ef; border-radius:.9rem; box-shadow:0 9px 24px rgba(18,65,103,.06); display:flex; gap:1rem; min-height:82px; padding:1rem 1.25rem; }
.metric-icon { align-items:center; background:#e8f4ff; border-radius:.8rem; color:#087ef4; display:flex; flex:0 0 auto; font-size:1.45rem; font-weight:900; height:48px; justify-content:center; width:48px; }
.metric-icon.green { background:#e5f8ed; color:#11a057; }
.metric-icon .app-icon { height:1.45rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:2; width:1.45rem; }
.portal-metrics article div { display:grid; }
.portal-metrics strong { color:#092b4e; font-size:1.6rem; line-height:1; }
.portal-metrics small { color:#56738e; font-size:.76rem; margin-top:.35rem; }
.portal-section { background:#fff; border:1px solid #dbe6ef; border-radius:1rem; box-shadow:0 12px 28px rgba(16,58,94,.06); overflow:hidden; }
.portal-section>header { align-items:center; display:flex; justify-content:space-between; padding:1rem 1.3rem .75rem; }
.portal-section>header h2 { color:#082c50; font-size:1.3rem; margin:0; }
.portal-section>header a { align-items:center; color:#087cf3; display:flex; font-size:.76rem; font-weight:850; gap:.35rem; text-decoration:none; }
.portal-section>header a .app-icon { height:.95rem; stroke:currentColor; stroke-linecap:round; stroke-width:2; width:.95rem; }
.portal-request-list { border-top:1px solid #e8eef4; }
.portal-request-row { align-items:center; display:grid; gap:.8rem; grid-template-columns:42px minmax(145px,1.25fr) minmax(135px,1fr) minmax(140px,1.2fr) minmax(120px,.8fr) 105px; min-height:66px; padding:.65rem 1.25rem; }
.portal-request-row+.portal-request-row { border-top:1px solid #ebf0f5; }
.request-avatar,.table-person i { align-items:center; background:#e9f5ff; border-radius:50%; color:#087cf4; display:flex; height:36px; justify-content:center; width:36px; }
.request-avatar .app-icon,.table-person .app-icon { height:1.05rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:2; width:1.05rem; }
.request-person { display:grid; min-width:0; }
.request-person strong { color:#0b2c4b; font-size:.82rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.request-person small { color:#6a8298; font-size:.68rem; margin-top:.14rem; }
.request-type { color:#1f405f; font-size:.75rem; }
.portal-progress { align-items:center; display:flex; gap:.55rem; min-width:0; }
.portal-progress>span { background:#dce6ef; border-radius:999px; height:7px; min-width:70px; overflow:hidden; width:100%; }
.portal-progress i { background:linear-gradient(90deg,#0782f6,#09a86f); border-radius:inherit; display:block; height:100%; }
.portal-progress strong { color:#264866; font-size:.7rem; white-space:nowrap; }
.portal-status { border-radius:999px; display:inline-flex; font-size:.68rem; font-weight:850; justify-content:center; padding:.42rem .65rem; text-align:center; white-space:nowrap; }
.portal-status.complete { background:#ddf7e9; color:#13804a; }
.portal-status.progress { background:#e4f2ff; color:#0870cc; }
.portal-status.pending { background:#f0f2f4; color:#5e7081; }
.portal-status.neutral { background:#eef1f4; color:#637486; }
.portal-row-action { background:#0b80f5; border:1px solid #0b80f5; border-radius:999px; color:#fff; display:inline-flex; font-size:.7rem; font-weight:850; justify-content:center; padding:.46rem .75rem; text-decoration:none; white-space:nowrap; }
.portal-row-action.outline { background:#fff; color:#0a3d69; }
.portal-empty { align-items:center; color:#607a91; display:flex; gap:1rem; justify-content:center; min-height:155px; padding:1.5rem; text-align:left; }
.portal-empty>.app-icon { background:#eaf4ff; border-radius:50%; color:#0a82f6; height:54px; padding:.85rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; width:54px; }
.portal-empty strong { color:#103653; }
.portal-empty p { font-size:.76rem; margin:.2rem 0 0; }
.portal-empty.small { min-height:130px; }
.portal-lower-grid { display:grid; gap:1rem; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); margin-top:1rem; }
.upcoming-list { padding:0 1.25rem .8rem; }
.upcoming-item { align-items:center; border-top:1px solid #ebf0f5; display:flex; gap:1rem; padding:.75rem 0; }
.upcoming-item time { align-items:center; background:#eaf4ff; border-radius:.6rem; color:#0a4a7e; display:flex; flex-direction:column; height:53px; justify-content:center; width:53px; }
.upcoming-item time b { font-size:1rem; }.upcoming-item time span { font-size:.6rem; font-weight:850; }
.upcoming-item>div { display:grid; }.upcoming-item strong { color:#0b2f50; font-size:.78rem; }.upcoming-item span,.upcoming-item small { color:#617b92; font-size:.68rem; margin-top:.1rem; }
.portal-help-card { align-items:center; display:flex; gap:1rem; padding:1.5rem; }
.portal-help-card>span { align-items:center; background:#e6f8ee; border-radius:50%; color:#0ba460; display:flex; flex:0 0 auto; height:58px; justify-content:center; width:58px; }
.portal-help-card .app-icon { height:1.7rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:1.7rem; }
.portal-help-card h2 { color:#0b3153; font-size:1.05rem; margin:0; }.portal-help-card p { color:#607b93; font-size:.76rem; line-height:1.5; margin:.35rem 0 0; }
.portal-page-heading { min-height:105px; }
.requests-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.requests-metrics article:nth-child(3) strong { font-size:1.05rem; }
.applications-section { margin-top:.5rem; }
.portal-section>header.family-heading { justify-content:flex-start; gap:.8rem; padding:1.1rem 1.25rem; }
.family-heading p { color:#6c8398; font-size:.73rem; margin:.15rem 0 0; }.family-icon { color:#0a4678; }.family-icon .app-icon { height:2rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:2rem; }
.customer-table-wrap { overflow-x:auto; padding:0 1rem; }
.customer-table { border-collapse:separate; border-spacing:0; color:#24435e; font-size:.73rem; min-width:940px; width:100%; }
.customer-table thead { background:#dfeefd; color:#143b5d; text-transform:none; }
.customer-table th { font-size:.67rem; font-weight:850; padding:.72rem; text-align:left; }.customer-table th:first-child { border-radius:.55rem 0 0 .55rem; }.customer-table th:last-child { border-radius:0 .55rem .55rem 0; }
.customer-table td { border-bottom:1px solid #e2eaf2; padding:.72rem; vertical-align:middle; }.customer-table td>strong { color:#0a2f50; }
.table-person { align-items:center; display:flex; font-weight:750; gap:.55rem; }.table-person i { height:30px; width:30px; }
.portal-information { align-items:center; background:#e8f4ff; border-radius:.7rem; color:#234966; display:flex; gap:.8rem; margin:1rem; padding:.8rem 1rem; }
.portal-information>span { align-items:center; border:2px solid #0b80f5; border-radius:50%; color:#0b80f5; display:flex; flex:0 0 auto; font-family:serif; font-weight:900; height:27px; justify-content:center; width:27px; }
.portal-information strong { font-size:.76rem; }.portal-information p { font-size:.68rem; margin:.15rem 0 0; }
.appointment-tabs { display:grid; gap:.55rem; grid-template-columns:repeat(3,minmax(0,1fr)); margin:1rem 0; max-width:740px; }
.appointment-tabs button { align-items:center; background:#fff; border:1px solid #d8e4ef; border-radius:.7rem; color:#173d5e; display:flex; font-size:.76rem; font-weight:850; gap:.5rem; justify-content:center; min-height:48px; padding:.65rem; }
.appointment-tabs button.active { background:#0b80f5; border-color:#0b80f5; box-shadow:0 8px 20px rgba(11,128,245,.18); color:#fff; }
.appointment-tabs .app-icon { height:1.15rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:2; width:1.15rem; }
.appointment-list { display:grid; gap:.8rem; }
.appointment-card { align-items:center; background:#fff; border:1px solid #dce6ef; border-radius:.9rem; box-shadow:0 8px 22px rgba(17,60,96,.055); display:grid; gap:1rem; grid-template-columns:minmax(180px,.9fr) minmax(230px,1.25fr) minmax(170px,.85fr) 110px; min-height:106px; padding:.85rem 1.1rem; }
.appointment-owner { align-items:center; border-right:1px solid #e1e9f0; display:flex; gap:.75rem; min-height:70px; }.appointment-owner>span { align-items:center; background:#e8f4ff; border-radius:50%; color:#0b80f5; display:flex; height:44px; justify-content:center; width:44px; }.appointment-owner .app-icon { height:1.3rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:2; width:1.3rem; }.appointment-owner div,.appointment-detail div,.appointment-location { display:grid; }.appointment-owner strong { color:#0b2f4f; font-size:.82rem; }.appointment-owner small { color:#70869a; font-size:.68rem; margin-top:.15rem; }
.appointment-detail { align-items:center; background:#e8f6ff; border-radius:.7rem; color:#078b72; display:flex; gap:.7rem; min-height:72px; padding:.75rem; }.appointment-detail.consulate { background:#f0ecff; color:#7650d4; }.appointment-detail.ds160 { background:#e7f2ff; color:#0878e5; }.appointment-detail.other { background:#fff4dd; color:#b47a00; }.appointment-detail>.app-icon { height:1.75rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:1.75rem; }.appointment-detail strong { color:#0b3152; font-size:.78rem; }.appointment-detail span,.appointment-detail small { color:#3e607c; font-size:.68rem; margin-top:.12rem; }.appointment-location strong { color:#254963; font-size:.68rem; }.appointment-location span { color:#607a91; font-size:.72rem; margin-top:.25rem; }
.appointment-empty { background:#fff; border:1px solid #dce6ef; border-radius:.9rem; min-height:230px; }
@media (max-width:1050px) {
  .portal-request-row { grid-template-columns:42px minmax(130px,1fr) minmax(130px,1fr) minmax(130px,1fr) 100px; }.portal-request-row .request-type { display:none; }
  .requests-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.appointment-card { grid-template-columns:1fr 1.2fr 1fr; }.appointment-card>.portal-status { display:none; }
}
@media (max-width:760px) {
  .portal-hero,.portal-page-heading { min-height:110px; padding:1.15rem; }.portal-hero>.app-icon,.portal-page-heading>.app-icon { display:none; }
  .portal-metrics,.requests-metrics { grid-template-columns:1fr 1fr; }.portal-metrics article { min-height:76px; padding:.8rem; }.metric-icon { height:42px; width:42px; }.portal-metrics strong { font-size:1.25rem; }
  .portal-request-row { grid-template-columns:38px 1fr auto; padding:.8rem; }.portal-request-row .request-type,.portal-request-row .portal-progress { display:none; }.portal-request-row .portal-status { grid-column:2; justify-self:start; }.portal-request-row .portal-row-action { grid-column:3; grid-row:1/3; }
  .portal-lower-grid { grid-template-columns:1fr; }.portal-section>header { align-items:flex-start; gap:.5rem; }
  .appointment-tabs { display:flex; overflow-x:auto; }.appointment-tabs button { flex:0 0 175px; }
  .appointment-card { grid-template-columns:1fr; }.appointment-owner { border-bottom:1px solid #e1e9f0; border-right:0; padding-bottom:.6rem; }.appointment-location { padding:.25rem .5rem; }
}
@media (max-width:480px) { .portal-metrics,.requests-metrics { grid-template-columns:1fr; }.portal-request-row { grid-template-columns:36px 1fr; }.portal-request-row .portal-row-action { grid-column:1/3; grid-row:auto; }.portal-request-row .portal-status { grid-column:2; }.portal-help-card { align-items:flex-start; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; } }

/* M5–M9: paridad visual del panel administrativo aprobado */
.admin-heading { margin-bottom:1.55rem; }
.admin-heading h1 { color:#071c39; font-size:clamp(2.1rem,3vw,2.75rem); font-weight:820; }
.users-metrics { align-items:stretch; grid-template-columns:repeat(4,minmax(150px,1fr)) auto; }
.create-user-action { align-items:center; align-self:center; display:flex; gap:.45rem; justify-content:center; min-width:164px; }
.create-user-action .app-icon,.primary-action .app-icon,.secondary-action .app-icon { height:1.15rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.9; width:1.15rem; }
.admin-panel { box-shadow:0 8px 28px rgba(14,49,82,.055); }
.panel-heading { align-items:center; border-bottom:1px solid var(--line); display:flex; gap:1rem; justify-content:space-between; padding:1.05rem 1.25rem; }
.panel-heading h2 { margin:0; }
.panel-heading p { color:var(--muted); font-size:.76rem; margin:.25rem 0 0; }
.table-tools { align-items:center; display:flex; gap:.65rem; }
.search-box { align-items:center; background:#fff; border:1px solid #d4e0eb; border-radius:.48rem; color:#70859a; display:flex; min-width:330px; padding:0 .75rem; }
.search-box .app-icon { height:1rem; stroke:currentColor; stroke-linecap:round; stroke-width:1.8; width:1rem; }
.search-box input { border:0; color:#183a5a; min-height:40px; outline:0; padding:.55rem; width:100%; }
.table-tools select,.application-filters select,.calendar-filters select,.calendar-filters input { background:#fff; border:1px solid #d4e0eb; border-radius:.48rem; color:#294762; min-height:42px; padding:.55rem .75rem; }
.admin-data-table th { background:#fbfcfe; }
.admin-data-table tbody tr { transition:background-color .14s ease; }
.admin-data-table tbody tr:hover { background:#f8fbff; }
.pagination { align-items:center; display:flex; gap:.55rem; }
.pagination button { align-items:center; background:#fff; border:1px solid #d5e0eb; border-radius:.48rem; color:#0b3157; display:flex; font-size:1.1rem; height:2rem; justify-content:center; width:2rem; }
.pagination button:hover:not(:disabled) { background:#087df5; border-color:#087df5; color:#fff; }
.pagination button:disabled { color:#aebdca; cursor:not-allowed; opacity:.65; }
.pagination span { color:#60748e; font-size:.72rem; font-weight:700; }
.count-badge { background:#e8f3ff; border-radius:999px; color:#0878f9; display:inline-flex!important; font-weight:850; min-width:28px; padding:.3rem .55rem; place-content:center; }
.more-button,.icon-action { align-items:center; background:transparent; border:0; border-radius:.38rem; color:#617991; display:inline-flex; font-weight:900; height:34px; justify-content:center; min-width:34px; }
.more-button:hover,.icon-action:hover { background:#eaf3fc; color:#0878f9; }
.clickable-user-row { cursor:pointer; }
.clickable-user-row:focus-visible { outline:2px solid #0878f9; outline-offset:-2px; }
.clickable-user-row:focus-visible td,.clickable-user-row:hover td { background:#f4f9ff; }
.user-row-actions-cell { overflow:visible; }
.user-list-panel,.user-list-panel .users-table-scroll { overflow:visible; }
.user-row-menu-host { display:inline-flex; position:relative; }
.user-row-menu { background:#fff; border:1px solid #d5e1ec; border-radius:.65rem; box-shadow:0 14px 34px rgba(12,43,74,.17); display:grid; min-width:150px; padding:.35rem; position:absolute; right:calc(100% + .35rem); top:50%; transform:translateY(-50%); z-index:30; }
.user-row-menu button { background:transparent; border:0; border-radius:.4rem; color:#173c60; font-size:.79rem; font-weight:700; padding:.62rem .7rem; text-align:left; }
.user-row-menu button:hover { background:#edf6ff; color:#0878f9; }
.user-row-menu button.danger { color:#c93434; }
.user-row-menu button.danger:hover { background:#fff0f0; color:#b42323; }
.confirmation-copy { color:#536b85; padding:1.2rem 1.4rem; }
.confirmation-copy p { margin:0; }
.audit-log-panel { background:#fff; border:1px solid #dbe5ef; border-radius:.85rem; box-shadow:0 14px 34px rgba(18,57,91,.07); overflow:hidden; }
.audit-log-heading { align-items:center; border-bottom:1px solid #dbe5ef; display:flex; gap:1rem; justify-content:space-between; padding:1.15rem 1.3rem; }
.audit-log-heading h2 { font-size:1.15rem; margin:0 0 .25rem; }
.audit-log-heading p { color:#607891; font-size:.78rem; margin:0; }
.audit-log-note { background:#eef6ff; color:#365e83; font-size:.76rem; margin:1rem 1.25rem 0; padding:.75rem .9rem; }
.audit-log-table td { vertical-align:top; }
.audit-source { background:#e9f3ff; border-radius:999px; color:#1769b0; display:inline-block!important; font-size:.68rem; font-weight:800; padding:.35rem .55rem; white-space:nowrap; }
.audit-source.portal-cliente { background:#e7f8ef; color:#18794e; }
.audit-source.sistema { background:#eef0f3; color:#596675; }
@media(max-width:900px){
  .clickable-user-row { overflow:visible!important; }
  .user-row-menu { right:0; top:calc(100% + .3rem); transform:none; }
  .audit-log-heading { align-items:stretch; flex-direction:column; }
  .audit-log-heading .table-tools { width:100%; }
}
.icon-action { border:1px solid #d4e0eb; }
.icon-action .app-icon { height:1rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:1rem; }
.row-actions { align-items:center; display:flex; gap:.4rem; }
.table-footer { align-items:center; color:#71859a; display:flex; font-size:.72rem; justify-content:space-between; padding:.85rem 1.15rem; }
.admin-empty { color:#788b9d; margin:0; padding:2rem; text-align:center; }
.status-pill.status-pendiente,.status-pill.status-borrador { background:#fff1d7; color:#9a6100; }
.status-pill.status-bloqueado,.status-pill.status-inactivo { background:#ffe9e9; color:#b93232; }
.status-pill.status-archivado { background:#eee9ff; color:#6546ad; }
.status-pill.status-en-progreso,.status-pill.status-reabierto { background:#e6f2ff; color:#076bc7; }
.status-pill.status-finalizado { background:#e2f7ea; color:#148046; }
.user-modal-backdrop { padding:2rem; }
.user-detail-dialog { border-radius:1rem; max-width:1540px; width:min(100%,1540px); }
.user-detail-dialog>header { align-items:center; padding:1.55rem 2rem; }
.user-detail-header { border-bottom:1px solid var(--line); display:flex; justify-content:space-between; }
.user-header-status,.user-top-actions,.user-identity { align-items:center; display:flex; gap:.75rem; }
.user-identity-strip { align-items:center; border-bottom:1px solid var(--line); display:flex; gap:1rem; padding:1rem 2.55rem; }
.user-identity { flex:1; min-width:0; }
.user-identity strong { color:#102f4e; font-size:1.08rem; }
.user-identity span { color:#5c748b; font-size:.8rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-identity small { background:#e6f2ff; border-radius:999px; color:#0871dc; font-size:.7rem; font-weight:800; padding:.38rem .7rem; white-space:nowrap; }
.user-top-actions { margin-left:auto; }
.user-detail-dialog>header h2 { color:#0b2a4d; font-size:1.75rem; }
.user-detail-dialog>header p { font-size:.92rem; }
.user-account-section { background:#f8fafc; display:grid; gap:1.25rem; grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr); padding:1.25rem 2.55rem; }
.user-info-card { background:#fff; border:1px solid #d9e5f0; border-radius:.85rem; padding:1.1rem; }
.user-info-card h3 { color:#102f4e; font-size:1.12rem; margin:0 0 1rem; }
.user-profile-grid { align-items:end; display:grid; gap:.85rem; grid-template-columns:repeat(2,minmax(0,1fr)); }
.user-referrer-field { grid-column:1/-1; }
.user-avatar { align-items:center; align-self:end; background:#e1efff; border-radius:999px; color:#0878f9; display:flex; font-size:1.35rem; font-weight:850; height:72px; justify-content:center; width:72px; }
.user-profile-grid input,.user-security-column input,.user-security-column select,.new-application-inline input,.new-application-inline select,.appointment-form input,.appointment-form select { background:#fff; border:1px solid #cedae6; border-radius:.52rem; color:#173956; min-height:52px; padding:.7rem .85rem; width:100%; }
.user-security-column { align-content:start; display:grid; gap:.95rem; }
.inline-control { align-items:end; display:grid; gap:.65rem; grid-template-columns:minmax(0,1fr) auto; }
.inline-control .secondary-action { min-height:52px; min-width:180px; }
.user-security-column>small { color:#71859a; font-size:.72rem; }
.linked-applications { padding:1.7rem 2.55rem; }
.modal-section-heading { align-items:center; display:flex; justify-content:space-between; margin-bottom:1.1rem; }
.modal-section-heading h3 { font-size:1.32rem; margin:0; }
.modal-section-heading p { color:var(--muted); margin:.3rem 0 0; }
.new-application-inline { align-items:end; background:#eef6ff; border:1px solid #cfe2f5; border-radius:.7rem; display:grid; gap:1rem; grid-template-columns:1.1fr 1fr .75fr auto; margin-bottom:1rem; padding:1rem; }
.new-application-inline>div:first-child { align-self:center; display:grid; }
.new-application-inline small { color:var(--muted); margin-top:.25rem; }
.new-application-inline>div:last-child { display:flex; gap:.5rem; }
.user-modal-footer { align-items:center; background:#fafbfd; border-top:1px solid var(--line); display:flex; justify-content:space-between; padding:1.2rem 2.55rem; }
.user-modal-footer button { align-items:center; display:flex; gap:.5rem; }
.application-filters { align-items:end; border-bottom:1px solid var(--line); display:grid; gap:.8rem; grid-template-columns:1.5fr .75fr .75fr; padding:1.05rem 1.15rem; }
.application-filters label:not(.search-box),.calendar-filters label { color:#617991; display:grid; font-size:.72rem; gap:.32rem; }
.application-filters .search-box { min-width:0; }
.applications-table { min-width:1080px; }
.calendar-filters { align-items:end; display:grid; gap:1rem; grid-template-columns:1fr 1fr 1.25fr 1fr; margin-bottom:1rem; }
.calendar-layout { align-items:start; display:grid; gap:1rem; grid-template-columns:minmax(0,1fr) 320px; }
.month-card { overflow:hidden; padding:1rem; }
.month-header { align-items:center; border-bottom:1px solid var(--line); display:grid; grid-template-columns:auto 1fr auto; padding:0 0 .8rem; }
.month-header h2 { font-size:1.45rem; margin:0 0 0 1rem; text-transform:capitalize; }
.view-switch { display:flex; }
.view-switch button { background:#fff; border:1px solid #d5e0eb; color:#536b82; min-height:38px; min-width:86px; }
.view-switch button:first-child { border-radius:.45rem 0 0 .45rem; }.view-switch button:last-child { border-radius:0 .45rem .45rem 0; }
.view-switch button.active { background:#087df5; border-color:#087df5; color:#fff; }
.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays span { color:#4f6880; font-size:.75rem; padding:.75rem; text-align:center; }
.calendar-day { border-left:1px solid #dce5ee; border-top:1px solid #dce5ee; cursor:pointer; min-height:112px; padding:.5rem; }
.calendar-day:nth-child(7n) { border-right:1px solid #dce5ee; }.calendar-day:nth-last-child(-n+7) { border-bottom:1px solid #dce5ee; }
.calendar-day.outside { background:#fbfcfd; color:#b2beca; }.calendar-day.today { background:#eef6ff; box-shadow:inset 0 0 0 1px #77b8f6; }
.calendar-day>strong { font-size:.8rem; }
.day-events { display:grid; gap:.28rem; margin-top:.35rem; }
.calendar-event { background:#e8f7ef; border:0; border-radius:.4rem; color:#173b55; display:grid; font-size:.67rem; grid-template-columns:8px minmax(0,1fr); padding:.35rem .4rem; text-align:left; }
.calendar-event i { align-self:center; background:#14ad63; border-radius:50%; height:7px; width:7px; }.calendar-event span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.calendar-event small { color:#4d6b80; grid-column:2; }
.calendar-event.consulado { background:#f0e7ff; }.calendar-event.consulado i { background:#752ee8; }.calendar-event.ds-160 { background:#e5f2ff; }.calendar-event.ds-160 i { background:#087df5; }.calendar-event.otro { background:#fff2d8; }.calendar-event.otro i { background:#efaa00; }
.calendar-sidebar { display:grid; gap:.8rem; }.calendar-sidebar .content-card { padding:1rem; }
.mini-month header { align-items:center; display:flex; justify-content:space-between; text-transform:capitalize; }.mini-month header button { background:transparent;border:0;font-size:1.3rem; }
.mini-week,.mini-grid { display:grid; grid-template-columns:repeat(7,1fr); text-align:center; }.mini-week span { color:#597086;font-size:.67rem;padding:.6rem 0 .3rem; }.mini-grid button { aspect-ratio:1;background:transparent;border:0;border-radius:50%;color:#2f4d68;font-size:.7rem; }.mini-grid button.outside { color:#b4c0cb; }.mini-grid button.today { background:#087df5;color:#fff;font-weight:800; }
.calendar-legend,.upcoming { display:grid; gap:.6rem; }.calendar-legend h3,.upcoming h3 { margin:0 0 .2rem; }.calendar-legend span { align-items:center;display:flex;font-size:.78rem;gap:.65rem; }.calendar-legend i,.upcoming i { background:#14ad63;border-radius:50%;height:10px;width:10px; }.calendar-legend i.consulado,.upcoming i.consulado { background:#752ee8; }.calendar-legend i.ds-160,.upcoming i.ds-160 { background:#087df5; }.calendar-legend i.otro,.upcoming i.otro { background:#efaa00; }
.upcoming button { align-items:start;background:transparent;border:0;border-bottom:1px solid #edf1f5;display:flex;gap:.6rem;padding:.4rem 0;text-align:left; }.upcoming button:last-child { border-bottom:0; }.upcoming i { flex:0 0 9px;margin-top:.3rem; }.upcoming span { display:grid;min-width:0; }.upcoming strong { font-size:.72rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.upcoming small { color:var(--muted);font-size:.66rem;margin-top:.14rem; }
.appointment-form { display:grid;gap:1rem;grid-template-columns:1fr 1fr;padding:1.25rem 1.4rem; }.appointment-form .full { grid-column:1/-1; }.check-field { align-items:center;display:flex;font-size:.78rem;font-weight:750;gap:.5rem; }.dialog-footer { align-items:center;border-top:1px solid var(--line);display:flex;gap:.65rem;justify-content:flex-end;padding:1rem 1.4rem; }.dialog-footer>span { flex:1; }.danger-action { background:#fff5f5;border:1px solid #f1b4b4;border-radius:.55rem;color:#ce3030;font-weight:750;min-height:42px;padding:.65rem 1rem; }
.settings-tabs { border-bottom:1px solid #d8e2ec;display:flex;gap:.85rem;margin:-.25rem 0 1.15rem;overflow-x:auto; }.settings-tabs button { background:transparent;border:0;border-bottom:2px solid transparent;color:#536b85;min-height:44px;padding:.7rem .8rem;white-space:nowrap; }.settings-tabs button.active { border-bottom-color:#0878f9;color:#0878f9;font-weight:800; }.settings-tabs form { margin-left:auto; }.settings-tabs .logout-tab:hover { border-bottom-color:#d43838;color:#c62d2d; }
.settings-grid { align-items:start;display:grid;gap:1rem;grid-template-columns:repeat(2,minmax(0,1fr)); }.settings-card { background:#fff;border:1px solid #dfe7ef;border-radius:.72rem;box-shadow:0 6px 22px rgba(10,45,78,.045);padding:1.05rem 1.15rem; }.settings-card>header { align-items:center;display:flex;gap:.75rem;margin-bottom:1rem; }.settings-card>header>div { flex:1; }.settings-card h2 { color:#102b47;margin:0; }.settings-card header p { color:#7890a6;font-size:.72rem;margin:.2rem 0 0; }.settings-icon { align-items:center;background:#e5f1ff;border-radius:50%;color:#0878f9;display:flex;flex:0 0 42px;font-size:.7rem;font-weight:850;height:42px;justify-content:center; }.settings-icon .app-icon { height:1.25rem;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8;width:1.25rem; }.settings-icon.green { background:#dff8e9;color:#10a65a; }
.setting-row { align-items:center;border-top:1px solid #edf1f5;display:flex;gap:1rem;justify-content:space-between;padding:.85rem 0; }.setting-row>div { display:grid; }.setting-row strong { font-size:.8rem; }.setting-row span:not(.status-pill) { color:#71869a;font-size:.7rem;margin-top:.2rem; }.setting-row input[type=checkbox] { accent-color:#087df5;height:21px;width:21px; }
.settings-fields { display:grid;gap:.75rem; }.settings-fields label { color:#465f77;display:grid;font-size:.7rem;font-weight:750;gap:.35rem; }.settings-fields input,.settings-fields textarea { border:1px solid #d5e0ea;border-radius:.4rem;color:#183550;font:inherit;min-height:41px;padding:.55rem .65rem;resize:vertical;width:100%; }.settings-information { background:#eaf4ff;border-radius:.45rem;color:#54708b;font-size:.72rem;line-height:1.5;margin:0;padding:.8rem; }
.settings-save-bar { align-items:center;background:rgba(255,255,255,.97);border:1px solid #d5e2ed;border-radius:.65rem;box-shadow:0 10px 30px rgba(5,36,66,.12);display:flex;grid-column:1/-1;justify-content:flex-end;padding:.8rem 1rem;position:sticky;bottom:1rem; }.settings-save-bar p { color:#71869a;font-size:.72rem;margin:0 auto 0 0; }
.communication-stack { display:grid;gap:1rem; }.sender-card .connection-badge { border-radius:.45rem;font-size:.7rem;font-weight:800;padding:.55rem .75rem; }.connection-badge.pending { background:#fff1d6;color:#966000; }.provider-grid { display:grid;gap:.75rem;grid-template-columns:1fr 1fr;margin-bottom:.75rem; }.provider-grid button { align-items:center;background:#fff;border:1px solid #d5e0ea;border-radius:.55rem;color:#173855;display:flex;gap:.8rem;min-height:58px;padding:.7rem 1rem;text-align:left; }.provider-grid button>b { color:#0878f9;font-size:1.3rem; }.provider-grid button span { display:grid; }.provider-grid small { color:var(--muted);margin-top:.15rem; }.template-placeholder { align-items:center;display:flex;flex-direction:column;min-height:270px;justify-content:center;text-align:center; }.template-placeholder p { color:var(--muted);max-width:620px; }
.connection-badge.connected { background:#dcf7e7;color:#087b42; }
.provider-action { align-items:center;background:#fff;border:1px solid #bcd7f4;border-radius:.68rem;color:#173855;display:flex;gap:.8rem;min-height:68px;padding:.7rem 1rem;text-align:left;text-decoration:none;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.provider-action:hover { border-color:#1688fb;box-shadow:0 8px 20px rgba(8,125,245,.12);transform:translateY(-1px); }
.provider-action>b { color:#0878f9;font-size:1.3rem; }.provider-action span,.connected-account span { display:grid; }.provider-action small,.connected-account small { color:var(--muted);margin-top:.15rem; }
.connected-account { align-items:center;background:#f1f7ff;border:1px solid #cfe1f5;border-radius:.65rem;display:flex;gap:.85rem;margin-bottom:.8rem;padding:.8rem 1rem; }.connected-account>b { align-items:center;background:#fff;border-radius:.55rem;color:#0878f9;display:flex;font-size:1.25rem;height:42px;justify-content:center;width:42px; }
.tester-launch-content { display:grid;gap:1rem; }.tester-launch-content .primary-action { align-items:center;display:inline-flex;gap:.5rem;justify-self:start;text-decoration:none; }.tester-launch-card { min-height:230px; }
.login-stage { align-items:center;display:flex;justify-content:center;min-height:calc(100dvh - 5rem);padding:2rem 1rem; }
.account-access-page { align-items:center;background:linear-gradient(rgba(2,35,67,.72),rgba(2,35,67,.72)),url("/brand-assets/login-new-york.png") center/cover fixed;display:flex;justify-content:center;min-height:100dvh;padding:2rem 1rem; }
.account-access-page .login-card { box-shadow:0 30px 80px rgba(0,20,45,.28); }
.account-access-logo { display:block;height:84px;margin:0 auto .75rem;object-fit:contain;width:110px; }
.account-access-page .login-card>header { padding-top:1.35rem; }
.login-card { background:#fff;border:1px solid #dce6ef;border-radius:1.15rem;box-shadow:0 24px 70px rgba(5,35,65,.13);overflow:hidden;width:min(100%,480px); }
.login-card>header { background:linear-gradient(145deg,#f8fbff 0%,#edf6ff 100%);border-bottom:1px solid #dce8f3;padding:2rem 2.2rem 1.55rem;text-align:center; }
.login-mark { align-items:center;background:#087df5;border-radius:1rem;box-shadow:0 10px 22px rgba(8,125,245,.22);color:#fff;display:inline-flex;font-size:1.05rem;font-weight:900;height:54px;justify-content:center;margin-bottom:1rem;width:54px; }
.login-card .eyebrow { color:#087df5;font-size:.68rem;font-weight:850;letter-spacing:.17em;margin:0 0 .45rem; }
.login-card h1 { color:#071c39;font-size:2rem;margin:0 0 .45rem; }
.login-card h1:focus { outline:none; }
.login-card>header p:last-child { color:#687f95;font-size:.83rem;line-height:1.5;margin:0 auto;max-width:360px; }
.login-form { display:grid;gap:1rem;padding:1.65rem 2.2rem 1.8rem; }
.login-field { display:grid;gap:.42rem; }
.login-field>span { color:#1b3b59;font-size:.76rem;font-weight:800; }
.login-field>input { background:#fff;border:1px solid #c7d6e4;border-radius:.52rem;color:#142f49;font:inherit;min-height:48px;outline:0;padding:.7rem .85rem;width:100%; }
.login-field>input:focus { border-color:#087df5;box-shadow:0 0 0 3px rgba(8,125,245,.12); }
.login-options { align-items:center;color:#4f687f;display:flex;font-size:.72rem;justify-content:space-between; }
.login-options label { align-items:center;display:flex;gap:.45rem; }.login-options input { accent-color:#087df5;height:16px;width:16px; }.login-options a,.login-form footer a { color:#0871dd;font-weight:750;text-decoration:none; }
.login-submit { border-radius:.55rem;font-size:.9rem;min-height:50px;width:100%; }
.login-passkey { align-items:center;display:flex;gap:.65rem;justify-content:center;position:relative; }.login-passkey::before,.login-passkey::after { background:#e2e9f0;content:"";height:1px;width:100%; }.login-passkey>span { color:#8798a9;font-size:.7rem; }.login-passkey button { background:transparent;border:0;color:#0871dd;flex:0 0 auto;font-size:.73rem;font-weight:750;padding:.4rem; }
.login-form footer { border-top:1px solid #edf1f5;display:flex;font-size:.7rem;justify-content:space-between;margin-top:.1rem;padding-top:1rem; }
@media(max-width:1180px){.users-metrics{grid-template-columns:repeat(2,1fr)}.create-user-action{grid-column:1/-1}.user-account-section{grid-template-columns:1fr}.calendar-layout{grid-template-columns:1fr}.calendar-sidebar{grid-template-columns:repeat(3,1fr)}.new-application-inline{grid-template-columns:1fr 1fr}.new-application-inline>div:first-child,.new-application-inline>div:last-child{grid-column:1/-1}}
@media(max-width:820px){.table-tools,.panel-heading{align-items:stretch;flex-direction:column}.search-box{min-width:0;width:100%}.application-filters,.calendar-filters{grid-template-columns:1fr 1fr}.application-filters .search-box{grid-column:1/-1}.user-profile-grid{grid-template-columns:68px 1fr}.user-profile-grid label:first-of-type{grid-column:2}.user-profile-grid label:not(:first-of-type){grid-column:1/-1}.user-primary-actions{grid-template-columns:1fr}.calendar-sidebar{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}.settings-save-bar{grid-column:auto}.provider-grid{grid-template-columns:1fr}}
@media(max-width:640px){.users-metrics{grid-template-columns:1fr}.create-user-action{grid-column:auto}.user-modal-backdrop{align-items:flex-start;padding:.5rem}.user-detail-dialog{max-height:calc(100dvh - 1rem)}.user-account-section,.linked-applications,.user-modal-footer{padding-left:1rem;padding-right:1rem}.inline-control{grid-template-columns:1fr}.inline-control .secondary-action{width:100%}.modal-section-heading{align-items:stretch;flex-direction:column;gap:1rem}.new-application-inline{grid-template-columns:1fr}.calendar-filters{grid-template-columns:1fr}.month-card{overflow:visible;padding:.75rem}.month-header{display:flex;flex-wrap:wrap;gap:.65rem;min-width:0}.month-header h2{flex:1;font-size:1.15rem;margin-left:.25rem}.view-switch{flex-basis:100%}.view-switch button{flex:1}.calendar-weekdays{display:none}.calendar-grid{display:block;min-width:0}.calendar-day{border:1px solid #dce5ee!important;border-radius:.55rem;margin-top:.5rem;min-height:0;padding:.65rem}.calendar-day.outside{display:none}.calendar-day>strong::before{content:"Día ";font-weight:500}.day-events:empty::after{color:#8aa0b5;content:"Sin citas";font-size:.7rem}.appointment-form{grid-template-columns:1fr}.appointment-form .full{grid-column:auto}.dialog-footer{align-items:stretch;flex-direction:column}.dialog-footer>span{display:none}.settings-tabs form{margin-left:0}.settings-save-bar{align-items:stretch;flex-direction:column}.table-footer{align-items:flex-start;flex-direction:column;gap:.5rem}}

/* Acceso VP+: réplica del portal visual aprobado */
.public-layout { min-height:100dvh; }
#blazor-error-ui { background:#fff4d8;bottom:0;box-shadow:0 -2px 16px rgba(0,0,0,.15);color:#4c3812;display:none;left:0;padding:.8rem 3.5rem .8rem 1rem;position:fixed;width:100%;z-index:1000; }
#blazor-error-ui .dismiss { background:transparent;border:0;cursor:pointer;font-size:1.35rem;position:absolute;right:1rem;top:.45rem; }
.portal-login-page { background:#062a4e;color:#fff;min-height:100dvh;overflow:hidden;position:relative; }
.portal-photo,.portal-shade { inset:0;position:absolute; }
.sr-only { border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px; }
.portal-photo { background-image:url("/brand-assets/login-new-york.png");background-position:center;background-size:cover; }
.portal-shade { background:linear-gradient(90deg,rgb(0 36 69 / 84%) 0%,rgb(0 45 82 / 48%) 36%,rgb(0 38 73 / 8%) 64%,transparent 100%),linear-gradient(180deg,rgb(0 31 60 / 18%),rgb(0 24 49 / 12%)); }
.portal-header { align-items:flex-start;display:flex;justify-content:space-between;left:clamp(2rem,5vw,5.5rem);position:absolute;right:clamp(2rem,5vw,5.5rem);top:clamp(1.5rem,4vh,3rem);z-index:2; }
.portal-header-logo { border-radius:.35rem;height:auto;object-fit:contain;width:clamp(125px,12vw,185px); }
.portal-language { align-items:center;display:flex;font-size:1.05rem;font-weight:750;gap:.55rem;margin-top:.8rem; }
.portal-promise { left:clamp(2rem,5.5vw,6rem);position:absolute;top:21.5%;width:min(28rem,30vw);z-index:2; }
.portal-promise h1 { color:#fff;font-size:clamp(3rem,4.25vw,5rem);letter-spacing:-.055em;line-height:.92;margin:0; }
.portal-promise h1:focus { outline:none; }
.portal-promise h1 strong { color:#ffd70a;font-weight:850; }
.portal-lead { font-size:clamp(1rem,1.3vw,1.45rem);line-height:1.38;margin:1.2rem 0 2.25rem; }
.portal-benefits { display:grid;gap:1.35rem;list-style:none;margin:0;padding:0; }
.portal-benefits li { align-items:center;display:flex;gap:1.1rem; }
.portal-benefit-icon { align-items:center;border:2px solid rgb(255 255 255 / 92%);border-radius:1rem;display:flex;flex:0 0 3.15rem;height:3.15rem;justify-content:center;width:3.15rem; }
.portal-benefit-icon .app-icon { height:1.6rem;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.75;width:1.6rem; }
.portal-benefits strong,.portal-benefits small { display:block; }
.portal-benefits strong { font-size:1.08rem; }
.portal-benefits small { font-size:.98rem;margin-top:.15rem; }
.portal-card { background:rgb(255 255 255 / 97%);border-radius:.9rem;box-shadow:0 30px 80px rgb(0 20 45 / 24%);color:#051b47;padding:3.3rem 3rem 2.5rem;position:absolute;right:clamp(3rem,5.2vw,6rem);top:16%;width:min(30.7vw,492px);z-index:3; }
.portal-card-logo { display:block;height:6rem;margin:-1.1rem auto .35rem;object-fit:contain;width:clamp(120px,10vw,160px); }
.portal-card h2 { font-size:clamp(1.7rem,2vw,2.2rem);letter-spacing:-.045em;margin:0; }
.portal-card h2:focus { outline:none; }
.portal-card>p:not(.portal-alert,.portal-success) { color:#64728b;font-size:1.05rem;line-height:1.5;margin:.2rem 0 1rem; }
.portal-alert,.portal-success { border-radius:.5rem;font-size:.82rem;font-weight:700;list-style-position:inside;margin:0 0 1rem;padding:.7rem .85rem; }
.portal-alert { background:#fff0f0;color:#a02121; }.portal-alert:empty { display:none; }.portal-success { background:#eaf9ef;color:#16723b; }
.portal-login-form { display:grid;gap:.85rem; }
.portal-input { align-items:center;background:#fff;border:1px solid #d7dce5;border-radius:.55rem;display:flex;min-height:3.45rem;position:relative; }
.portal-input:focus-within { border-color:#0878f9;box-shadow:0 0 0 3px rgb(8 120 249 / 12%); }
.portal-input-icon { color:#5a6881;flex:0 0 3.7rem;height:1.3rem;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.75;width:1.3rem; }
.portal-input input { border:0;color:#122547;flex:1;font:inherit;font-size:1rem;min-width:0;outline:0;padding:.6rem 0; }
.portal-input input::placeholder { color:#8792a5; }.portal-password-mark { color:#8390a3;flex:0 0 3.5rem;font-size:1.25rem;text-align:center; }
.portal-field-error { background:#fff0f0;bottom:-.85rem;font-size:.66rem;left:.7rem;padding:0 .2rem;position:absolute;z-index:2; }
.portal-submit { align-items:center;background:#0878f9;border:0;border-radius:.55rem;color:#fff;cursor:pointer;display:grid;font:inherit;font-size:1.05rem;font-weight:800;grid-template-columns:1fr auto;min-height:3.45rem;padding:0 1.5rem; }
.portal-submit span:first-child { justify-self:center;transform:translateX(.75rem); }.portal-submit .app-icon { height:1.15rem;stroke:currentColor;stroke-linecap:round;stroke-width:1.8;width:1.15rem; }.portal-submit:hover { background:#006be5; }
.portal-forgot,.portal-development { color:#0878f9;display:block;text-align:center;text-decoration:none; }.portal-forgot { font-weight:750;margin-top:1rem; }.portal-development { font-size:.8rem;margin-top:.6rem;opacity:.72; }
@media(max-width:1100px){.portal-login-page{overflow:auto}.portal-photo{background-position:42% center;position:fixed}.portal-header{left:auto;margin:0 clamp(1.5rem,5vw,3rem);padding-top:1.5rem;position:relative;right:auto}.portal-promise,.portal-card{inset:auto;position:relative}.portal-promise{margin:5rem auto 2rem;width:calc(100% - 3rem)}.portal-promise h1{font-size:clamp(2.8rem,9vw,4.5rem)}.portal-card{margin:0 auto 2rem;max-width:560px;width:calc(100% - 2rem)}}
@media(max-width:600px){.portal-header{left:1rem;padding-top:1rem;right:1rem}.portal-header-logo{width:112px}.portal-language{font-size:.82rem}.portal-promise{margin-top:3.5rem}.portal-promise h1{font-size:clamp(2.65rem,15vw,4rem)}.portal-lead{font-size:1rem;margin-bottom:1.55rem}.portal-benefits{gap:.8rem}.portal-benefit-icon{border-radius:.75rem;flex-basis:2.7rem;height:2.7rem;width:2.7rem}.portal-benefit-icon .app-icon{height:1.3rem;width:1.3rem}.portal-benefits strong{font-size:.9rem}.portal-benefits small{font-size:.8rem}.portal-card{padding:1.55rem 1.25rem 1.7rem}.portal-card-logo{height:5.5rem;margin-top:-.3rem}.portal-card h2{font-size:1.75rem}.portal-card>p:not(.portal-alert,.portal-success){font-size:.92rem}.portal-input,.portal-submit{min-height:3.65rem}}

/* M10 visual parity pass: premium administrative UI + full responsive behavior */
:root { --ink:#092644; --muted:#637b93; --line:#dce5ef; --panel-shadow:0 14px 38px rgba(17,52,86,.075); }
body { background:linear-gradient(135deg,#f7f9fc 0%,#f2f6fb 50%,#eef4fa 100%); }
h1:focus,h2:focus,.page-heading:focus { outline:none; }
.page-heading { margin-bottom:1.55rem; }
.page-heading h1 { color:#071d3b; font-weight:850; letter-spacing:-.045em; }
.page-subtitle { color:#657d96; font-size:.93rem; }
.content-card,.settings-card,.stat-card { border-color:#dbe5ef; box-shadow:var(--panel-shadow); }
.primary-action { background:linear-gradient(135deg,#148aff,#0874ed); border:1px solid #0874ed; border-radius:.62rem; box-shadow:0 9px 22px rgba(8,116,237,.24); transition:box-shadow .15s ease,transform .15s ease; }
.primary-action:hover:not(:disabled) { box-shadow:0 12px 26px rgba(8,116,237,.3); transform:translateY(-1px); }
.secondary-action { transition:background-color .15s ease,border-color .15s ease,transform .15s ease; }
.secondary-action:hover:not(:disabled) { transform:translateY(-1px); }
input,select,textarea { outline:none; transition:border-color .15s ease,box-shadow .15s ease; }
input:focus,select:focus,textarea:focus { border-color:#1685f7!important; box-shadow:0 0 0 3px rgba(22,133,247,.11); }

.dashboard-welcome { align-items:center; background:linear-gradient(115deg,#073b68 0%,#075895 60%,#087cf3 100%); border-radius:1.05rem; box-shadow:0 18px 42px rgba(4,63,111,.2); color:#fff; display:flex; justify-content:space-between; margin-bottom:1.15rem; overflow:hidden; padding:1.55rem 1.75rem; position:relative; }
.dashboard-welcome::after { border:36px solid rgba(255,255,255,.07); border-radius:50%; content:""; height:160px; position:absolute; right:-55px; top:-90px; width:160px; }
.dashboard-kicker { color:#a9d8ff; font-size:.65rem; font-weight:850; letter-spacing:.16em; }
.dashboard-welcome h2 { color:#fff; font-size:1.65rem; margin:.35rem 0 .2rem; }
.dashboard-welcome p { color:#d6ebff; margin:0; }
.dashboard-date { align-items:center; background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.18); border-radius:.7rem; display:flex; font-size:.78rem; font-weight:750; gap:.55rem; padding:.75rem 1rem; text-transform:capitalize; }
.dashboard-date .app-icon,.quick-action-icon .app-icon { height:1.15rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.9; width:1.15rem; }
.stats-grid { gap:1.1rem; }
.stat-card { border-radius:.9rem; min-height:106px; padding:1.15rem; }
.stat-card strong { color:#071d3b; font-size:1.7rem; }
.stat-card div span { font-size:.82rem; }
.stat-icon { border-radius:.72rem; height:48px; width:48px; }
.dashboard-actions { display:grid; gap:1rem; grid-template-columns:repeat(4,minmax(0,1fr)); }
.dashboard-actions>a { align-items:center; background:#fff; border:1px solid #dbe5ef; border-radius:.9rem; box-shadow:var(--panel-shadow); color:#102d4b; display:grid; gap:.85rem; grid-template-columns:auto 1fr auto; min-height:100px; padding:1.15rem 1.25rem; text-decoration:none; transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.dashboard-actions>a:hover { border-color:#a8cdf3; box-shadow:0 16px 34px rgba(14,66,113,.13); transform:translateY(-2px); }
.dashboard-actions>a>span:nth-child(2) { display:grid; min-width:0; }
.dashboard-actions small { color:#71869b; font-size:.72rem; margin-top:.24rem; }
.dashboard-actions b { color:#0878f9; font-size:1.25rem; }
.quick-action-icon { align-items:center; background:#e7f3ff; border-radius:.7rem; color:#0878f9; display:flex; height:44px; justify-content:center; width:44px; }

.admin-panel { border-radius:.95rem; overflow:hidden; padding:0; }
.panel-heading { padding:1.2rem 1.35rem; }
.panel-heading h2 { color:#0a2948; font-size:1.25rem; }
.panel-heading p { font-size:.78rem; }
.search-box,.table-tools select,.application-filters select,.calendar-filters select,.calendar-filters input { border-radius:.6rem; min-height:44px; }
.data-table th { color:#5e748a; font-size:.7rem; font-weight:800; padding:.85rem 1rem; }
.data-table td { color:#36526d; font-size:.81rem; }
.data-table td strong { color:#102f4e; }
.admin-data-table tbody tr:hover { background:#f4f9ff; }
.table-footer { background:#fbfcfe; border-top:1px solid #edf2f6; min-height:58px; }
.status-pill { border-radius:999px; font-size:.7rem; font-weight:800; padding:.36rem .7rem; }

.modal-backdrop { backdrop-filter:blur(4px); background:rgba(9,31,54,.56); }
.dialog-card { border:1px solid rgba(255,255,255,.55); }
.user-detail-dialog { display:flex; flex-direction:column; max-height:calc(100dvh - 2rem); overflow:hidden; }
.user-detail-dialog>header { flex:0 0 auto; }
.user-account-section { flex:0 0 auto; }
.linked-applications { flex:1 1 auto; min-height:0; overflow:auto; }
.user-modal-footer { flex:0 0 auto; }
.field>span { color:#334f6b; font-size:.75rem; font-weight:800; }
.user-profile-grid input,.user-security-column input,.user-security-column select { min-height:48px; }
.user-primary-actions button { min-height:50px; }
.linked-applications .table-scroll { border:1px solid #dce5ee; border-radius:.65rem; }
.linked-applications .data-table th { background:#f7faff; }

.applications-table { min-width:0; table-layout:fixed; }
.applications-table th:nth-child(1){width:10%}.applications-table th:nth-child(2){width:17%}.applications-table th:nth-child(3){width:15%}.applications-table th:nth-child(4){width:10%}.applications-table th:nth-child(5){width:12%}.applications-table th:nth-child(6){width:11%}.applications-table th:nth-child(7){width:16%}.applications-table th:nth-child(8){width:9%}
.applications-table td { overflow:hidden; text-overflow:ellipsis; }

.calendar-filters { background:#fff; border:1px solid #dbe5ef; border-radius:.85rem; box-shadow:0 8px 25px rgba(15,52,87,.05); padding:1rem; }
.month-card { border-radius:.9rem; }
.month-header { padding:.15rem .15rem 1rem; }
.month-header h2 { color:#0a2948; font-size:1.55rem; font-weight:850; }
.calendar-day { background:#fff; min-height:120px; transition:background-color .14s ease,box-shadow .14s ease; }
.calendar-day:hover { background:#f7fbff; box-shadow:inset 0 0 0 1px #9bc9f7; }
.calendar-day>strong { color:#183b5c; font-size:.82rem; }
.calendar-day.outside>strong { color:#b6c3cf; }
.calendar-event { border-left:3px solid #13a962; border-radius:.45rem; padding:.4rem .45rem; }
.calendar-event.consulado { border-left-color:#752ee8; }.calendar-event.ds-160 { border-left-color:#087df5; }.calendar-event.otro { border-left-color:#efaa00; }
.calendar-sidebar .content-card { border-radius:.85rem; box-shadow:0 9px 26px rgba(15,52,87,.06); }
.calendar-legend h3,.upcoming h3 { color:#0c2c4d; font-size:1rem; }
.mini-month header strong { color:#0d2d4e; font-size:.87rem; }

.settings-tabs { gap:1.2rem; margin-bottom:1.25rem; }
.settings-tabs button { font-size:.8rem; padding-left:.9rem; padding-right:.9rem; }
.settings-card { border-radius:.9rem; box-shadow:var(--panel-shadow); padding:1.25rem; }
.settings-card h2 { font-size:1.08rem; }
.settings-card header p { font-size:.76rem; }
.setting-row { min-height:66px; }
.settings-save-bar { bottom:auto; box-shadow:none; position:static; }
.sender-card { padding:1.25rem; }
.provider-grid button { border-radius:.68rem; min-height:68px; }
.template-placeholder { min-height:360px; }

/* Comunicación: espacio de trabajo de plantillas y automatizaciones */
.communication-stack { display:grid; gap:1rem; }
/* Communication settings is a working canvas: never cap it at the generic
   dashboard width, regardless of viewport size. */
.vp-content:has(.settings-page) { margin:0!important; max-width:none!important; padding:1.15rem!important; width:100%!important; }
.email-workspace { display:grid; grid-template-columns:var(--template-list-width,360px) 12px minmax(0,1fr); min-height:570px; overflow:hidden; padding:0; }
.email-template-list { background:#fbfdff; border-right:1px solid var(--line); display:flex; flex-direction:column; min-width:0; padding:1.2rem; }
.email-template-list>header { align-items:flex-start; display:flex; gap:.65rem; justify-content:space-between; }
.email-template-list>header h2,.email-template-panel>header h2 { color:#092746; font-size:1.12rem; margin:0; }
.email-template-list>header p,.email-template-panel>header p { color:var(--muted); font-size:.75rem; margin:.25rem 0 0; }
.email-template-list-heading { min-width:0; }
.email-template-filter { align-items:center; color:#55728e; display:flex; font-size:.67rem; font-weight:800; gap:.4rem; margin-top:.72rem; }
.email-template-filter select { background:#fff; border:1px solid #c9dbe9; border-radius:.4rem; color:#123a5a; font:inherit; min-height:30px; padding:.25rem .45rem; }
.email-create-button { margin:1rem 0; min-height:45px; width:100%; }
.email-pane-size-actions { align-items:center; display:flex; gap:.3rem; }
.email-pane-size-actions button { align-items:center; background:#fff; border:1px solid #c9dbe9; border-radius:.45rem; color:#0878e9; cursor:pointer; display:flex; font-size:1.1rem; font-weight:800; height:30px; justify-content:center; line-height:1; width:30px; }
.email-pane-size-actions button:hover { background:#e7f3ff; border-color:#0878e9; }
.email-create-form { background:#eef6ff; border:1px solid #cfe3f7; border-radius:.7rem; display:grid; gap:.65rem; margin-bottom:.8rem; padding:.8rem; }
.email-create-form label,.email-template-form label,.automation-editor label { color:#294866; display:grid; font-size:.72rem; font-weight:800; gap:.35rem; }
.email-create-form input,.email-template-form input,.email-template-form textarea,.automation-editor input,.automation-editor select { background:#fff; border:1px solid #cad9e7; border-radius:.52rem; color:#14324f; font:inherit; min-height:42px; padding:.65rem .75rem; width:100%; }
.email-create-actions { display:grid; gap:.5rem; grid-template-columns:1fr 1.35fr; }
.email-create-actions button { min-height:42px; }
.email-template-list nav { display:grid; gap:.45rem; }
.email-template-item { align-items:center; background:#fff; border:1px solid #dce7f1; border-radius:.66rem; display:grid; grid-template-columns:minmax(0,1fr) auto; overflow:visible; transition:border-color .15s ease,box-shadow .15s ease; }
.email-template-item:hover { border-color:#a9cff5; }
.email-template-item.selected { background:linear-gradient(135deg,#e8f4ff,#dceeff); border-color:#8ac1f8; box-shadow:0 8px 20px rgba(24,116,205,.1); }
.email-template-item.archived { filter:grayscale(.35); opacity:.66; }
.email-template-item>button { align-items:center; background:transparent; border:0; color:#123351; cursor:pointer; display:grid; gap:.08rem .6rem; grid-template-columns:28px 1fr; min-width:0; padding:.78rem .55rem .78rem .72rem; text-align:left; }
.email-template-item>button>span { color:#087cf3; font-size:1.25rem; grid-row:1/3; }
.email-template-item b,.email-template-item small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.email-template-item b { font-size:.8rem; }.email-template-item small { color:#678097; font-size:.65rem; }
.email-item-actions { align-items:center; display:flex; padding-right:.45rem; }
.email-item-actions button { background:transparent; border:0; border-radius:.35rem; color:#3d5b76; cursor:pointer; font-size:1rem; padding:.42rem; }
.email-item-actions button:hover { background:#dbeeff; color:#086fd8; }
.email-template-menu-host { position:relative; }
.email-template-menu { background:#fff; border:1px solid #cbdceb; border-radius:.55rem; box-shadow:0 12px 28px rgba(10,45,78,.18); display:grid; min-width:178px; padding:.3rem; position:absolute; right:0; top:calc(100% + .25rem); z-index:30; }
.email-template-menu button { border-radius:.38rem; color:#193b59; font-size:.76rem; padding:.58rem .65rem; text-align:left; width:100%; }
.email-template-menu button:hover { background:#eaf4ff; color:#086fd8; }
.email-template-menu button.danger { color:#bd3434; }
.email-template-menu button.danger:hover { background:#fff0f0; color:#a72020; }
.email-list-empty { border:1px dashed #c9dae9; color:#647d95; font-size:.72rem; line-height:1.5; margin:.15rem 0; padding:.9rem; }
.email-template-panel { min-width:0; padding:1.25rem 1.35rem; position:relative; }
.email-template-panel>header { align-items:flex-start; border-bottom:1px solid #e5edf4; display:flex; justify-content:space-between; margin-bottom:1rem; padding-bottom:.9rem; }
.email-status { background:#fff1d4; border-radius:999px; color:#9b6200; font-size:.65rem; font-weight:850; padding:.4rem .7rem; text-transform:capitalize; }
.email-status.publicada { background:#e0f7e9; color:#16753d; }.email-status.archivada { background:#edf0f3; color:#687786; }
.email-template-form { display:grid; gap:1rem; }
.email-template-meta { display:grid; gap:.75rem; grid-template-columns:2fr 1fr; }
.email-subject-field { grid-column:1/-1; }
.email-variable-chips { align-items:center; display:flex; flex-wrap:wrap; gap:.4rem; }
.email-variable-chips>span { color:#526c84; font-size:.69rem; font-weight:800; margin-right:.25rem; }
.email-variable-chips button { background:#e7f3ff; border:0; border-radius:999px; color:#0872dd; cursor:pointer; font-size:.67rem; font-weight:800; padding:.38rem .66rem; }
.email-variable-chips button:hover { background:#d3eaff; }
.email-variable-chips button.custom { background:#ecedff; color:#5145bc; }
.email-rich-editor { border:1px solid #cad9e7; border-radius:.58rem; overflow:hidden; }
.email-editor-toolbar { align-items:center; background:#f3f7fb; border-bottom:1px solid #dce6ef; display:flex; gap:.25rem; min-height:45px; padding:.35rem .55rem; }
.email-editor-toolbar button { align-items:center; background:transparent; border:0; border-radius:.35rem; color:#173957; cursor:pointer; display:flex; font:inherit; height:32px; justify-content:center; width:34px; }
.email-editor-toolbar button:hover { background:#dcecff; color:#0875e7; }.email-editor-toolbar>span { color:#74899d; font-size:.63rem; margin-left:.55rem; }
.email-editor-surface { background:#fff; color:#17334f; font-size:.82rem; line-height:1.6; min-height:235px; outline:0; overflow:auto; padding:.85rem 1rem; }
.email-editor-surface:focus { box-shadow:inset 0 0 0 2px rgba(22,133,247,.12); }
.template-attachments { background:#f8fbfe; border:1px solid #dce7f0; border-radius:.72rem; padding:.85rem; }
.template-attachments>header { align-items:center; display:flex; justify-content:space-between; }
.template-attachments h3 { color:#173957; font-size:.82rem; margin:0; }.template-attachments p { color:#75899d; font-size:.66rem; margin:.2rem 0 0; }
.template-attachments .secondary-action { cursor:pointer; font-size:.7rem; min-height:38px; padding:.55rem .75rem; }.template-attachments input[type=file] { display:none; }
.template-attachment-grid { display:grid; gap:.6rem; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:.75rem; }
.template-attachment-grid article { align-items:center; background:#fff; border:1px solid #d7e3ee; border-radius:.55rem; display:grid; gap:.55rem; grid-template-columns:30px minmax(0,1fr) auto; padding:.65rem; }
.template-attachment-grid article>span { color:#f04444; font-size:1.15rem; }.template-attachment-grid article div { display:grid; min-width:0; }
.template-attachment-grid strong { color:#173956; font-size:.7rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.template-attachment-grid small { color:#71869a; font-size:.62rem; }
.template-attachment-grid button { background:transparent; border:0; color:#60788f; cursor:pointer; font-size:1rem; }
.email-template-form>footer { align-items:center; border-top:1px solid #e6edf4; display:flex; gap:.6rem; justify-content:flex-end; padding-top:1rem; }
.email-test-row { align-items:center; background:#f5f9fd; border:1px solid #dbe6f0; border-radius:.7rem; display:grid; gap:.75rem; grid-template-columns:minmax(190px,1fr) minmax(220px,1fr) auto; padding:.85rem; }.email-test-row>div { display:grid; }.email-test-row strong { color:#173956; font-size:.76rem; }.email-test-row small { color:#71869b; font-size:.65rem; }.email-test-row input { background:#fff; border:1px solid #cad9e7; border-radius:.52rem; min-height:42px; padding:.65rem .75rem; }
.email-empty-editor { align-items:center; color:#637c93; display:flex; flex-direction:column; height:100%; justify-content:center; min-height:450px; text-align:center; }
.email-empty-editor h2 { color:#102f4e; margin:.9rem 0 .3rem; }.email-empty-editor p { font-size:.76rem; }
.email-preview { background:#fff; border:1px solid #cbdbe9; border-radius:.75rem; box-shadow:0 22px 60px rgba(7,37,66,.18); inset:1rem; overflow:auto; padding:1.25rem; position:absolute; z-index:3; }
.email-preview>header { border-bottom:1px solid #e5edf4; display:flex; justify-content:space-between; margin-bottom:1rem; padding-bottom:.75rem; }.email-preview>header button { background:transparent; border:0; cursor:pointer; font-size:1.2rem; }

/* Visor simple de plantillas: lista, correo real y configuración */
.email-viewer-workspace { grid-template-columns:var(--template-list-width,360px) 12px minmax(0,1fr); min-height:680px; }
.email-reauthorization-notice { border-left:4px solid #e5a000; background:#fff7df; color:#694800; }
.email-viewer-panel { padding:1.1rem; }
.email-viewer-heading { margin-bottom:.85rem!important; padding:.15rem .15rem .85rem!important; }
.email-viewer-layout { align-items:stretch; display:grid; gap:0; grid-template-columns:minmax(420px,1fr) 12px var(--template-settings-width,390px); }
.email-pane-resizer { cursor:col-resize; min-width:12px; position:relative; touch-action:none; z-index:2; }
.email-pane-resizer::before { background:#d7e3ee; border-radius:999px; content:""; inset:28% 3px; position:absolute; transition:background-color .15s ease,transform .15s ease; }
.email-pane-resizer:hover::before,.email-pane-resizer.dragging::before { background:#087df5; transform:scaleX(1.45); }
.email-viewer-stage { background:#eef3f8; border:1px solid #d8e4ee; border-radius:.85rem; display:flex; flex-direction:column; min-width:0; overflow:hidden; }
.email-viewer-toolbar { align-items:center; background:#fff; border-bottom:1px solid #dce6ef; display:flex; justify-content:space-between; min-height:60px; padding:.65rem .8rem; }
.email-device-switch { background:#eef4f9; border-radius:.55rem; display:flex; padding:.22rem; }
.email-device-switch button { background:transparent; border:0; border-radius:.42rem; color:#617a91; cursor:pointer; font-size:.68rem; font-weight:800; min-height:34px; padding:.45rem .75rem; }
.email-device-switch button.active { background:#fff; box-shadow:0 2px 8px rgba(11,54,91,.12); color:#0878e9; }
.email-preview-canvas { align-items:flex-start; display:flex; flex:1; justify-content:center; min-height:470px; overflow:auto; padding:1.25rem; }
.email-message-preview { background:#fff; border:1px solid #dce5ed; border-radius:.55rem; box-shadow:0 12px 30px rgba(17,55,88,.1); max-width:720px; overflow:hidden; transition:max-width .18s ease; width:100%; }
.email-message-preview.mobile { max-width:390px; }
.email-message-preview>header { background:#f8fafc; border-bottom:1px solid #e1e8ef; display:grid; gap:.18rem; padding:.8rem 1rem; }
.email-message-preview>header small { color:#7b90a3; font-size:.58rem; font-weight:900; letter-spacing:.08em; }
.email-message-preview>header strong { color:#183957; font-size:.78rem; line-height:1.4; }
.email-rendered-body { color:#18334d; font-family:Arial,sans-serif; font-size:13px; line-height:1.5; overflow-wrap:anywhere; padding:1.05rem; }
.email-rendered-body img { height:auto; max-width:100%; }
.email-rendered-body table { border-collapse:collapse; max-width:100%; }
.email-content-editor { background:#fff; flex:1; padding:1rem; }
.email-content-editor>p { color:#74899d; font-size:.64rem; margin:.55rem 0 0; }
.email-content-editor .email-editor-surface { min-height:425px; }
.email-editor-guidance { background:#eaf4ff; border-left:4px solid #087ff5; border-radius:.5rem; color:#294866; display:grid; gap:.2rem; margin-bottom:.8rem; padding:.7rem .8rem; }
.email-editor-guidance strong { color:#092746; font-size:.8rem; }
.email-editor-guidance span { font-size:.68rem; line-height:1.45; }
.email-editor-toolbar-actions { align-items:center; display:flex; flex-wrap:wrap; gap:.6rem; justify-content:flex-end; }
.email-viewer-test { border:0; border-radius:0; border-top:1px solid #dce6ef; margin:0; }
.email-viewer-settings { background:#fff; border:1px solid #dce6ef; border-radius:.85rem; display:flex; flex-direction:column; margin-left:0; min-width:0; overflow:hidden; padding:1rem; }
.email-viewer-meta { grid-template-columns:1fr; }
.email-viewer-meta .email-subject-field { grid-column:auto; }
.email-viewer-variables { border-top:1px solid #e5edf4; margin-top:.9rem; padding-top:.9rem; }
.email-viewer-variables h3 { color:#173957; font-size:.82rem; margin:0; }
.email-viewer-variables>p { color:#75899d; font-size:.64rem; margin:.2rem 0 .7rem; }
.email-viewer-variables .email-variable-chips { max-height:125px; overflow:auto; }
.email-viewer-attachments { border-left:0; border-right:0; border-radius:0; margin:1rem -1rem 0; padding:1rem; }
.email-viewer-attachments>header { align-items:flex-start; gap:.65rem; }
.email-viewer-attachments .template-attachment-grid { grid-template-columns:1fr; }
.email-viewer-attachments .template-attachment-grid>p { grid-column:1/-1; }
.email-attachments-empty { background:#fff; border:1px dashed #cad9e6; border-radius:.55rem; padding:.7rem; }
.email-attachment-limit { color:#7a8ea1; display:block; font-size:.61rem; margin-top:.65rem; }
.email-viewer-settings>footer { align-items:stretch; border-top:1px solid #e5edf4; display:grid; gap:.55rem; grid-template-columns:1fr 1fr; margin-top:auto; padding-top:1rem; }
.email-viewer-settings>footer button { min-width:0; }
.automation-workspace>header { align-items:center; display:grid; gap:.85rem; grid-template-columns:auto 1fr auto; }
.automation-editor { background:#f5f9fd; border:1px solid #dbe6f0; border-radius:.7rem; display:grid; gap:.7rem; grid-template-columns:1.3fr 1.3fr 1.4fr 1.2fr .8fr auto auto; margin-top:1rem; padding:.85rem; }
.switch-label { align-items:center; align-self:end; display:flex!important; flex-direction:row; min-height:42px; white-space:nowrap; }.switch-label input { accent-color:#087cf3; min-height:0!important; width:auto!important; }
.automation-list { display:grid; gap:.55rem; margin-top:1rem; }
.automation-list article { align-items:center; border-top:1px solid #e6edf4; display:flex; justify-content:space-between; padding:.75rem .2rem .15rem; }
.automation-list article div { display:grid; }.automation-list strong { color:#173956; font-size:.78rem; }.automation-list small,.automation-list>p { color:#71869b; font-size:.67rem; }
.automation-form-actions { align-items:end; display:flex; gap:.55rem; justify-content:flex-end; }.automation-form-actions button { min-height:42px; min-width:110px; }.automation-row-actions { align-items:center; display:flex!important; gap:.55rem; grid-template-columns:none!important; }
.email-history-card>header { align-items:center; display:flex; gap:.8rem; }.email-history-card>div { display:grid; margin-top:.85rem; }.email-history-card article { align-items:center; border-top:1px solid #e7edf3; display:flex; justify-content:space-between; padding:.75rem .15rem; }.email-history-card article>div { display:grid; }.email-history-card article strong { color:#173956; font-size:.75rem; }.email-history-card article small,.email-history-empty { color:#71869b; font-size:.65rem; }.email-history-status { background:#eaf0f5; border-radius:999px; color:#526b82; font-size:.62rem; font-weight:850; padding:.35rem .65rem; }.email-history-status.enviado { background:#dff6e8; color:#15743d; }.email-history-status.error { background:#ffebeb; color:#aa2828; }
.prepared-email-backdrop { z-index:1200; }
.prepared-email-dialog { max-width:1050px; width:min(1050px,calc(100vw - 2rem)); }
.prepared-email-body { display:grid; gap:1rem; padding:1.15rem 1.35rem; }
.prepared-email-selection { align-items:end; background:#f5f9fd; border:1px solid #dce7f0; border-radius:.75rem; display:grid; gap:.8rem; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; padding:.9rem; }
.prepared-email-selection label,.prepared-email-editor label { color:#294866; display:grid; font-size:.72rem; font-weight:800; gap:.35rem; }
.prepared-email-selection select,.prepared-email-editor input { background:#fff; border:1px solid #cad9e7; border-radius:.52rem; color:#14324f; min-height:44px; padding:.65rem .75rem; width:100%; }
.prepared-email-editor { display:grid; gap:.8rem; grid-template-columns:1fr 1.5fr; }
.prepared-email-content { grid-column:1/-1; }
.prepared-email-files { background:#f8fbfe; border:1px solid #dce7f0; border-radius:.75rem; padding:.9rem; }
.prepared-email-files>header { align-items:center; display:flex; gap:1rem; justify-content:space-between; }
.prepared-email-files h3 { color:#173957; font-size:.9rem; margin:0; }.prepared-email-files p { color:#71869b; font-size:.7rem; margin:.2rem 0 0; }
.prepared-email-files label.secondary-action { cursor:pointer; font-size:.72rem; }.prepared-email-files input[type=file] { display:none; }
.prepared-email-file-groups { display:grid; gap:.8rem; grid-template-columns:1fr 1fr; margin-top:.85rem; }
.prepared-email-file-groups>div { background:#fff; border:1px solid #e0e9f1; border-radius:.62rem; display:grid; gap:.45rem; padding:.75rem; }
.prepared-email-file-groups>div>strong { color:#294866; font-size:.7rem; text-transform:uppercase; }.prepared-email-file-groups>div>small { color:#7b8fa2; font-size:.68rem; }
.prepared-email-file-groups article { align-items:center; border-top:1px solid #edf2f6; display:grid; gap:.55rem; grid-template-columns:28px minmax(0,1fr) auto; padding:.55rem 0 0; }
.prepared-email-file-groups article div { display:grid; min-width:0; }.prepared-email-file-groups article b { color:#183a58; font-size:.72rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.prepared-email-file-groups article small { color:#7a8fa3; font-size:.63rem; }
.prepared-file-icon { align-items:center; background:#e8f3ff; border-radius:.42rem; color:#0878e9; display:flex; height:28px; justify-content:center; }.prepared-file-tag { background:#e3f1ff; border-radius:999px; color:#0871d9; font-size:.6rem; font-weight:800; padding:.28rem .5rem; }
.prepared-email-file-groups article button { background:transparent; border:0; color:#d13b3b; cursor:pointer; font-size:1rem; }
.prepared-email-total { text-align:right; }.prepared-email-footer { border-top:1px solid var(--line); display:flex; gap:.7rem; justify-content:flex-end; padding:1rem 1.35rem; }
.prepared-email-empty { color:#657e95; padding:2rem; text-align:center; }
.notification-variables-card>header { align-items:center; display:grid; gap:.85rem; grid-template-columns:auto 1fr auto; }.notification-variable-form { background:#f5f9fd; border:1px solid #dbe6f0; border-radius:.7rem; display:grid; gap:.7rem; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:1rem; padding:.85rem; }.notification-variable-form label { color:#294866; display:grid; font-size:.7rem; font-weight:800; gap:.32rem; }.notification-variable-form input,.notification-variable-form select { background:#fff; border:1px solid #cad9e7; border-radius:.5rem; min-height:42px; padding:.62rem .72rem; }.notification-variable-form button { align-self:end; min-height:42px; }.notification-variable-list { display:grid; gap:.55rem; grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:1rem; }.notification-variable-list article { align-items:center; border:1px solid #dce6ef; border-radius:.6rem; display:flex; justify-content:space-between; padding:.75rem; }.notification-variable-list article.inactive { opacity:.58; }.notification-variable-list article>div { align-items:center; display:grid; gap:.12rem .55rem; grid-template-columns:auto 1fr; min-width:0; }.notification-variable-list code { background:#e7f3ff; border-radius:999px; color:#0872dd; font-size:.64rem; grid-row:1/3; padding:.35rem .55rem; }.notification-variable-list strong { color:#173956; font-size:.72rem; }.notification-variable-list small { color:#71869b; font-size:.62rem; }.notification-variable-list .secondary-action { font-size:.65rem; min-height:35px; padding:.4rem .6rem; }
.notification-variable-form-actions { align-items:end; display:flex; gap:.55rem; grid-column:1/-1; justify-content:flex-end; }.notification-variable-form-actions button { min-width:140px; }.notification-variable-actions { display:flex!important; gap:.45rem!important; grid-template-columns:none!important; margin-left:.65rem; }.variable-delete-action { background:#fff6f6; border:1px solid #f1bcbc; border-radius:.5rem; color:#c82d2d; cursor:pointer; font-size:.65rem; font-weight:800; min-height:35px; padding:.4rem .65rem; }.variable-delete-action:hover { background:#ffe9e9; border-color:#e89393; }
.admin-toast { border-radius:.6rem; bottom:1rem; box-shadow:0 12px 30px rgba(0,0,0,.14); color:#fff; font-size:.76rem; font-weight:750; padding:.8rem 1rem; position:fixed; right:1rem; z-index:100; }.admin-toast-success { background:#16844a; }.admin-toast-error { background:#b93232; }
@media(max-width:1250px){.email-viewer-layout{grid-template-columns:minmax(390px,1fr) 10px var(--template-settings-width,340px)}.email-viewer-settings{min-height:0}.email-viewer-attachments .template-attachment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1100px){.email-workspace,.email-viewer-workspace{grid-template-columns:var(--template-list-width,360px) 10px minmax(0,1fr)}.automation-editor,.notification-variable-form{grid-template-columns:repeat(3,minmax(0,1fr))}.template-attachment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.vp-content:has(.communication-stack){padding:1rem}.email-workspace{display:block}.email-pane-resizer{display:none}.email-template-list{border-bottom:1px solid var(--line);border-right:0}.email-template-list nav{grid-template-columns:repeat(2,minmax(0,1fr))}.email-template-panel{min-height:500px}.email-template-meta{grid-template-columns:1fr}.email-subject-field{grid-column:auto}.automation-editor{grid-template-columns:1fr 1fr}.email-viewer-layout{display:block}.email-viewer-settings{margin-top:1rem}.email-preview-canvas{min-height:400px}}
@media(max-width:600px){.email-template-list nav,.automation-editor,.template-attachment-grid,.email-test-row,.notification-variable-form,.notification-variable-list{grid-template-columns:1fr}.email-template-panel{padding:1rem}.email-template-form>footer,.template-attachments>header,.automation-workspace>header,.notification-variables-card>header{align-items:stretch;display:flex;flex-direction:column}.email-template-form>footer button{width:100%}.email-editor-toolbar>span{display:none}.notification-variable-form-actions,.notification-variable-actions,.automation-form-actions{align-items:stretch;flex-direction:column}.notification-variable-form-actions button,.automation-form-actions button{width:100%}.automation-list article{align-items:flex-start;gap:.7rem}.automation-row-actions{align-items:flex-end;flex-direction:column}}
@media(max-width:820px){.prepared-email-selection,.prepared-email-editor,.prepared-email-file-groups{grid-template-columns:1fr}.prepared-email-content{grid-column:auto}.prepared-email-files>header{align-items:stretch;flex-direction:column}.prepared-email-footer{align-items:stretch;flex-direction:column-reverse}.prepared-email-footer button{width:100%}}

@media (max-height:800px) and (min-width:821px) {
  .user-modal-backdrop { padding:.75rem; }
  .user-detail-dialog { max-height:calc(100dvh - 1.5rem); }
  .user-detail-dialog>header { padding:.9rem 1.4rem; }
  .user-detail-dialog>header h2 { font-size:1.45rem; }
  .user-account-section { gap:1.1rem; padding:1rem 1.5rem 1.1rem; }
  .user-profile-grid { gap:.7rem; grid-template-columns:60px repeat(3,minmax(0,1fr)); }
  .user-avatar { height:58px; width:58px; }
  .user-profile-grid input,.user-security-column input,.user-security-column select { min-height:42px; }
  .user-primary-actions { gap:.7rem; margin-top:.8rem; }
  .user-primary-actions button { min-height:43px; }
  .user-security-column { gap:.55rem; }
  .inline-control .secondary-action { min-height:42px; }
  .linked-applications { padding:1rem 1.5rem; }
  .modal-section-heading { margin-bottom:.7rem; }
  .data-table th,.data-table td { padding:.7rem .8rem; }
  .user-modal-footer { padding:.75rem 1.5rem; }
}
@media (max-width:1280px) and (min-width:821px) {
  .dashboard-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .applications-table,.applications-table tbody,.applications-table tr,.applications-table td { display:block; width:100%; }
  .applications-table thead { display:none; }
  .applications-table tbody { display:grid; gap:.8rem; padding:.9rem; }
  .applications-table tr { border:1px solid #dce6ef; border-radius:.75rem; display:grid; gap:0; grid-template-columns:repeat(4,minmax(0,1fr)); overflow:hidden; }
  .applications-table td { border:0; min-width:0; padding:.7rem .85rem; }
  .applications-table td::before { color:#7a8fa3; content:attr(data-label); display:block; font-size:.61rem; font-weight:800; letter-spacing:.04em; margin-bottom:.22rem; text-transform:uppercase; }
  .applications-table td:nth-child(n+5) { border-top:1px solid #edf2f6; }
}
@media (max-width:980px) {
  .dashboard-actions { grid-template-columns:1fr; }
  .dashboard-welcome { align-items:flex-start; flex-direction:column; gap:1rem; }
  .user-account-section { grid-template-columns:1fr; }
}
@media (max-width:820px) {
  .page-heading { align-items:flex-start; }
  .admin-heading h1 { font-size:2rem; }
  .admin-panel { overflow:visible; }
  .data-table,.data-table tbody,.data-table tr,.data-table td { display:block; min-width:0; width:100%; }
  .data-table thead { display:none; }
  .data-table tbody { display:grid; gap:.75rem; padding:.75rem; }
  .data-table tr { background:#fff; border:1px solid #dce6ef; border-radius:.72rem; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:hidden; }
  .data-table td { border:0; min-width:0; padding:.65rem .75rem; }
  .data-table td::before { color:#7a8fa3; content:attr(data-label); display:block; font-size:.6rem; font-weight:800; letter-spacing:.04em; margin-bottom:.2rem; text-transform:uppercase; }
  .data-table td:nth-child(n+3) { border-top:1px solid #edf2f6; }
  .user-detail-dialog { max-height:calc(100dvh - 1rem); }
  .linked-applications .table-scroll { border:0; }
}
@media (max-width:640px) {
  .dashboard-welcome { border-radius:.85rem; padding:1.25rem; }
  .dashboard-welcome h2 { font-size:1.4rem; }
  .dashboard-date { width:100%; }
  .stat-card { min-height:88px; }
  .data-table tr { grid-template-columns:1fr; }
  .data-table td:nth-child(n+2) { border-top:1px solid #edf2f6; }
  .application-filters { grid-template-columns:1fr; }
  .application-filters .search-box { grid-column:auto; }
  .user-profile-grid { grid-template-columns:58px 1fr; }
  .user-account-section { padding-top:1rem; }
  .settings-tabs { gap:.2rem; }
  .settings-tabs button { font-size:.72rem; padding:.6rem .55rem; }
  .settings-tabs form { flex-basis:100%; }
  .settings-tabs .logout-tab { color:#b92f2f; text-align:left; width:100%; }
}
