/* Shared workspace presentation. All rules are scoped to this application. */
@layer portal {
.aph{--ink:#202b3c;--muted:#667085;--line:#e5e9f0;--canvas:#f7f9fc;--radius:14px;--blue-soft:#fff1f4}
.aph.dialog-open{overflow:hidden}
.aph .main{padding-top:26px;padding-bottom:82px}
.aph .page-head{margin-bottom:24px;align-items:flex-start}
.aph .page-head h1{font-size:1.5rem;line-height:1.3;letter-spacing:-.035em}
.aph .page-head p{line-height:1.65;max-width:680px;color:var(--muted)}
.aph .panel,.aph .tool-card,.aph .stat{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 2px 6px #20304b03;min-width:0}
.aph .panel{min-height:0;padding:22px;gap:16px}
.aph .panel .section-head{margin-bottom:0}
.aph .panel.table-wrap{display:block;padding:0;border-radius:12px;min-height:0}
.aph .table-wrap table{min-width:580px}
.aph .table-wrap th{background:#f8fafc;color:#667085;font-size:12px;font-weight:600;padding:13px 17px;white-space:nowrap}
.aph .table-wrap td{padding:16px 17px;border-color:#edf0f5;vertical-align:middle;font-size:13px;color:#566175}
.aph .table-wrap td strong{color:#253247;font-weight:600}
.aph .table-wrap td small{display:block;color:#798498;margin-top:3px}
.aph .table-wrap tbody tr:hover{background:#fbfcfe}
.aph input,.aph select,.aph textarea{border-color:#dce2eb;border-radius:9px;padding:11px 12px;background-color:#fff;font-size:14px;line-height:1.4;min-height:43px}
.aph select{padding-right:34px}
.aph textarea{min-height:100px}
.aph input:focus,.aph select:focus,.aph textarea:focus{border-color:#bf5168;box-shadow:0 0 0 3px #b925400d;outline:none}
.aph :focus-visible{outline:2px solid #a8314b;outline-offset:3px}
.aph input:focus-visible,.aph select:focus-visible,.aph textarea:focus-visible{outline:none;box-shadow:0 0 0 3px #b9254015}
.aph input[type=checkbox]{min-height:17px;padding:0}
.aph label{font-size:13px;font-weight:550;color:#46546a;gap:7px;line-height:1.5;min-width:0}
.aph .hint,.aph .muted{color:var(--muted)}
.aph .btn{min-height:40px;border-color:#dce2ea;border-radius:8px;font-size:13px;font-weight:600;padding:10px 14px;box-shadow:0 1px 2px #20304b04}
.aph .btn.primary{background:#b92540;border-color:#b92540;box-shadow:0 2px 4px #b9254014}
.aph .btn.primary:hover{background:#a71e37;border-color:#a71e37}
.aph .btn.small{min-height:34px;padding:7px 10px;font-size:12px}
.aph .btn:hover{transform:none}
.aph .badge{font-size:11px;border-radius:5px;padding:4px 7px;line-height:1.35;font-weight:550}
.aph .topbar{background:#ffffffef;border-color:var(--line)}
.aph .nav-link{border-radius:8px;min-height:36px}
.aph .nav-link.active{box-shadow:inset 3px 0 #b92540}
.aph .sidebar{border-color:var(--line)}
.aph .footer{background:#ffffffed;border-color:var(--line)}
.aph .modal{width:calc(100% - 32px);max-width:720px;border:1px solid #e1e6ee;border-radius:16px;padding:0;max-height:calc(100dvh - 48px);color:var(--ink);box-shadow:0 24px 90px #101c3433;overflow:hidden}
.aph .modal[open]{display:grid;grid-template-rows:auto minmax(0,1fr)}
.aph .modal::backdrop{background:#18243866;backdrop-filter:blur(3px)}
.aph .modal-head{padding:18px 24px;border-color:var(--line);background:#fff;gap:14px;z-index:1}
.aph .modal-head h2{font-size:16px;line-height:1.5;letter-spacing:-.025em}
.aph .modal-head .icon-btn{border:1px solid var(--line);width:32px;height:32px;color:#64748b;background:#f9fafb}
.aph .modal-form{display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0;overflow:hidden}
.aph .modal-body{padding:22px 24px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding:18px;min-height:0}
.aph .modal-foot{padding:14px 24px;margin:0;border-top:1px solid var(--line);background:#fafbfd;display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:nowrap}
.aph .modal-foot .btn{min-width:104px}
.aph .form-grid{gap:16px 20px;align-items:start}
.aph .form-stack{gap:16px}
.aph .form-section{grid-column:1/-1;display:flex;gap:10px;align-items:center;padding:0 0 10px;border-bottom:1px solid var(--line);margin-top:8px;min-width:0}
.aph .form-section:first-of-type{margin-top:0}
.aph .form-section strong{font-size:13px;display:block;color:#2a374c}
.aph .form-section p{font-size:12px;color:#738096;line-height:1.6;margin-top:3px}
.aph .form-section .mini-icon{width:29px;height:29px;border-radius:8px;background:#f3f5f9;color:#7a8799}
.aph .credential-field,.aph .credential-field textarea{grid-column:1/-1}
.aph .modal textarea[name=credential]{font-size:12px;line-height:1.65;min-height:128px;max-height:250px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#fafbfd;resize:vertical}
.aph .admin-vault-note,.aph .info-box,.aph .credential-note{font-size:12px;color:#667085;line-height:1.7;border-radius:9px;background:#f8fafc;border:1px solid #e3e9f1;padding:12px 14px}
.aph .admin-vault-note{color:#476b59;background:#f4faf6;border-color:#deebe2}
.aph .form-error{font-size:13px;line-height:1.6;margin-top:14px}
.aph .account-avatar{display:inline-grid;width:34px;height:34px;border-radius:50%;overflow:hidden;flex-shrink:0;background:#f4e5eb;color:#92465e;place-items:center;font-size:12px;font-weight:600}
.aph .account-avatar img{width:100%;height:100%;object-fit:cover}
.aph .account-avatar.large{width:72px;height:72px;font-size:23px}
.aph .portal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.aph .portal-grid>.wide{grid-column:1/-1}
.aph .portal-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;min-width:0}.aph .portal-stack>*,.aph .portal-grid>*,.aph .section{min-width:0}
.aph .portal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.aph .portal-head h2{font-size:14px;line-height:1.5;color:#263248}
.aph .portal-head p{font-size:12px;line-height:1.6;color:var(--muted);margin-top:4px}
.aph .portal-head>.link,.aph .portal-head>.btn{flex-shrink:0}
.aph .portal-list{display:grid;gap:10px}
.aph .portal-item{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #e9edf3;border-radius:11px;background:#f8fafc;min-width:0}
.aph .portal-item>.grow{min-width:0}
.aph .portal-item strong{font-size:13px;display:block;color:#2f3b4e;line-height:1.5;overflow-wrap:anywhere}
.aph .portal-item small,.aph .portal-item p{overflow-wrap:anywhere;font-size:12px;line-height:1.6;color:var(--muted);display:block}
.aph .portal-item .btn{flex-shrink:0}
.aph .portal-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.aph .portal-tabs{display:flex;align-items:center;gap:5px;overflow:auto;scrollbar-width:none;padding:5px;border:1px solid var(--line);background:#f5f7fa;border-radius:9px;max-width:100%}
.aph .portal-tabs button{font-size:12px;color:#667085;font-weight:550;padding:8px 11px;border-radius:6px;white-space:nowrap;flex-shrink:0;min-height:34px}
.aph .portal-tabs button.active{background:#fff;color:#a62943;box-shadow:0 1px 4px #20304b0d}
.aph .portal-tabs button small{font-size:11px;background:#eaf0f6;border-radius:4px;padding:1px 4px;margin-left:5px;color:#667085}
.aph .portal-search{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.aph .portal-search .search-input{flex:1;min-width:180px}
.aph .portal-search .search-input input{background:#fff}.aph .search-input input{padding-left:38px}.aph .sidebar-search input{padding-left:34px;min-height:34px;height:34px}
.aph .portal-filters{display:grid;gap:7px;margin-bottom:16px}
.aph .portal-filters .filter-pills{flex-wrap:nowrap;overflow:auto;scrollbar-width:thin}
.aph .filter-pill{white-space:nowrap;font-size:12px;padding:8px 10px;min-height:34px;border-radius:7px}
.aph .filter-pill.active{background:#fff0f4;color:#a62943}
.aph .filter-pill small{font-size:11px;background:#f0f3f8;padding:1px 4px;border-radius:4px}
.aph .portal-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.aph .portal-tool{padding:19px;gap:0;min-height:0;display:flex;flex-direction:column}
.aph .portal-tool .tool-top{margin-bottom:10px;align-items:flex-start;gap:10px}
.aph .portal-tool .tool-heading{display:flex;align-items:center;gap:11px;min-width:0}
.aph .portal-tool h3{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.aph .portal-tool .tool-logo{width:38px;height:38px;border-radius:10px}
.aph .portal-tool .tool-flags{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.aph .portal-tool .tool-domain{margin:4px 0 0;font-size:11px;overflow-wrap:anywhere}
.aph .portal-tool .site-access-label{font-size:11px;color:#667085;display:flex;gap:5px;align-items:center;margin-top:8px}
.aph .portal-tool .site-validity{font-size:11px;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 0;color:#667085;flex-wrap:wrap}
.aph .portal-tool .quota-grid{gap:7px}
.aph .portal-tool .quota-grid>div{background:#f8fafc;padding:9px;border-radius:7px;border-color:#e9edf3}
.aph .portal-tool .quota-label,.aph .portal-tool .quota-number{font-size:11px}
.aph .node-switcher{display:flex;align-items:center;gap:7px;background:#f3f5f9;border:1px solid #e8ecf2;padding:6px;border-radius:9px;margin-top:14px}
.aph .node-switcher>span{flex:1;min-width:0;font-size:11px;font-weight:550;display:flex;align-items:center;gap:5px;overflow-wrap:anywhere;color:#46556c}
.aph .node-switcher>.icon-btn:first-child svg{transform:rotate(180deg)}
.aph .node-switcher>.icon-btn{height:28px;width:27px;background:#fff;border:1px solid #e4e9f0;border-radius:6px}
.aph .portal-tool .tool-bottom{margin-top:12px;padding-top:12px;gap:7px;flex-wrap:wrap}
.aph .portal-tool .tool-bottom .hint{font-size:11px;flex:1;min-width:90px}
.aph .portal-tool .tool-bottom .btn{min-height:32px;padding:6px 9px;font-size:11px}
.aph .portal-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#7b8799;font-size:11px;margin-top:10px;flex-wrap:wrap}
.aph .portal-meta span{display:flex;align-items:center;gap:5px}
.aph .recent-card .portal-item{border:0;background:transparent;padding:0;margin-bottom:14px}
.aph .recent-card .portal-actions{margin-top:auto;padding-top:15px;border-top:1px solid var(--line);justify-content:space-between}
.aph .portal-quota-list{display:grid;gap:12px;max-height:460px;overflow:auto;scrollbar-width:thin;padding-right:3px}
.aph .portal-quota-list .quota-card{background:#f7f9fc;border-color:#e5eaf2;padding:14px}
.aph .portal-quota-list .quota-card h3{font-size:13px}
.aph .portal-quota-list .tool-bottom{margin:7px 0 12px;padding:0;border:0}
.aph .portal-reset{font-size:11px;background:#f1f5fd;border-radius:6px;padding:6px 8px;color:#57749d;white-space:nowrap;display:inline-flex;gap:4px;align-items:center}
.aph .portal-pagination{display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap;color:#738096;font-size:12px;margin-top:16px}
.aph .portal-pagination>div{display:flex;align-items:center;gap:8px}
.aph .portal-price{font-size:30px;font-weight:700;letter-spacing:-.045em;color:#1d2a3f;line-height:1.3}
.aph .portal-price small{font-size:12px;font-weight:450;color:#7b8799;letter-spacing:0}
.aph .portal-plan{padding:18px;gap:15px;min-height:0}
.aph .portal-plan .plan-art{height:136px;margin:0;border:1px solid #eef1f5;border-radius:10px;background:#f9fafc;display:grid;place-items:center}
.aph .portal-plan .plan-art .tool-logo{border:0;background:transparent;box-shadow:none;width:84px;height:84px;padding:4px}
.aph .portal-plan .plan-art img{width:100%;height:100%}
.aph .portal-plan h2{font-size:15px}
.aph .portal-plan .benefits{margin:0;display:grid;gap:9px;list-style:none;padding:0;font-size:12px;color:#5f6d81}
.aph .portal-plan .benefits li{display:flex;align-items:flex-start;gap:7px;line-height:1.65}
.aph .portal-plan .benefits svg{margin-top:3px;color:#328165}
.aph .portal-plan .quota-grid{background:#f8fafc;padding:9px;border:1px solid var(--line);border-radius:10px}
.aph .portal-plan .quota-grid>div{border:0;background:#fff;font-size:11px}
.aph .portal-plan .quota-progress{display:none}
.aph .portal-plan>.btn.primary{margin-top:auto}
.aph .portal-detail-list{display:grid;gap:0;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.aph .portal-detail-list>div{display:flex;justify-content:space-between;gap:16px;padding:13px 15px;border-bottom:1px solid var(--line);font-size:13px;background:#fafbfd}
.aph .portal-detail-list>div:last-child{border-bottom:0}
.aph .portal-detail-list strong{text-align:right;overflow-wrap:anywhere;min-width:0;color:#344157}
.aph .portal-detail-list span{color:var(--muted);flex-shrink:0}
.aph .profile-summary{display:flex;gap:17px;align-items:center;flex-wrap:wrap}
.aph .profile-summary p{font-size:13px;color:var(--muted);overflow-wrap:anywhere;margin-top:4px}
.aph .portal-empty-action{border:1px dashed #dce3ee;background:#fcfdff;border-radius:11px}
.aph .portal-code{padding:13px;border:1px solid #e3e9f1;border-radius:9px;background:#f8fafc;font-family:ui-monospace,monospace;font-size:13px;overflow-wrap:anywhere;user-select:all}
.aph .portal-qr{display:grid;place-items:center;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}.aph .portal-qr svg{max-width:100%;height:auto;width:220px}
.aph .portal-recovery{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.aph .portal-recovery code{background:#f4f7fb;padding:8px;border-radius:6px;font-size:12px;text-align:center}
.aph .receipt-brand{border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:18px}
.aph .receipt-brand strong{font-size:19px;letter-spacing:-.025em}
.aph .portal-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.aph .portal-node{padding:11px 12px;background:#f7f9fc;border:1px solid #e8edf3;border-radius:9px;display:flex;align-items:center;gap:9px;font-size:12px}
.aph .status-dot{display:inline-block;height:6px;width:6px;border-radius:50%;background:#a6afbd;flex-shrink:0}
.aph .status-dot.ready{background:#22a277;box-shadow:0 0 0 3px #22a27714}
.aph .status-dot.maintenance{background:#d8a046}
.aph .portal-overview{display:flex;align-items:center;gap:14px;padding:18px;border:1px solid var(--line);border-radius:12px;background:#fff}
.aph .portal-overview>.grow{min-width:0}
.aph .portal-overview h2{font-size:14px}
.aph .portal-overview p{font-size:12px;color:var(--muted);line-height:1.65;margin-top:4px}
.aph .portal-overview>.stat-icon{align-self:flex-start}
.aph .portal-coupon{display:flex;align-items:center;gap:9px;background:#f8fafc;padding:12px;border:1px solid var(--line);border-radius:9px}
.aph .portal-coupon code{flex:1;overflow-wrap:anywhere;font-size:13px}
.aph .admin-view .panel,.aph.admin-view .panel{padding:22px}
.aph.admin-view .table-wrap{padding:0}
.aph.admin-view .admin-overview-stats .stat{min-height:122px;padding:20px}
.aph.admin-view .admin-overview-stats .stat-value{font-size:28px}
.aph.admin-view .admin-banner{background:#fafbfd;color:#667085;border-color:var(--line);font-size:12px}
.aph.admin-view .admin-account-card{padding:20px;gap:0}
.aph.admin-view .admin-account-email{color:#667085}
.aph.admin-view .admin-card-footer{gap:8px}
.aph.admin-view .admin-callout{color:#667085;background:#fbfcfe;border-color:var(--line)}
.aph.admin-view .admin-callout strong{color:#46546a}
.aph.admin-view .admin-callout.warning{background:#fffbf3;border-color:#eadfc7;color:#8a6b34}
.aph.admin-view .admin-toolbar{box-shadow:0 1px 3px #23314b03}
.aph.admin-view .admin-list-line small,.aph.admin-view .admin-member-summary p{color:#667085}
.aph.admin-view .admin-member-summary{gap:18px;flex-direction:row}
.aph.admin-view .portal-overview{margin-bottom:20px}
@media(min-width:1600px){.aph .portal-tools{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1200px){.aph .portal-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.aph .portal-grid{gap:16px}.aph .portal-item{flex-wrap:wrap}.aph .portal-item>.grow{flex:1;min-width:120px}}
@media(max-width:1000px){.aph .portal-grid{grid-template-columns:1fr}.aph .portal-grid>.wide{grid-column:auto}.aph .portal-status-grid{grid-template-columns:1fr}.aph .page-actions{gap:8px}}
@media(max-width:760px){.aph .main,.aph.admin-view .main{padding:22px 14px 84px}.aph .page-head h1,.aph.admin-view h1{font-size:21px}.aph .page-head{flex-direction:column;gap:14px;margin-bottom:20px}.aph .page-head p{font-size:12px}.aph .panel{padding:17px;gap:14px}.aph .page-actions{width:100%}.aph .page-actions .btn{flex:1}.aph .portal-grid{gap:16px}.aph .portal-tools{gap:14px}.aph .portal-overview{padding:16px;flex-wrap:wrap}.aph .portal-overview>.grow{flex-basis:65%}.aph .portal-overview>.btn{margin-left:0}.aph .portal-item{padding:12px;gap:10px}.aph .portal-tabs{width:100%}.aph .portal-search .search-input{flex-basis:100%;min-width:0}.aph .portal-quota-list{max-height:470px}.aph .modal{max-height:calc(100dvh - 24px);width:calc(100% - 24px);border-radius:14px}.aph .modal-head{padding:15px 17px}.aph .modal-head h2{font-size:15px}.aph .modal-body{padding:18px 17px}.aph .modal-foot{padding:12px 17px;padding-bottom:max(12px,env(safe-area-inset-bottom))}.aph .modal-foot .btn{flex:1;min-width:0;white-space:normal;min-height:43px}.aph input,.aph select,.aph textarea{font-size:16px;min-height:44px}.aph .sidebar-search input{font-size:16px}.aph .modal textarea[name=credential]{font-size:16px}.aph label{font-size:12px}.aph .form-grid{gap:14px}.aph .portal-pagination{justify-content:center}.aph .portal-detail-list>div{font-size:12px;padding:12px}.aph .portal-detail-list span{flex-shrink:1}.aph .portal-tools .btn{min-height:36px}.aph .portal-tool{padding:17px}.aph .portal-head h2{font-size:14px}.aph .portal-plan .plan-art{height:150px}.aph .support-fab{width:46px;height:46px;right:14px;bottom:55px}.aph .footer{font-size:10px;gap:6px}.aph.admin-view .modal{width:calc(100% - 24px)}.aph.admin-view .modal-body,.aph.admin-view .modal-head{padding:17px}.aph.admin-view .admin-box,.aph.admin-view .panel{padding:17px}.aph.admin-view .table-wrap{padding:0}.aph.admin-view .admin-overview-stats .stat{min-height:118px;padding:16px;flex-direction:row-reverse}.aph.admin-view .admin-overview-stats .stat-icon{width:30px;height:30px;flex-basis:30px}.aph.admin-view .admin-overview-stats .stat-value{font-size:24px}.aph.admin-view .admin-member-summary{padding:17px}.aph.admin-view .admin-gateway-grid{gap:16px}}
@media(max-width:540px){.aph .portal-tools,.aph .tool-grid{grid-template-columns:1fr}.aph:not(.admin-view) .stats{grid-template-columns:1fr;gap:12px}.aph:not(.admin-view) .stats .stat{min-height:112px;padding:17px 18px 24px;display:flex;flex-direction:column;gap:9px}.aph:not(.admin-view) .stats .stat-icon{align-self:flex-start;width:32px;height:32px;border-radius:8px}.aph:not(.admin-view) .stats .stat-value{font-size:19px;margin-top:3px}.aph:not(.admin-view) .stats .stat-value.words{font-size:16px}.aph:not(.admin-view) .stats .stat-foot{font-size:11px}.aph .form-grid{grid-template-columns:1fr}.aph .span-full{grid-column:1/-1}.aph .portal-head{gap:10px}.aph .portal-head>.btn,.aph .portal-head>.link{font-size:11px}.aph .portal-item>.grow{min-width:110px}.aph .portal-tool .tool-flags{max-width:118px}.aph .portal-tool .tool-bottom .hint{flex-basis:40%}.aph .profile-summary .portal-actions{width:100%}.aph .portal-recovery{grid-template-columns:1fr}.aph.admin-view .admin-overview-stats{gap:10px}.aph.admin-view .admin-overview-stats .stat{flex-direction:column;gap:10px}.aph.admin-view .admin-overview-stats .stat-foot{font-size:11px}.aph.admin-view .admin-overview-stats .stat-top{font-size:12px}.aph.admin-view .admin-account-grid{gap:14px}.aph .portal-plan .plan-art{height:155px}}
@media(prefers-reduced-motion:reduce){.aph .panel,.aph .stat,.aph .tool-card,.aph .modal[open],.aph .modal::backdrop{animation:none}.aph *{scroll-behavior:auto!important}}
@media print{.aph .shell,.aph .modal-head,.aph .modal-foot,.aph .toasts{display:none!important}.aph .modal[open]{position:static;display:block;width:100%;max-width:none;max-height:none;overflow:visible;border:0;box-shadow:none}.aph .modal-body{overflow:visible;padding:0}.aph .modal::backdrop{background:white}.aph.dialog-open{overflow:visible}.aph .portal-detail-list{break-inside:avoid}}
}
