/* VPS Control Cloud 1.3: approved visual-system implementation.
   All changes are local UI refinements and do not modify Xray configuration. */
:root{--bg:#06102a;--sidebar:#081734;--card:#0d1d3e;--card2:#10244c;--line:#284c87;--text:#ecf4ff;--muted:#9cafd4;--blue:#688dff;--radius:18px}
body{background:#040b20;color:#eff4ff}
.t12-shell{border:0;border-radius:0;box-shadow:none;background:radial-gradient(ellipse at 76% 0%,#1638876e,transparent 40%),linear-gradient(152deg,#061735,#050a1f 72%);min-width:0;overflow:clip}
.t12-shell .sidebar{width:248px;min-width:248px;background:linear-gradient(180deg,#091e46,#06132f 60%,#07102b);border-right:1px solid #2456a2;padding:22px 12px}
.t12-shell .brand{padding:0 9px 30px;gap:7px;min-width:0;align-items:center}
.t12-shell .brand .logo{width:48px;height:48px;flex-basis:48px}
.t12-shell .brand>div:last-child{min-width:0}
.t12-shell .brand h1{font-size:clamp(13px,1.18vw,17px);white-space:nowrap;overflow:hidden;text-overflow:clip;letter-spacing:-.45px;line-height:1.3}
.t12-shell .brand em{color:#40dfff}
.t12-shell .sidebar .nav{gap:9px}.t12-shell .navbtn{min-height:48px;padding:11px 14px;border:1px solid transparent;border-radius:13px;color:#ccdbfa;font-size:13px;gap:10px}
.t12-shell .navbtn:hover{background:#1b3672;border-color:#416acf}
.t12-shell .navbtn.active{background:linear-gradient(100deg,#3264f8,#772ff0);border:1px solid #9392ff;box-shadow:0 0 18px #7654ff66,inset 0 0 10px #a4adff48;color:#fff}
.t12-shell .sidefoot{display:none!important}.t12-shell .t12-side-extra{display:none}
.t12-shell .main{max-width:none;padding:24px clamp(18px,2.5vw,48px) 24px;min-width:0}
.t12-shell .topbar{min-height:54px;justify-content:flex-end;margin-bottom:24px}
.t12-shell .header-circle{border:1px solid #3c67b2;background:linear-gradient(155deg,#162f69,#091c43);box-shadow:0 0 13px #2e62d766}
.header-circle i{background:#e961fe;box-shadow:0 0 8px #e961fe}
.t12-shell .header-popover{border:1px solid #547ad2;background:#0b1c3e;box-shadow:0 16px 45px #000a,0 0 20px #365ef04d;border-radius:15px}
.t12-shell .workspace-footer{border-top-color:#2c4779;color:#92a4c6;font-size:11px}
.t12-shell .panel{background:linear-gradient(155deg,#0c2046,#0a1835);border-color:#294e88;border-radius:19px;box-shadow:0 8px 24px #01071855;min-width:0}
.t12-shell .paneltop{background:linear-gradient(90deg,#132c5b,#112249);border-color:#2d4a7c;padding:20px 24px}
.t12-shell .panelbody{padding:22px 24px}
.t12-shell .cards,.t12-shell .split{gap:22px}
.t12-shell .heading{margin-bottom:23px}
.t12-shell .btn{border-color:#3d5d9a;background:linear-gradient(150deg,#1a325e,#102345);border-radius:12px;min-height:39px;font-weight:690;transition:filter .18s,transform .18s,box-shadow .18s;white-space:normal}
.t12-shell .btn:hover{filter:brightness(1.12);transform:translateY(-1px);box-shadow:0 2px 17px #5478ff55}
.t12-shell .btn.primary,.v13-modal .btn.primary{color:#fff;background:linear-gradient(110deg,#497eff,#6437eb);border-color:#7c98ff;box-shadow:inset 0 1px #ffffff3c,0 5px 15px #4936eb40}
/* Routing overview: discrete premium sections, never attached */
.v13-routing-sections{display:flex;flex-direction:column;gap:24px;margin:24px 0 16px}
.v13-route-panel{background:linear-gradient(142deg,#0d2149,#0c1939);border:1px solid #38619b;border-radius:19px;box-shadow:inset 0 1px #6aa8ef18,0 11px 30px #0006;padding:20px;min-width:0}
.v13-route-panel-head{display:flex;align-items:center;gap:15px;margin-bottom:19px;min-width:0}
.v13-section-icon{width:50px;height:50px;flex:0 0 50px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(130deg,#193f78,#132553);border:1px solid #315ca4;color:#b5dcff;font-size:24px}
.v13-panel-title{flex:1;min-width:0}.v13-panel-title h3{margin:0 0 5px;font-size:20px;letter-spacing:-.4px}.v13-panel-title p{margin:0;color:#9db0d1;font-size:12px;line-height:1.6}
.v13-routing-list{display:grid;gap:12px}
.v13-routing-row{display:flex;align-items:center;gap:14px;min-width:0;border:1px solid #284b82;border-radius:13px;background:#0c1d40;padding:15px 16px;transition:border-color .2s}
.v13-routing-row:hover{border-color:#4c77d6}
.v13-route-icon{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:12px;background:#193665;color:#bbdfff;font-size:20px}
.v13-routing-desc{flex:1;min-width:0}.v13-routing-desc strong{font-size:15px;display:block;overflow-wrap:anywhere}.v13-routing-desc small,.v13-routing-desc span{display:block;color:#94aed6;font-size:12px;line-height:1.6;overflow-wrap:anywhere;margin-top:4px}.v13-routing-desc span{color:#a9bfdc}
.v13-route-controls{display:flex;align-items:center;gap:14px;flex-shrink:0}
.v13-route-status{display:inline-flex;align-items:center;white-space:nowrap;gap:7px;background:#104633;border:1px solid #246653;color:#7af2ba;border-radius:99px;padding:7px 12px;font-weight:760;font-size:11px}
.v13-route-status::before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor}
.v13-route-status.muted{background:#23304b;border-color:#38517c;color:#bbceec}.v13-route-status:not(.ok):not(.muted){background:#342a47;color:#d1b6f2;border-color:#69578d}
.v13-routing-footnote{margin:20px 2px;color:#94a8c8;font-size:12px;line-height:1.7}
.v13-empty{padding:28px;text-align:center;border:1px dashed #3a5783;border-radius:13px;color:#bcd2ef}.v13-empty strong,.v13-empty small{display:block}.v13-empty small{font-size:12px;color:#91a6c6;margin-top:8px}
/* Modal design system */
.overlay{background:#030917c9;backdrop-filter:blur(9px);padding:24px;overflow-y:auto;align-items:center}
.v13-modal.modal{width:min(690px,calc(100vw - 32px));max-height:calc(100dvh - 48px);display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(155deg,#0d2452,#08152f 70%);border:1px solid #7180f3;border-radius:22px;box-shadow:0 24px 100px #000d,0 0 22px #6b4cf57a,inset 0 0 17px #3d78ca34;min-width:0}
.v13-modal.modal.wide{width:min(760px,calc(100vw - 32px))}
.v13-modal .modalhead{padding:23px 26px 19px;background:linear-gradient(120deg,#123466,#0a1d45);border-bottom:1px solid #3f5c98;display:flex;gap:16px;flex:0 0 auto}
.v13-modal .v13-modal-icon{width:50px;height:50px;flex:0 0 50px;border:1px solid #4777c7;border-radius:13px;display:grid;place-items:center;background:#20467f;color:#bcdfff;font-size:25px}
.v13-modal .v13-modal-heading{flex:1;min-width:0}
.v13-modal .v13-modal-heading h3{font-size:20px;line-height:1.25;margin:1px 0 6px;overflow-wrap:anywhere}
.v13-modal .v13-modal-heading p{margin:0;font-size:12px;line-height:1.6;color:#a9bbde}
.v13-modal .close{align-self:flex-start;margin-left:auto;width:32px;height:32px;display:grid;place-items:center;font-size:25px;border-radius:9px;flex-shrink:0}.v13-modal .close:hover{background:#2c3e74;color:white}
.v13-modal .modalbody{overflow:auto;min-height:0;padding:20px 20px 24px;overscroll-behavior:contain}
.v13-modal .modalfoot{padding:18px 22px;flex:0 0 auto;background:#0d2145;border-color:#35598e}
.v13-modal .fields{gap:17px}
.v13-modal input,.v13-modal select,.v13-modal textarea{background:#07152f;border:1px solid #3a6199;border-radius:9px;color:#e8f4ff;min-width:0;max-width:100%;padding:11px 12px;font-size:13px}
.v13-modal input:focus,.v13-modal select:focus,.v13-modal textarea:focus{border-color:#85a4ff;box-shadow:0 0 0 3px #6384ff32;outline:0}
.v13-modal label{font-size:11px;color:#b7c9e8;min-width:0}
.v13-modal .callout{border-radius:12px;font-size:12px;line-height:1.6}
.v13-profile-form{display:flex;flex-direction:column;gap:13px}
.v13-form-group{background:#1129539a;border:1px solid #375c9d;border-radius:13px;overflow:hidden;min-width:0}
.v13-form-group h4{margin:0;background:#17366987;padding:12px 16px;border-bottom:1px solid #34578f;font-size:13px;font-weight:750;color:#e4efff}
.v13-form-fields{padding:14px 16px 17px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px}
.v13-form-fields .full{grid-column:1/-1}
.v13-inline-note{padding:11px 15px;border:1px solid #4e5b85;background:#15264c;border-radius:11px;color:#adbfe0;font-size:11px;line-height:1.6}
.v13-form-actions{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-top:7px;padding:3px 1px 0}
.v13-form-actions .btn{min-width:120px}
/* Avoid cramped headings, lists, forms at narrow viewports. */
@media(max-width:1050px){.t12-shell .sidebar{width:208px;min-width:208px}.t12-shell .brand{padding:0 2px 25px}.t12-shell .brand h1{font-size:12px}.t12-shell .brand .logo{width:38px;height:38px;flex-basis:38px}.t12-shell .navbtn{font-size:12px;padding:10px 9px}}
@media(max-width:720px){
 .t12-shell .sidebar{width:100%;min-width:0;padding:10px 13px;height:66px}
 .t12-shell .brand{padding:0 4px;gap:5px;min-width:0;max-width:calc(100% - 96px)}
 .t12-shell .brand h1{font-size:clamp(12px,3.5vw,16px);white-space:nowrap}
 .t12-shell .brand .logo{width:36px;height:36px;flex-basis:36px}
 .t12-shell .topbar{top:-55px!important;right:10px!important}
 .t12-shell .main{padding:20px 13px 100px;min-width:0}
 .v13-routing-sections{gap:18px;margin-top:20px}
 .v13-route-panel{padding:14px 12px;border-radius:16px}
 .v13-route-panel-head{display:grid;grid-template-columns:40px 1fr;gap:9px 11px}
 .v13-section-icon{width:40px;height:40px;flex-basis:40px;font-size:20px}
 .v13-panel-title h3{font-size:17px}
 .v13-route-panel-head>.btn{grid-column:1/-1;width:100%;justify-content:center;min-height:44px}
 .v13-routing-row{flex-wrap:wrap;padding:13px 11px;gap:9px}
 .v13-route-icon{width:37px;height:37px;flex-basis:37px}
 .v13-routing-desc{width:calc(100% - 46px)}
 .v13-route-controls{width:100%;justify-content:space-between;border-top:1px solid #324b77;padding-top:11px;gap:9px}
 .v13-route-controls .btn{min-height:43px}
 .overlay{padding:0;align-items:flex-end;overflow:hidden}
 .v13-modal.modal,.v13-modal.modal.wide{width:100vw;max-width:100%;max-height:94dvh;border-radius:23px 23px 0 0;border-bottom:0;box-shadow:0 -8px 60px #000c,0 -2px 15px #8054f57f}
 .v13-modal .modalhead{padding:17px 14px;gap:10px}
 .v13-modal .v13-modal-icon{width:39px;height:39px;flex-basis:39px;font-size:20px}
 .v13-modal .v13-modal-heading h3{font-size:16px}
 .v13-modal .v13-modal-heading p{font-size:11px}
 .v13-modal .modalbody{padding:13px 12px 24px}
 .v13-form-fields{grid-template-columns:1fr;gap:12px;padding:13px}
 .v13-form-fields .full{grid-column:auto}
 .v13-form-actions{position:sticky;bottom:-24px;padding:12px 0 max(10px,env(safe-area-inset-bottom));background:#091c3fe8;border-top:1px solid #314e88;z-index:2}
 .v13-form-actions .btn{flex:1;min-width:0}
 .v13-routing-footnote{font-size:11px}
 .t12-shell .workspace-footer{font-size:10px;padding-bottom:22px}
}
@media(max-width:360px){.t12-shell .brand h1{font-size:12px}.t12-shell .brand .logo{width:30px;height:30px;flex-basis:30px}.t12-shell .topbar{right:6px!important}}
@media(prefers-reduced-motion:reduce){.t12-shell .btn{transition:none}}

/* Maintain visible modal actions while scrolling form fields. */
.overlay{z-index:1000!important}
.v13-modal .modalbody:has(.v13-profile-form){overflow:hidden;display:flex;flex-direction:column}
.v13-profile-form{height:min(700px,calc(100dvh - 190px));min-height:0;display:flex;flex-direction:column;overflow:hidden}
.v13-form-scroll{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:13px;padding-right:4px;scrollbar-color:#465fb8 transparent;scrollbar-width:thin}
.v13-form-actions{flex:0 0 auto;margin:0;padding:15px 0 0;background:#0a1b3a;border:0}
@media(max-width:720px){
 .v13-modal .modalbody:has(.v13-profile-form){padding-bottom:calc(10px + env(safe-area-inset-bottom))}
 .v13-profile-form{height:min(680px,calc(94dvh - 174px))}
 .v13-form-scroll{gap:12px}
 .v13-form-actions{position:relative;bottom:auto;padding:12px 0 0;margin:0;background:#091a39;border-top:1px solid #314e88}
}
.v13-form-scroll>.v13-form-group,.v13-form-scroll>.v13-inline-note{flex:0 0 auto}
