:root{
    --aq-shell-navy:#0c1c34;
    --aq-shell-navy-deep:#081326;
    --aq-shell-workspace:#eef1f7;
    --aq-shell-surface:#fff;
    --aq-shell-soft:#f7f9fc;
    --aq-shell-ink:#0a1a30;
    --aq-shell-muted:#62718a;
    --aq-shell-faint:#8493a8;
    --aq-shell-cyan:#10c4e3;
    --aq-shell-cyan-ink:#04252c;
    --aq-shell-cyan-tint:#e3f8fc;
    --aq-shell-gold:#f2b019;
    --aq-shell-danger:#e5484d;
    --aq-shell-line:rgba(10,26,48,.09);
    --aq-shell-sidebar:250px;
    --aq-shell-header:72px;
}

body.aq2-shell-active{
    margin:0;
    min-width:0;
    min-height:100vh;
    min-height:100dvh;
    overflow-x:hidden;
    background:var(--aq-shell-workspace);
    color:var(--aq-shell-ink);
    font-family:"Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.aq2-app-shell{
    min-height:100vh;
    min-height:100dvh;
    display:grid;
    grid-template-columns:var(--aq-shell-sidebar) minmax(0,1fr);
    background:var(--aq-shell-workspace);
}

.aq2-sidebar{
    position:sticky;
    top:0;
    z-index:50;
    height:100vh;
    height:100dvh;
    padding:22px 16px;
    display:flex;
    flex-direction:column;
    color:#fff;
    background:linear-gradient(180deg,var(--aq-shell-navy),var(--aq-shell-navy-deep));
    border-right:1px solid rgba(255,255,255,.06);
}

.aq2-brand{
    min-height:44px;
    padding:4px 8px 18px;
    display:flex;
    align-items:center;
    gap:10px;
    color:#fff;
    text-decoration:none;
}

.aq2-brand img{
    width:34px;
    height:34px;
    object-fit:contain;
}

.aq2-brand span{
    font-family:"Sora","Manrope",sans-serif;
    font-size:18px;
    font-weight:800;
}

.aq2-brand b{color:var(--aq-shell-gold)}
.aq2-header-brand,
.aq2-telegram-brand-logo{display:none}

.aq2-sidebar-scroll{
    flex:1;
    min-height:0;
    overflow-y:auto;
    scrollbar-width:thin;
}

.aq2-nav-group-title{
    padding:18px 12px 8px;
    color:rgba(255,255,255,.42);
    font-size:12px;
    font-weight:800;
    letter-spacing:.16em;
    text-transform:uppercase;
}

.aq2-nav-group-title:first-child{padding-top:0}
.aq2-nav-group{display:grid;gap:3px}

.aq2-nav-link{
    position:relative;
    min-height:44px;
    padding:0 12px;
    border-radius:12px;
    display:flex;
    align-items:center;
    gap:12px;
    color:rgba(255,255,255,.68);
    font-size:13.5px;
    font-weight:650;
    text-decoration:none;
}

.aq2-nav-link:hover,
.aq2-nav-link:focus-visible{
    color:#fff;
    background:rgba(255,255,255,.06);
}

.aq2-nav-link[aria-current="page"]{
    color:#fff;
    font-weight:800;
    background:linear-gradient(90deg,rgba(16,196,227,.22),rgba(16,196,227,.04));
}

.aq2-nav-link[aria-current="page"]::before{
    content:"";
    position:absolute;
    left:0;
    top:9px;
    bottom:9px;
    width:3px;
    border-radius:999px;
    background:var(--aq-shell-cyan);
    box-shadow:0 0 10px var(--aq-shell-cyan);
}

.aq2-icon{
    width:18px;
    height:18px;
    flex:0 0 18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.aq2-level-card{
    margin-top:14px;
    padding:15px;
    border:1px solid rgba(242,176,25,.25);
    border-radius:16px;
    background:linear-gradient(135deg,rgba(242,176,25,.16),rgba(242,176,25,.03));
}

.aq2-level-card strong,
.aq2-level-card span{display:block}
.aq2-level-card strong{font-size:13.5px}
.aq2-level-card span{margin-top:3px;color:var(--aq-shell-gold);font-size:12px;font-weight:700}
.aq2-level-track{height:6px;margin-top:12px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.12)}
.aq2-level-track i{display:block;height:100%;background:linear-gradient(90deg,var(--aq-shell-gold),#ffd469)}
.aq2-level-meta{margin-top:7px!important;color:rgba(255,255,255,.62)!important;font-weight:600!important}

.aq2-workspace{min-width:0;display:flex;flex-direction:column}
.aq2-header{
    position:sticky;
    top:0;
    z-index:45;
    min-height:var(--aq-shell-header);
    padding:0 30px;
    display:flex;
    align-items:center;
    gap:18px;
    background:var(--aq-shell-surface);
    border-bottom:1px solid var(--aq-shell-line);
}

.aq2-heading{min-width:0}
.aq2-heading strong{
    display:block;
    overflow:hidden;
    color:var(--aq-shell-ink);
    font-family:"Sora","Manrope",sans-serif;
    font-size:19px;
    font-weight:800;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.aq2-heading span{display:block;margin-top:2px;color:var(--aq-shell-muted);font-size:12px;font-weight:600}

.aq2-search{
    width:320px;
    height:44px;
    margin-left:22px;
    padding:0 14px;
    border:1px solid var(--aq-shell-line);
    border-radius:12px;
    background:#f1f4f9;
    color:var(--aq-shell-ink);
    font:600 13px "Manrope",sans-serif;
}

.aq2-header-actions{margin-left:auto;display:flex;align-items:center;gap:12px}
.aq2-balance{
    min-height:44px;
    padding:0 13px;
    border:1px solid rgba(242,176,25,.35);
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    gap:9px;
    color:var(--aq-shell-ink);
    background:linear-gradient(135deg,rgba(242,176,25,.14),rgba(242,176,25,.04));
    text-decoration:none;
    font-family:"Sora","Manrope",sans-serif;
    font-size:14px;
    font-weight:700;
}
.aq2-balance img{width:22px;height:22px;object-fit:contain}

.aq2-icon-button,
.aq2-avatar-button{
    position:relative;
    width:44px;
    height:44px;
    padding:0;
    border:1px solid var(--aq-shell-line);
    border-radius:999px;
    display:grid;
    place-items:center;
    color:var(--aq-shell-ink);
    background:#fff;
    cursor:pointer;
}

.aq2-avatar-button{
    color:#fff;
    background:linear-gradient(135deg,#0a7f96,var(--aq-shell-navy));
    font-size:14px;
    font-weight:800;
}

.aq2-notification-count{
    position:absolute;
    top:-3px;
    right:-3px;
    min-width:19px;
    height:19px;
    padding:0 5px;
    border:2px solid #fff;
    border-radius:999px;
    display:grid;
    place-items:center;
    color:#fff;
    background:var(--aq-shell-danger);
    font-size:12px;
    font-weight:800;
}

.aq2-content-slot{
    min-width:0;
    flex:1;
    padding:26px 30px 34px;
    background:var(--aq-shell-workspace);
}

.aq2-content-slot > main{
    width:100%;
    max-width:none;
    margin:0!important;
}
.aq2-content-slot .uh-header,
.aq2-content-slot .uh-title{display:none!important}
.aq2-content-slot .uh-shell{margin-top:0!important}
body.aq2-shell-active .uh-mobile-tabbar{display:none!important}
body.aq2-telegram .telegram-shell-nav{display:none!important}

.aq2-overlay{
    position:fixed;
    inset:0;
    z-index:90;
    background:rgba(6,15,30,.55);
}
.aq2-popover{
    position:fixed;
    z-index:100;
    top:62px;
    right:24px;
    width:min(380px,calc(100vw - 32px));
    max-height:min(680px,calc(100dvh - 84px));
    overflow:auto;
    border:1px solid var(--aq-shell-line);
    border-radius:20px;
    color:var(--aq-shell-ink);
    background:#fff;
    box-shadow:0 24px 54px rgba(8,21,43,.22);
}
.aq2-popover.is-profile{width:262px}
.aq2-search-button{display:none}
.aq2-search-backdrop{position:fixed;inset:0;z-index:105;background:rgba(6,15,30,.58)}
.aq2-search-panel{
    position:fixed;
    z-index:110;
    top:80px;
    left:50%;
    width:min(720px,calc(100vw - 32px));
    max-height:min(720px,calc(100dvh - 112px));
    display:grid;
    grid-template-rows:auto auto auto minmax(120px,1fr) auto;
    overflow:hidden;
    transform:translateX(-50%);
    border-radius:20px;
    color:var(--aq-shell-ink);
    background:#fff;
    box-shadow:0 18px 46px rgba(8,21,43,.18);
}
.aq2-search-panel-head{min-height:68px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--aq-shell-line)}
.aq2-search-panel-head strong,.aq2-search-panel-head span{display:block}
.aq2-search-panel-head strong{font:800 16px/1.3 "Sora",sans-serif}
.aq2-search-panel-head span{margin-top:3px;color:var(--aq-shell-muted);font-size:12px}
.aq2-search-panel-head button{width:44px;height:44px;border:0;border-radius:12px;color:var(--aq-shell-ink);background:#f1f4f9;font-size:24px;cursor:pointer}
.aq2-search-field{min-height:52px;margin:14px 18px 8px;padding:0 14px;display:flex;align-items:center;gap:10px;border:1px solid rgba(10,26,48,.14);border-radius:14px;background:#fff}
.aq2-search-field .aq2-icon{flex:0 0 20px;color:#0a7f96}
.aq2-search-field input{min-width:0;width:100%;height:48px;border:0;outline:0;color:var(--aq-shell-ink);background:transparent;font:700 13px "Manrope",sans-serif}
.aq2-search-scopes{padding:4px 18px 12px;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.aq2-search-scopes::-webkit-scrollbar{display:none}
.aq2-search-scopes button{min-height:44px;padding:0 13px;flex:0 0 auto;border:1px solid var(--aq-shell-line);border-radius:999px;color:var(--aq-shell-muted);background:#fff;font:750 12px "Manrope",sans-serif;cursor:pointer}
.aq2-search-scopes button[aria-pressed="true"]{border-color:var(--aq-shell-ink);color:#fff;background:var(--aq-shell-ink)}
.aq2-search-results{min-height:0;padding:0 12px 8px;overflow:auto}
.aq2-search-row{min-height:60px;padding:10px 10px 10px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-radius:12px;color:var(--aq-shell-ink);text-decoration:none;outline:0}
.aq2-search-row:hover,.aq2-search-row.is-selected,.aq2-search-row:focus-visible{background:#f7fdff;box-shadow:inset 3px 0 #10c4e3}
.aq2-search-row.is-disabled{border:1px dashed rgba(10,26,48,.18);color:var(--aq-shell-muted);background:#fbfcfe}
.aq2-search-row-copy{min-width:0}
.aq2-search-row-copy strong,.aq2-search-row-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aq2-search-row-copy strong{font-size:13.5px;font-weight:800}
.aq2-search-row-copy small{margin-top:3px;color:var(--aq-shell-muted);font-size:12px}
.aq2-search-row-scope{flex:0 0 auto;color:var(--aq-shell-muted);font-size:12px;font-weight:700}
.aq2-search-state{min-height:210px;padding:24px;display:grid;place-content:center;text-align:center}
.aq2-search-state strong{font:800 17px "Sora",sans-serif}
.aq2-search-state span{margin-top:6px;color:var(--aq-shell-muted);font-size:12px}
.aq2-search-state.is-error strong{color:var(--aq-shell-danger)}
.aq2-search-help{min-height:42px;padding:0 18px;display:flex;align-items:center;gap:18px;border-top:1px solid var(--aq-shell-line);color:var(--aq-shell-muted);font-size:12px}
body.aq2-search-open{overflow:hidden}
.aq2-popover-head{padding:18px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.aq2-popover-head strong{font:800 16px "Sora","Manrope",sans-serif}
.aq2-popover-list{display:grid}
.aq2-notification{
    min-height:64px;
    padding:13px 18px;
    border-top:1px solid rgba(10,26,48,.06);
    display:block;
    color:var(--aq-shell-ink);
    text-decoration:none;
}
.aq2-notification.is-unread{background:rgba(16,196,227,.05)}
.aq2-notification strong{display:block;font-size:13px}
.aq2-notification span{display:block;margin-top:3px;color:var(--aq-shell-muted);font-size:12px;line-height:1.45}
.aq2-menu-link,
.aq2-menu-button{
    width:100%;
    min-height:44px;
    padding:0 16px;
    border:0;
    display:flex;
    align-items:center;
    color:var(--aq-shell-ink);
    background:#fff;
    text-decoration:none;
    font:700 13px "Manrope",sans-serif;
    cursor:pointer;
}
.aq2-menu-link:hover,.aq2-menu-button:hover{background:#f7f9fc}
.aq2-menu-button.is-danger{color:var(--aq-shell-danger);border-top:1px solid var(--aq-shell-line)}

.aq2-bottom-nav,
.aq2-telegram-context,
.aq2-telegram-main{display:none}

.aq2-system-state{
    min-height:360px;
    padding:32px;
    border:1px solid var(--aq-shell-line);
    border-radius:20px;
    display:grid;
    place-items:center;
    text-align:center;
    background:#fff;
    box-shadow:0 10px 30px rgba(8,21,43,.06);
}
.aq2-system-state-inner{width:min(100%,520px)}
.aq2-system-state-icon{
    width:96px;
    height:96px;
    margin:0 auto 18px;
    border-radius:28px;
    display:grid;
    place-items:center;
    color:#0a7f96;
    background:var(--aq-shell-cyan-tint);
}
.aq2-system-state.is-error .aq2-system-state-icon{color:#c0343a;background:#fff0f0}
.aq2-system-state h2{margin:0;font:800 21px "Sora","Manrope",sans-serif}
.aq2-system-state p{margin:10px auto 0;color:var(--aq-shell-muted);font-size:13px;line-height:1.55}
.aq2-system-state code{display:inline-block;margin-top:12px;padding:6px 9px;border-radius:8px;background:#f1f4f9;font-size:12px}
.aq2-state-actions{margin-top:18px;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.aq2-state-action{min-height:44px;padding:0 16px;border:1px solid var(--aq-shell-ink);border-radius:12px;color:#fff;background:var(--aq-shell-ink);font-weight:800}
.aq2-state-action.is-secondary{color:var(--aq-shell-ink);background:#fff;border-color:var(--aq-shell-line)}
.aq2-skeleton{display:grid;gap:14px}
.aq2-skeleton-block{height:86px;border-radius:18px;background:linear-gradient(90deg,#e4e9f2 0%,#f2f5fa 40%,#e4e9f2 80%);background-size:380px 100%;animation:aq2-shimmer 1.4s linear infinite}
@keyframes aq2-shimmer{from{background-position:-380px 0}to{background-position:380px 0}}

:where(.aq2-app-shell a,.aq2-app-shell button,.aq2-app-shell input):focus-visible{
    outline:2px solid var(--aq-shell-cyan);
    outline-offset:2px;
}

@media(prefers-reduced-motion:reduce){
    .aq2-skeleton-block{animation:none}
}

@media(max-width:760px){
    .aq2-app-shell{display:block;padding-bottom:calc(82px + env(safe-area-inset-bottom))}
    .aq2-sidebar{display:none}
    .aq2-header{
        position:sticky;
        min-height:102px;
        padding:calc(8px + env(safe-area-inset-top)) 12px 10px;
        display:grid;
        grid-template-columns:70px minmax(0,1fr);
        grid-template-areas:
            "brand actions"
            "heading heading";
        align-items:center;
        column-gap:10px;
        row-gap:6px;
        color:#fff;
        background:linear-gradient(180deg,var(--aq-shell-navy),var(--aq-shell-navy-deep));
        border:0;
    }
    .aq2-header-brand{
        grid-area:brand;
        position:relative;
        width:70px;
        height:44px;
        display:grid;
        place-items:center;
        overflow:hidden;
        border-radius:14px;
        background:rgba(255,255,255,.06);
    }
    .aq2-header-brand img{
        position:absolute;
        left:50%;
        top:50%;
        width:90px;
        height:90px;
        max-width:none;
        transform:translate(-50%,-50%);
        object-fit:contain;
    }
    .aq2-heading{grid-area:heading;align-self:end}
    .aq2-heading strong{color:#fff;font-size:19px}
    .aq2-heading span{color:rgba(255,255,255,.64)}
    .aq2-search{display:none}
    .aq2-search-button{display:grid}
    .aq2-header-actions{grid-area:actions;justify-self:end;margin-left:0;gap:8px}
    .aq2-balance{min-height:44px;padding:0 9px;color:#fff;background:rgba(242,176,25,.12)}
    .aq2-balance img{width:19px;height:19px}
    .aq2-icon-button,.aq2-avatar-button{width:44px;height:44px}
    .aq2-content-slot{padding:14px 12px 22px}
    .aq2-bottom-nav{
        position:fixed;
        left:0;
        right:0;
        bottom:0;
        z-index:70;
        min-height:calc(68px + env(safe-area-inset-bottom));
        padding:8px 6px calc(8px + env(safe-area-inset-bottom));
        border-top:1px solid var(--aq-shell-line);
        display:grid;
        grid-template-columns:repeat(6,minmax(0,1fr));
        background:#fff;
    }
    .aq2-bottom-nav a{
        min-width:0;
        min-height:52px;
        padding:5px 2px;
        display:grid;
        place-items:center;
        align-content:center;
        gap:4px;
        color:var(--aq-shell-muted);
        font-size:12px;
        font-weight:750;
        text-decoration:none;
    }
    .aq2-bottom-nav a[aria-current="page"]{color:#0a7f96}
    .aq2-bottom-nav .aq2-icon{width:21px;height:21px}
    .aq2-overlay{display:block}
    .aq2-popover{
        top:auto;
        right:0;
        bottom:0;
        left:0;
        width:100%;
        max-height:78dvh;
        border-radius:26px 26px 0 0;
    }
    .aq2-popover.is-profile{width:100%}
    .aq2-search-panel{
        top:0;
        bottom:0;
        left:0;
        width:100%;
        max-height:none;
        transform:none;
        border-radius:0;
        padding-top:env(safe-area-inset-top);
    }
    .aq2-search-panel-head{min-height:64px}
    .aq2-search-field{min-height:48px;margin:8px 14px}
    .aq2-search-scopes{padding:4px 14px 10px}
    .aq2-search-results{padding:0 8px calc(18px + env(safe-area-inset-bottom))}
    .aq2-search-row{min-height:64px}
    .aq2-search-help{display:none}
    .aq2-system-state{min-height:330px;padding:24px 18px;border-radius:18px}
    .aq2-system-state-icon{width:78px;height:78px}
}

body.aq2-telegram .aq2-header{display:none}
body.aq2-telegram .aq2-app-shell{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
body.aq2-telegram .aq2-telegram-context{
    position:sticky;
    top:0;
    z-index:55;
    padding:8px 12px 10px;
    display:block;
    color:#fff;
    background:linear-gradient(180deg,var(--aq-shell-navy),var(--aq-shell-navy-deep));
}
.aq2-telegram-meta{display:flex;align-items:center;justify-content:space-between;gap:10px}
.aq2-telegram-identity{min-width:0;display:flex;align-items:center;gap:9px}
.aq2-telegram-identity > strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aq2-telegram-brand-logo{
    position:relative;
    width:70px;
    height:44px;
    flex:0 0 70px;
    display:grid;
    place-items:center;
    overflow:hidden;
    border-radius:14px;
    background:rgba(255,255,255,.06);
}
.aq2-telegram-brand-logo img{
    position:absolute;
    left:50%;
    top:50%;
    width:90px;
    height:90px;
    max-width:none;
    transform:translate(-50%,-50%);
    object-fit:contain;
}
.aq2-telegram-actions{display:flex;align-items:center;gap:10px}
.aq2-telegram-search{width:44px;height:44px;color:#fff;background:rgba(255,255,255,.08)}
.aq2-segmented-nav{margin-top:10px;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.aq2-segmented-nav::-webkit-scrollbar{display:none}
.aq2-segmented-nav a{
    min-height:44px;
    padding:0 14px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    color:rgba(255,255,255,.72);
    background:rgba(255,255,255,.06);
    font-size:12px;
    font-weight:750;
    text-decoration:none;
    white-space:nowrap;
}
.aq2-segmented-nav a[aria-current="page"]{color:var(--aq-shell-cyan-ink);background:var(--aq-shell-cyan)}
body.aq2-telegram .aq2-bottom-nav{display:none}
body.aq2-telegram .aq2-content-slot{padding:14px 12px 18px}
body.aq2-telegram .aq2-telegram-main{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:70;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));
    display:block;
    background:var(--aq-shell-workspace);
    border-top:1px solid var(--aq-shell-line);
}
.aq2-telegram-main button{
    width:100%;
    min-height:50px;
    border:0;
    border-radius:12px;
    color:var(--aq-shell-cyan-ink);
    background:var(--aq-shell-cyan);
    font:800 14.5px "Manrope",sans-serif;
}
.aq2-telegram-main[hidden]{display:none!important}

@media(max-width:360px){
    .aq2-header .aq2-balance{
        width:44px;
        padding:0;
        justify-content:center;
    }
    .aq2-header .aq2-balance span,
    .aq2-telegram-actions [data-aq2-balance-compact]{display:none}
}

/* Admin navigation only. The shared nav link is 38px tall, which is fine for
 * the product's own sidebar but below the 44px touch target AWARDIQS requires
 * of the admin surface. Scoped to the admin shell so the user product keeps its
 * existing density unchanged. */
[data-aq-shell-scope="admin"] .aq2-nav-link{min-height:44px}
/* Inherited from the migrated pages' own markup, not from the shell: header
 * icons and filter controls sit at 28-40px. Raised only inside the admin scope,
 * so legacy admin pages and the user product are untouched. */
/* `body[...]` rather than `[...]`: the migrated pages carry their own inline
 * <style> after this file, and rules like `.admin-diagnostics summary` tie on
 * specificity and win on source order. One extra element selector settles it
 * without resorting to !important. */
body[data-aq-shell-scope="admin"] .top-icon,
body[data-aq-shell-scope="admin"] .top-line a,
body[data-aq-shell-scope="admin"] .users-filter-chip,
body[data-aq-shell-scope="admin"] .action-link,
body[data-aq-shell-scope="admin"] .soft-button,
body[data-aq-shell-scope="admin"] .button,
body[data-aq-shell-scope="admin"] summary,
body[data-aq-shell-scope="admin"] button{min-height:44px;display:flex;align-items:center}
