/* ============================================================
   GENNOW, Portal app-shell + module styles (shared)
   Loads after gennow.css. Mirrors portal.html's inline shell so
   new portal pages (Profile, Readiness, BYOG, Vault) match.
   ============================================================ */
:root{
  --pbg:#ECEFF3; --card:#fff; --pline:#E2E7EC; --pline2:#EDF0F3;
  --slate:#1B2730; --mut:#5C6873; --mut2:#8A949C;
  --accent:#176F89; --accent-weak:#E7F1F4; --warn:#E0533B; --good:#3C7A22;
}
body.portal{background:var(--pbg);color:var(--slate);font-size:15px;}
.portal h1,.portal h2{font-family:var(--font-display);letter-spacing:-.012em;color:var(--slate);}
.portal h3,.portal h4{font-family:var(--font-body);letter-spacing:0;color:var(--slate);}

/* app bar */
.appbar{position:sticky;top:0;z-index:60;background:#fff;border-bottom:1px solid var(--pline);}
.appbar-inner{height:60px;display:flex;align-items:center;justify-content:space-between;gap:18px;}
.ab-left{display:flex;align-items:center;gap:12px;}
.ab-left img{height:38px;}
.ab-tag{font-size:.66rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--mut2);border:1px solid var(--pline);border-radius:5px;padding:.2rem .45rem;}
.ab-right{display:flex;align-items:center;gap:6px;}
.ab-txtbtn{background:none;border:0;cursor:pointer;color:var(--mut);font-family:var(--font-body);font-weight:600;font-size:.84rem;padding:.4rem .6rem;border-radius:6px;text-decoration:none;}
.ab-txtbtn:hover{background:var(--pbg);color:var(--slate);}
.ab-userpill{display:flex;align-items:center;gap:9px;background:var(--pbg);border:1px solid var(--pline);border-radius:999px;padding:.25rem .7rem .25rem .35rem;}
.ab-userpill .av{width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:800;font-size:.74rem;}
.ab-userpill .nm{font-size:.82rem;font-weight:700;color:var(--slate);}

/* sub-nav (portal tabs) */
.subnav{background:#fff;border-bottom:1px solid var(--pline);position:sticky;top:60px;z-index:55;}
.subnav-inner{display:flex;gap:4px;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.subnav a{display:inline-flex;align-items:center;gap:.45rem;padding:14px 14px 12px;font-size:.88rem;font-weight:600;color:var(--mut);
  border-bottom:2px solid transparent;white-space:nowrap;text-decoration:none;transition:.12s;}
.subnav a svg{width:1.05em;height:1.05em;}
.subnav a:hover{color:var(--slate);}
.subnav a.on{color:var(--accent);border-bottom-color:var(--accent);}
.subnav a .pluspill{font-size:.62rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--good);background:#E4F1E5;border-radius:4px;padding:.1rem .3rem;}

/* page */
.page{padding:26px 0 70px;}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;margin-bottom:18px;}
.page-head h1{font-size:1.7rem;font-weight:800;margin:0;letter-spacing:-.015em;}
.page-head .ph-sub{color:var(--mut);font-size:.92rem;margin-top:3px;}
.cols{display:grid;grid-template-columns:1fr 340px;gap:22px;align-items:start;}
@media(max-width:920px){.cols{grid-template-columns:1fr;}}

/* card */
.card{background:var(--card);border:1px solid var(--pline);border-radius:10px;box-shadow:0 1px 2px rgba(11,40,55,.04);}
.card + .card{margin-top:20px;}
.card-h{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 20px;border-bottom:1px solid var(--pline2);}
.card-h h3{font-size:1rem;font-weight:700;margin:0;}
.card-h .meta{font-size:.8rem;color:var(--mut2);font-weight:600;}
.card-b{padding:20px;}

/* chips / pills */
.chip{display:inline-flex;align-items:center;gap:6px;font-size:.76rem;font-weight:700;padding:.28rem .6rem;border-radius:6px;white-space:nowrap;}
.chip .cd{width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.8;}
.chip-gray{background:#EDF0F3;color:#5A6772;}
.chip-blue{background:#E4EFF4;color:#15657F;}
.chip-amber{background:#FAEFD4;color:#946312;}
.chip-green{background:#E4F1E5;color:#3C7A22;}
.chip-red{background:#F6E7E2;color:#A8442A;}

/* bars */
.infobar{display:flex;gap:11px;background:#fff;border:1px solid var(--pline);border-left:3px solid var(--accent);border-radius:8px;padding:13px 15px;font-size:.88rem;color:var(--slate);margin-bottom:20px;line-height:1.45;}
.infobar svg{width:18px;height:18px;color:var(--accent);flex:0 0 auto;margin-top:1px;}
.infobar b{font-weight:700;}

/* buttons */
.btn-sm{font-size:.82rem;font-weight:700;padding:.5rem .95rem;border-radius:7px;border:0;cursor:pointer;background:var(--accent);color:#fff;font-family:var(--font-body);display:inline-flex;align-items:center;gap:.4rem;text-decoration:none;}
.btn-sm:hover{background:var(--teal-700);}
.btn-sm svg{width:1.05em;height:1.05em;}
.btn-sm.ghost{background:#fff;border:1px solid var(--pline);color:var(--slate);}
.btn-sm.ghost:hover{background:var(--pbg);}
.btn-sm.good{background:var(--good);}
.btn-sm.good:hover{background:#346a1d;}
.btn-sm[disabled]{opacity:.55;cursor:not-allowed;}

/* tiles */
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:22px;}
@media(max-width:620px){.tiles{grid-template-columns:1fr;}}
.tile{background:#fff;border:1px solid var(--pline);border-radius:10px;padding:18px 20px;}
.tile b{display:block;font-size:1.7rem;font-weight:800;line-height:1;font-family:var(--font-display);}
.tile span{font-size:.84rem;color:var(--mut);}

/* key-value */
.kv{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--pline2);font-size:.9rem;}
.kv:last-child{border-bottom:0;}
.kv .k{color:var(--mut);}
.kv .v{font-weight:600;text-align:right;}

/* editable profile fields */
.pfield{padding:14px 0;border-bottom:1px solid var(--pline2);}
.pfield:last-child{border-bottom:0;}
.pfield .pl{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--mut2);margin-bottom:5px;display:flex;justify-content:space-between;align-items:center;}
.pfield .pv{font-size:.95rem;line-height:1.55;color:var(--slate);white-space:pre-wrap;}
.pfield .pv.empty{color:var(--mut2);font-style:italic;}
.pfield input,.pfield textarea,.pfield select{width:100%;border:1px solid #C9D0D6;border-radius:8px;padding:.6rem .7rem;font-family:var(--font-body);font-size:.93rem;color:var(--slate);background:#fff;}
.pfield textarea{min-height:90px;resize:vertical;line-height:1.5;}
.pfield input:focus,.pfield textarea:focus,.pfield select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(23,111,137,.13);}
.editlink{background:none;border:0;color:var(--accent);font-family:var(--font-body);font-weight:700;font-size:.78rem;cursor:pointer;display:inline-flex;align-items:center;gap:5px;}
.editlink svg{width:13px;height:13px;}
.pgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 22px;}
@media(max-width:560px){.pgrid{grid-template-columns:1fr;}}

/* tag inputs */
.taglist{display:flex;flex-wrap:wrap;gap:7px;margin-top:4px;}
.taglist .tg{display:inline-flex;align-items:center;gap:6px;background:var(--accent-weak);color:var(--accent);border-radius:999px;padding:.3rem .7rem;font-size:.83rem;font-weight:600;}
.taglist .tg .d{width:6px;height:6px;border-radius:50%;background:currentColor;}

/* program cards */
.prog-card{border:1px solid var(--pline);border-radius:10px;padding:16px 18px;margin-bottom:14px;background:#fff;}
.prog-card:last-child{margin-bottom:0;}
.prog-card .pc-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}
.prog-card h4{font-size:1rem;font-weight:700;margin:0;}
.prog-card .pc-desc{font-size:.9rem;color:var(--mut);margin:6px 0 10px;line-height:1.5;}
.prog-card .pc-stats{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:.83rem;}
.prog-card .pc-stats .st b{color:var(--slate);}
.prog-card .pc-stats .st span{color:var(--mut2);}
.prog-card .pc-out{margin-top:10px;font-size:.86rem;color:var(--slate);background:#F4F7F9;border-radius:8px;padding:9px 12px;}
.prog-card .pc-out b{color:var(--accent);}

/* documents */
.doclist{display:flex;flex-direction:column;}
.docrow{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--pline2);}
.docrow:last-child{border-bottom:0;}
.docrow .dico{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;flex:0 0 auto;}
.docrow.up .dico{background:#E4F1E5;color:var(--good);}
.docrow.miss .dico{background:#F6E7E2;color:#A8442A;}
.docrow .dico svg{width:17px;height:17px;}
.docrow .dn{font-weight:600;font-size:.9rem;}
.docrow .dm{font-size:.78rem;color:var(--mut2);}
.docrow .dact{margin-left:auto;}

/* readiness gauge */
.gauge{display:flex;align-items:center;gap:22px;flex-wrap:wrap;}
.gauge .ring{--p:0;width:128px;height:128px;border-radius:50%;flex:0 0 auto;
  background:conic-gradient(var(--accent) calc(var(--p)*1%), #E3E8EC 0);display:grid;place-items:center;position:relative;}
.gauge .ring::before{content:"";position:absolute;inset:13px;border-radius:50%;background:#fff;}
.gauge .ring .num{position:relative;text-align:center;}
.gauge .ring .num b{font-family:var(--font-display);font-weight:800;font-size:2rem;line-height:1;color:var(--slate);display:block;}
.gauge .ring .num span{font-size:.72rem;color:var(--mut2);font-weight:700;}
.gauge .gtext h3{font-size:1.2rem;margin:0 0 4px;}
.gauge .gtext p{margin:0;color:var(--mut);font-size:.9rem;max-width:40ch;}
.glabel{display:inline-block;font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;padding:.25rem .6rem;border-radius:6px;margin-top:8px;}
.glabel.ready{background:#E4F1E5;color:var(--good);}
.glabel.near{background:#FAEFD4;color:#946312;}
.glabel.build{background:#FCE9E2;color:#A8442A;}

.rcheck{list-style:none;margin:0;padding:0;}
.rcheck li{display:flex;gap:11px;align-items:flex-start;padding:11px 0;border-bottom:1px solid var(--pline2);}
.rcheck li:last-child{border-bottom:0;}
.rcheck .rc-ic{width:22px;height:22px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;margin-top:1px;}
.rcheck li.ok .rc-ic{background:#E4F1E5;color:var(--good);}
.rcheck li.no .rc-ic{background:#EFE3DD;color:#A8442A;}
.rcheck .rc-ic svg{width:13px;height:13px;}
.rcheck .rc-tx{flex:1;}
.rcheck .rc-tx b{font-weight:600;font-size:.9rem;}
.rcheck li.no .rc-tx b{color:var(--slate);}
.rcheck .rc-tx .rc-fix{font-size:.82rem;color:var(--accent);margin-top:2px;}
.rcheck .rc-w{font-size:.72rem;color:var(--mut2);font-weight:700;white-space:nowrap;}

.rec-list{list-style:none;margin:0;padding:0;}
.rec-list li{display:flex;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--pline);border-radius:8px;margin-bottom:8px;font-size:.88rem;}
.rec-list li .rn{width:22px;height:22px;border-radius:6px;background:var(--accent-weak);color:var(--accent);display:grid;place-items:center;font-weight:800;font-size:.78rem;flex:0 0 auto;}

/* dropzone (BYOG) */
.drop{border:2px dashed #C2CCD4;border-radius:12px;padding:34px 22px;text-align:center;background:#fff;transition:.15s;cursor:pointer;}
.drop.over{border-color:var(--accent);background:var(--accent-weak);}
.drop .dz-ic{width:52px;height:52px;border-radius:50%;background:var(--accent-weak);color:var(--accent);display:grid;place-items:center;margin:0 auto 12px;}
.drop .dz-ic svg{width:26px;height:26px;}
.drop h3{font-size:1.1rem;margin:0 0 5px;}
.drop p{color:var(--mut);font-size:.9rem;margin:0;}
.drop .formats{margin-top:12px;display:flex;gap:7px;justify-content:center;flex-wrap:wrap;}
.drop .formats span{font-size:.72rem;font-weight:700;color:var(--mut2);background:var(--pbg);border-radius:5px;padding:.2rem .5rem;}
.paste-row{display:flex;gap:10px;margin-top:14px;}
.paste-row input{flex:1;border:1px solid #C9D0D6;border-radius:8px;padding:.65rem .8rem;font-family:var(--font-body);font-size:.9rem;}
.byog-ta{width:100%;border:1px solid #C9D0D6;border-radius:10px;padding:.8rem .9rem;font-family:var(--font-body);font-size:.92rem;min-height:150px;resize:vertical;color:var(--slate);line-height:1.5;}
.byog-ta:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(23,111,137,.13);}

.analyzing{display:flex;align-items:center;gap:12px;padding:16px;color:var(--accent);font-weight:600;}
.pspin{width:18px;height:18px;border:2px solid rgba(23,111,137,.3);border-top-color:var(--accent);border-radius:50%;animation:pspin .7s linear infinite;}
@keyframes pspin{to{transform:rotate(360deg);}}

.req-list{list-style:none;margin:0;padding:0;}
.req-list li{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid var(--pline2);font-size:.9rem;}
.req-list li:last-child{border-bottom:0;}
.req-list li svg{width:17px;height:17px;flex:0 0 auto;margin-top:2px;color:var(--accent);}

/* vault */
.vault-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;}
@media(max-width:680px){.vault-grid{grid-template-columns:1fr;}}
.vault-item{border:1px solid var(--pline);border-radius:10px;padding:16px 18px;background:#fff;display:flex;flex-direction:column;gap:8px;transition:.15s;}
.vault-item:hover{border-color:var(--accent);box-shadow:0 4px 14px rgba(11,40,55,.07);}
.vault-item .vtop{display:flex;align-items:center;gap:10px;}
.vault-item .vic{width:34px;height:34px;border-radius:8px;background:var(--accent-weak);color:var(--accent);display:grid;place-items:center;flex:0 0 auto;}
.vault-item .vic svg{width:17px;height:17px;}
.vault-item h4{font-size:.96rem;font-weight:700;margin:0;}
.vault-item .vmeta{font-size:.78rem;color:var(--mut2);}
.vault-item .vdesc{font-size:.86rem;color:var(--mut);margin:0;line-height:1.5;flex:1;}
.vault-item .vfoot{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}

.modal-back{position:fixed;inset:0;background:rgba(27,39,48,.55);z-index:300;display:none;align-items:flex-start;justify-content:center;padding:34px 18px;overflow-y:auto;}
.modal-back.open{display:flex;}
.modal-sheet{background:#fff;border-radius:12px;max-width:640px;width:100%;box-shadow:0 24px 60px rgba(11,40,55,.3);margin:auto;overflow:hidden;}
.modal-sheet .ms-h{padding:18px 22px;border-bottom:1px solid var(--pline);display:flex;justify-content:space-between;align-items:center;}
.modal-sheet .ms-h h3{margin:0;font-size:1.1rem;font-weight:800;}
.modal-sheet .ms-x{background:var(--pbg);border:0;width:32px;height:32px;border-radius:7px;cursor:pointer;font-size:1rem;color:var(--mut);}
.modal-sheet .ms-b{padding:22px;}
.ai-out{background:var(--accent-weak);border:1px solid #CFE6EC;border-radius:10px;padding:14px 16px;font-size:.92rem;line-height:1.6;color:var(--slate);white-space:pre-wrap;}

.savetoast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%) translateY(20px);background:var(--slate);color:#fff;
  padding:.7rem 1.2rem;border-radius:999px;font-size:.86rem;font-weight:600;box-shadow:0 10px 30px rgba(0,0,0,.25);opacity:0;transition:.25s;z-index:500;pointer-events:none;}
.savetoast.show{opacity:1;transform:translateX(-50%) translateY(0);}

/* quick-action rows */
.qarow{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--pline2);font-size:.88rem;font-weight:600;color:var(--slate);text-decoration:none;transition:.12s;}
.qarow:last-child{border-bottom:0;}
.qarow:hover{color:var(--accent);}
.qarow svg{width:17px;height:17px;color:var(--accent);flex:0 0 auto;}

/* vertical stepper (BYOG how-it-works) */
.steps2{list-style:none;margin:0;padding:0;}
.steps2 li{display:flex;gap:13px;padding:0 0 18px;position:relative;}
.steps2 li:last-child{padding-bottom:0;}
.steps2 li .dot{width:26px;height:26px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;background:var(--pbg);border:2px solid var(--pline);color:var(--mut2);position:relative;z-index:1;}
.steps2 li .dot svg{width:14px;height:14px;}
.steps2 li::before{content:"";position:absolute;left:13px;top:26px;bottom:0;width:2px;background:var(--pline);}
.steps2 li:last-child::before{display:none;}
.steps2 li.done .dot{background:var(--good);border-color:var(--good);color:#fff;}
.steps2 li.done::before{background:var(--good);}
.steps2 li.active .dot{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 0 0 4px var(--accent-weak);}
.steps2 li .tx{display:flex;flex-direction:column;line-height:1.3;padding-top:2px;}
.steps2 li .tx b{font-size:.9rem;color:var(--slate);font-weight:700;}
.steps2 li .tx span{font-size:.82rem;color:var(--mut);}
