/* LA2WORLD layout for SphereWeb. No routes, CSRF, permissions, game icons or JS backend are replaced.
 * Source: LA2WORLD_Cabinet design; all selectors scoped to Sphere pages. */
body.phoenix-cabinet.la2w-sphere {
  --la2w-gold:#edb76f;--la2w-bright:#ffdaa0;--la2w-rim:#875c38;
  --la2w-bg:#070e14;--la2w-muted:#a0afba;--la2w-line:#36424b;
  color:#e8e9e7!important;font-family:Arial,'Segoe UI',sans-serif!important;
}
body.la2w-sphere .dark-hell-atmosphere {
  background:linear-gradient(180deg,rgba(5,10,15,.75),rgba(4,8,13,.82)),url('../la2world/obsidian-texture.jpg') center top/cover fixed!important;
  opacity:1!important;
}
/* Existing logo, lang selector, account dropdown, mobile toggle, payment widgets stay native. */
body.phoenix-cabinet.la2w-sphere .app-header {
  background:linear-gradient(90deg,#060c14ec 0%,#080d15bb 50%,#050911ea 100%),url('../la2world/header-scene.jpg') center 39%/cover!important;
  border-bottom:2px solid #ae753c!important;min-height:82px!important;
  box-shadow:0 5px 18px #000c,inset 0 -2px #f3b36643!important;
}
/* Honor existing admin-selected cabinet background when configured. */
body.phoenix-cabinet.la2w-sphere.has-custom-cabinet-bg .dark-hell-atmosphere{
  background:linear-gradient(180deg,#050a10b8,#04080ed9)!important;
}
body.la2w-sphere .main-header-container{min-height:80px!important}
body.phoenix-cabinet.la2w-sphere .app-sidebar,
body.phoenix-cabinet.la2w-sphere .main-sidebar,
body.phoenix-cabinet.la2w-sphere .main-sidebar-header{
  background:#080e13!important;border-color:#a36c39!important;
}
body.phoenix-cabinet.la2w-sphere .app-sidebar{
  border-right:2px solid #a76c35!important;box-shadow:4px 0 12px #0008!important;
}
body.phoenix-cabinet.la2w-sphere .main-sidebar{
  background:linear-gradient(180deg,#080e13ed 0%,#080e13f2 68%,#090e13d4),url('../la2world/sidebar-scene.jpg') center bottom/100% auto no-repeat!important;
}
body.phoenix-cabinet.la2w-sphere .main-menu .slide{margin:2px 0!important}
body.phoenix-cabinet.la2w-sphere .side-menu__item{
  min-height:46px;padding:9px 12px!important;
  background:transparent!important;border:1px solid transparent!important;
  border-bottom:1px solid #45332467!important;border-radius:3px!important;
  color:#d8dce1!important;font-size:12.5px!important;
}
body.phoenix-cabinet.la2w-sphere .side-menu__item:hover,
body.phoenix-cabinet.la2w-sphere .side-menu__item.text-success,
body.phoenix-cabinet.la2w-sphere .slide.active>.side-menu__item{
  color:#ffdb9f!important;border-color:#8e592d!important;
  background:linear-gradient(90deg,#66401caa,#25170f55 75%,transparent)!important;
  box-shadow:inset 3px 0 #e8b56e!important;
}
body.la2w-sphere .side-menu__item .side-menu__icon{color:#d7a56a!important;font-size:18px!important}
body.phoenix-cabinet.la2w-sphere .main-content.app-content{padding-top:21px!important}
body.la2w-sphere .main-content.app-content>.container-fluid{padding-inline:clamp(12px,2vw,28px)!important}
/* Common Sphere components inherit fantasy panels without losing original form behaviour. */
body.phoenix-cabinet.la2w-sphere .card,
body.phoenix-cabinet.la2w-sphere .custom-card,
body.phoenix-cabinet.la2w-sphere .modal-content,
body.phoenix-cabinet.la2w-sphere .dropdown-menu{
  border:1px solid #a36a37!important;background:linear-gradient(135deg,#0d1720fa,#070c13fa 60%,#060b11f7)!important;
  box-shadow:0 3px 10px #000a,inset 0 0 0 1px #ce91591a!important;border-radius:5px!important;
}
body.phoenix-cabinet.la2w-sphere .card-header,
body.phoenix-cabinet.la2w-sphere .card-footer,
body.phoenix-cabinet.la2w-sphere .modal-header,
body.phoenix-cabinet.la2w-sphere .modal-footer{
  background:linear-gradient(90deg,#271b16dd,#111922aa)!important;
  border-color:#705133!important;
}
body.la2w-sphere :is(.table,.table-responsive){--bs-table-bg:transparent;--bs-table-color:#e5e9ee}
body.phoenix-cabinet.la2w-sphere .btn:focus-visible,
body.la2w-sphere :is(a,button,input,select):focus-visible{outline:2px solid #ffcd8a!important;outline-offset:2px}
/* Dashboard heading and metric layout recreated from LA2WORLD cabinet mockup. */
body.la2w-sphere .la2w-dashboard{margin-bottom:22px;color:#dbe3e9}
body.la2w-sphere .la2w-dashboard-heading{display:grid;grid-template-columns:minmax(245px,.92fr) minmax(470px,1.38fr);gap:20px;align-items:center;margin:3px 0 16px}
body.la2w-sphere .la2w-kicker{display:block;color:#c58b55;font-size:10px;font-weight:700;letter-spacing:1.75px;margin-bottom:5px}
body.la2w-sphere .la2w-dashboard-heading h1{margin:3px 0 7px;color:#ffd7a0!important;font:normal clamp(24px,2.05vw,36px) Georgia,'Times New Roman',serif!important;text-shadow:0 2px 5px #000}
body.la2w-sphere .la2w-dashboard-heading h1 span{color:#f5eee2}
body.la2w-sphere .la2w-dashboard-heading p{font-size:12px;color:#a7b4bb;margin:0;line-height:1.5}
body.la2w-sphere .la2w-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;align-items:stretch}
body.la2w-sphere .la2w-metric{appearance:none;min-width:0;display:flex;align-items:center;gap:9px;text-align:left;text-decoration:none;padding:11px 9px;border:1px solid #745334;background:#0b131ba8;border-radius:5px;min-height:69px;color:#eddbc4!important;cursor:pointer}
body.la2w-sphere .la2w-metric:hover{border-color:#e7ae6c;box-shadow:inset 0 0 18px #d8963920}
body.la2w-sphere .la2w-metric>i{font-size:25px;color:#e4ad66;flex:0 0 auto}
body.la2w-sphere .la2w-metric span{min-width:0;display:block}
body.la2w-sphere .la2w-metric strong{display:block;color:#f8d9aa;font:normal 21px Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
body.la2w-sphere .la2w-metric small{display:block;font-size:10px;line-height:1.4;color:#94a6b0;margin-top:5px;white-space:normal}
body.la2w-sphere .la2w-last-visit strong{font:normal 12px Arial,sans-serif;white-space:normal;overflow-wrap:anywhere}
body.la2w-sphere .la2w-dashboard-columns{display:grid;grid-template-columns:minmax(0,1.17fr) minmax(0,.88fr);gap:14px}
body.la2w-sphere .la2w-column{display:flex;flex-direction:column;gap:14px;min-width:0}
body.la2w-sphere .la2w-panel{border:1px solid #a36a37;border-radius:5px;min-width:0;padding:14px 15px;box-shadow:inset 0 0 0 1px #a4753f22,0 4px 13px #000a;background:linear-gradient(145deg,#0c151eea,#070c13f2 65%),url('../la2world/obsidian-texture.jpg') center/cover}
body.la2w-sphere .la2w-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px;margin:0 0 10px;border-bottom:1px solid #4f3b2e;padding-bottom:10px}
body.la2w-sphere .la2w-panel-heading>div{display:flex;align-items:center;gap:9px;min-width:0}
body.la2w-sphere .la2w-ornament{font-size:16px;color:#e6a75f}
body.la2w-sphere .la2w-panel-heading h2{font:normal 20px Georgia,serif!important;margin:0;color:#f9d19c!important}
body.la2w-sphere .la2w-panel-heading small{font-size:10px;color:#9ca9b4}
body.la2w-sphere .la2w-panel-heading>a{font-size:11px;text-decoration:none;color:#ebbc7b!important;white-space:nowrap}
body.la2w-sphere .la2w-table-scroll{width:100%;max-width:100%;overflow-x:auto}
body.la2w-sphere .la2w-character-table{width:100%;min-width:545px;border-collapse:collapse;text-align:left}
body.la2w-sphere .la2w-character-table th{color:#b89b79;text-transform:uppercase;letter-spacing:.6px;font-size:10px;padding:9px 7px;border-bottom:1px solid #7a5637;font-weight:500}
body.la2w-sphere .la2w-character-table td{padding:8px 7px;border-bottom:1px solid #29343e;color:#dbe3e9;font-size:11px;vertical-align:middle}
body.la2w-sphere .la2w-character-table tr:last-child td{border-bottom:0}
body.la2w-sphere .la2w-char-identity{display:flex;align-items:center;gap:10px;min-width:130px}
body.la2w-sphere .la2w-char-identity img{height:46px;width:45px;object-fit:cover;object-position:center 20%;background:#171d24;border:1px solid #935f39;border-radius:3px;flex-shrink:0}
body.la2w-sphere .la2w-char-identity span{min-width:0}
body.la2w-sphere .la2w-char-identity strong{display:block;color:#f2e7d7;font-size:12px;font-weight:500;overflow-wrap:anywhere}
body.la2w-sphere .la2w-char-identity small{display:block;margin-top:6px;color:#91a6b4;font-size:10px}
body.la2w-sphere .la2w-level{border:1px solid #855d37;color:#ffdc9e;background:#302114;padding:5px 9px;border-radius:3px}
body.la2w-sphere .la2w-link-button{background:transparent;border:0;padding:6px;color:#efb876;cursor:pointer;text-align:left;white-space:nowrap;font-size:11px}
body.la2w-sphere .la2w-link-button:hover{color:#ffe1a6;text-decoration:underline}
body.la2w-sphere .la2w-empty{padding:19px 5px!important;color:#91a1ad!important;font-size:12px!important;margin:0}
body.la2w-sphere .la2w-account-line{display:flex;align-items:center;gap:10px;min-height:58px;padding:7px 2px;border-bottom:1px solid #303b44}
body.la2w-sphere .la2w-account-line>i{font-size:23px;color:#efbe80;background:#2f231b;border:1px solid #6d533e;padding:8px;border-radius:4px}
body.la2w-sphere .la2w-account-line>span{flex:1;display:flex;flex-direction:column;gap:6px;min-width:0}
body.la2w-sphere .la2w-account-line strong{font-size:12px;font-weight:500;color:#efebe4;overflow-wrap:anywhere}
body.la2w-sphere .la2w-account-line small{font-size:10px;color:#92a1ab}
body.la2w-sphere .la2w-panel-footer{display:flex;flex-wrap:wrap;gap:9px;margin-top:15px}
body.la2w-sphere .la2w-panel-footer>a,body.la2w-sphere .la2w-panel-footer>button{flex:1 1 145px;display:flex;align-items:center;justify-content:center;gap:9px;text-decoration:none;min-height:38px;padding:7px 9px;font-size:11px;border-radius:4px;cursor:pointer}
body.la2w-sphere .la2w-gold-button{color:#2a190b!important;background:linear-gradient(#ffdda0,#d49851)!important;border:1px solid #efbc7b}
body.la2w-sphere .la2w-dark-button{background:#1b1e22;border:1px solid #9d6c40;color:#f2c892}
body.la2w-sphere .la2w-news-item{display:flex;gap:10px;align-items:center;text-decoration:none;padding:9px 2px;border-bottom:1px solid #303943;color:#e5e6e7!important;min-height:66px}
body.la2w-sphere .la2w-news-item:last-child{border-bottom:0}
body.la2w-sphere .la2w-news-item img{width:72px;height:49px;object-fit:cover;border:1px solid #805b36;border-radius:3px;flex-shrink:0;background:#161d24}
body.la2w-sphere .la2w-news-item>span{flex:1;min-width:0}
body.la2w-sphere .la2w-news-item strong{display:block;font-size:12px;font-weight:normal;color:#f0e4d8;line-height:1.35;overflow-wrap:anywhere}
body.la2w-sphere .la2w-news-item small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:10px;margin-top:6px;color:#91a4b2;line-height:1.45}
body.la2w-sphere .la2w-news-item>i{font-size:14px;color:#deb77d}
body.la2w-sphere .la2w-news-item:hover strong{color:#f5bc77}
body.la2w-sphere .la2w-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
body.la2w-sphere .la2w-quick-grid>a,body.la2w-sphere .la2w-quick-grid>button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;min-width:0;padding:9px 4px;min-height:80px;border:1px solid #705034;border-radius:4px;background:linear-gradient(#1d2329a3,#111821e8);text-decoration:none;color:#e9d6ba!important;cursor:pointer;font-size:10px;text-align:center}
body.la2w-sphere .la2w-quick-grid i{font-size:25px;color:#e2aa67}
body.la2w-sphere .la2w-quick-grid>a:hover,body.la2w-sphere .la2w-quick-grid>button:hover{border-color:#efba77;background:#39281e}
body.la2w-sphere .la2w-activity-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.la2w-sphere .la2w-activity-stats>div{background:#101a21cf;border:1px solid #4f4034;padding:14px 6px;text-align:center;border-radius:4px}
body.la2w-sphere .la2w-activity-stats strong{font:normal 25px Georgia,serif;color:#f7ca91;display:block;overflow-wrap:anywhere}
body.la2w-sphere .la2w-activity-stats small{color:#91a5b2;font-size:10px;display:block;margin-top:7px}
body.la2w-sphere .la2w-note{color:#99a9b1;font-size:11px;line-height:1.6;margin:12px 1px 2px}
body.la2w-sphere .la2w-legacy-heading{margin:22px 0 12px;border-left:3px solid #b87c3f;padding:6px 13px}
body.la2w-sphere .la2w-legacy-heading h2{font:normal 21px Georgia,serif!important;color:#f7cc96!important;margin:0 0 6px}
body.la2w-sphere .la2w-legacy-heading p{margin:0;color:#a6b2bc;font-size:11px}
/* Keep the real Sphere account editor and character tools, including PIN and recovery. */
body.la2w-sphere .phoenix-overview{display:none!important}
body.la2w-sphere .phoenix-account-workspace{margin-top:0}
body.la2w-sphere .phoenix-account-workspace>.card-header{font:normal 19px Georgia,serif}
body.la2w-sphere .phoenix-account-characters-area .account-row{cursor:default}
body.la2w-sphere #la2w-account-tools{scroll-margin-top:104px}
body.la2w-sphere #la2w-characters{scroll-margin-top:104px}
body.la2w-sphere .la2w-admin-dashboard .la2w-admin-shortcuts{margin-bottom:15px}
body.la2w-sphere .la2w-admin-dashboard .la2w-quick-grid{grid-template-columns:repeat(8,minmax(0,1fr))}
/* Underlying Sphere navigation, user permissions, modals and sidebar scroll remain untouched. */
@media(max-width:1460px){
 body.la2w-sphere .la2w-dashboard-heading{grid-template-columns:1fr;gap:12px}
 body.la2w-sphere .la2w-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
 body.la2w-sphere .la2w-dashboard-columns{grid-template-columns:minmax(0,1fr) minmax(0,.9fr)}
 body.la2w-sphere .la2w-admin-dashboard .la2w-quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:1100px){
 body.la2w-sphere .la2w-dashboard-columns{grid-template-columns:1fr}
 body.la2w-sphere .la2w-panel-heading h2{font-size:19px!important}
}
@media(max-width:767.98px){
 body.la2w-sphere .main-header-container{min-height:70px!important}
 body.phoenix-cabinet.la2w-sphere .app-header{min-height:70px!important}
 body.la2w-sphere .la2w-dashboard-heading{grid-template-columns:minmax(0,1fr)}
 body.la2w-sphere .la2w-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.la2w-sphere .la2w-dashboard-heading h1{font-size:27px!important}
 body.la2w-sphere .la2w-quick-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 body.la2w-sphere .la2w-quick-grid>a,body.la2w-sphere .la2w-quick-grid>button{min-height:72px}
 body.la2w-sphere .la2w-panel{padding:12px 10px}
 body.la2w-sphere .la2w-legacy-heading{margin-top:20px}
 body.la2w-sphere .la2w-admin-dashboard .la2w-quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:480px){
 body.la2w-sphere .la2w-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.la2w-sphere .la2w-admin-dashboard .la2w-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.la2w-sphere .la2w-metric>i{font-size:21px}
 body.la2w-sphere .la2w-metric strong{font-size:18px}
 body.la2w-sphere .la2w-panel-heading h2{font-size:17px!important}
 body.la2w-sphere .la2w-account-line>i{display:none}
 body.la2w-sphere .la2w-activity-stats strong{font-size:21px}
}

/* Only the LA2WORLD user cabinet branding (the admin section retains configured Sphere logo). */
body.la2w-sphere:not(:has(.main-menu a[href="/admin/phoenix/site"])) .main-sidebar-header .header-logo.phoenix-image-logo{position:relative!important;background:url('../la2world/logo-la2world.svg') center center/contain no-repeat!important;min-width:185px!important;min-height:58px!important;display:block!important}
body.la2w-sphere:not(:has(.main-menu a[href="/admin/phoenix/site"])) .main-sidebar-header .header-logo.phoenix-image-logo img{opacity:0!important}
body.la2w-sphere:not(:has(.main-menu a[href="/admin/phoenix/site"])) .phoenix-sidebar-mobile-logo a{background:url('../la2world/logo-la2world.svg') center/contain no-repeat!important;display:block!important;min-height:50px!important}
body.la2w-sphere:not(:has(.main-menu a[href="/admin/phoenix/site"])) .phoenix-sidebar-mobile-logo img{opacity:0!important}
body.la2w-sphere:not(:has(.main-menu a[href="/admin/phoenix/site"])) .phoenix-overview-kicker{font-size:0!important}
body.la2w-sphere:not(:has(.main-menu a[href="/admin/phoenix/site"])) .phoenix-overview-kicker:before{content:"LA2.WORLD · LINEAGE II";font-size:10px;letter-spacing:1.4px;color:#eab16f}
