*{box-sizing:border-box}
:root{
    --app-bg:#f3f3f1;
    --app-surface:#fff;
    --app-soft:#f8f8f7;
    --app-text:#111;
    --app-muted:rgba(17,17,17,.62);
    --app-line:rgba(17,17,17,.12);
    --app-radius-page:34px;
    --app-radius-card:14px;
    --app-radius-row:12px;
    --app-radius-control:10px;
    --app-shadow:0 8px 22px rgba(0,0,0,.045);
    --aq-bg:#f4f6fb;
    --aq-shell:#ffffff;
    --aq-surface:#ffffff;
    --aq-soft:#f8fafc;
    --aq-ink:#071225;
    --aq-muted:rgba(7,18,37,.62);
    --aq-line:rgba(15,23,42,.1);
    --aq-navy:#061123;
    --aq-navy-soft:#0b1b36;
    --aq-cyan:#12d8f6;
    --aq-gold:#f6b81a;
    --aq-blue:#245cff;
    --aq-green:#16a34a;
    --aq-red:#ef4444;
    --aq-yellow:#f6b81a;
    --aq-radius-page:34px;
    --aq-radius-xl:28px;
    --aq-radius-lg:22px;
    --aq-radius-md:16px;
    --aq-radius-sm:12px;
    --aq-radius-pill:999px;
    --aq-shadow:0 18px 46px rgba(11,23,49,.09);
    --aq-shadow-soft:0 10px 28px rgba(11,23,49,.07);
    --aq-shadow-row:0 6px 18px rgba(11,23,49,.045);
    --aq-topbar-height:66px;
    --aq-bottom-nav-height:68px;
}

/* AWARDIQS Design System Foundation.
   These aq-* classes are opt-in and do not change existing screens until a page adopts them. */

.aq-shell{
    min-height:100vh;
    min-height:100dvh;
    background:var(--aq-bg);
    color:var(--aq-ink);
    font-family:-apple-system,BlinkMacSystemFont,"Inter","SF Pro Display","Segoe UI",sans-serif;
}

.aq-shell::before{
    content:"";
    position:fixed;
    inset:0 0 auto;
    height:var(--aq-topbar-height);
    background:linear-gradient(135deg,var(--aq-navy) 0%,var(--aq-navy-soft) 62%,#050b16 100%);
    z-index:-1;
}

.aq-topbar{
    width:min(calc(100% - 28px),1280px);
    min-height:var(--aq-topbar-height);
    margin:0 auto;
    padding:10px 0;
    display:grid;
    grid-template-columns:minmax(150px,auto) minmax(0,1fr) auto;
    gap:16px;
    align-items:center;
    color:#fff;
}

.aq-brand{
    min-width:0;
    display:inline-flex;
    align-items:center;
    gap:9px;
    color:#fff;
    text-decoration:none;
    font-size:18px;
    line-height:1;
    font-weight:920;
    letter-spacing:.01em;
}

.aq-brand-mark{
    width:40px;
    height:40px;
    border:1px solid rgba(18,216,246,.5);
    border-radius:12px;
    color:var(--aq-cyan);
    display:inline-grid;
    place-items:center;
    font-size:26px;
    line-height:1;
    font-weight:950;
    text-shadow:0 0 16px rgba(18,216,246,.42);
}

.aq-brand-name{
    white-space:nowrap;
}

.aq-brand-name b{
    color:var(--aq-gold);
}

.aq-nav{
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:4px;
}

.aq-nav a,
.aq-nav span{
    min-height:38px;
    border-radius:var(--aq-radius-pill);
    padding:11px 13px;
    color:rgba(255,255,255,.78);
    font-size:12px;
    line-height:1;
    font-weight:850;
    text-decoration:none;
    white-space:nowrap;
}

.aq-nav .is-active,
.aq-nav a:hover,
.aq-nav a:focus-visible{
    color:var(--aq-gold);
    background:rgba(255,255,255,.08);
    outline:none;
}

.aq-actions{
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
}

.aq-search{
    width:min(280px,24vw);
    min-height:38px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:var(--aq-radius-pill);
    background:rgba(255,255,255,.12);
    color:#fff;
    padding:0 14px;
    font:inherit;
    font-size:12px;
}

.aq-search::placeholder{
    color:rgba(255,255,255,.58);
}

.aq-pill,
.aq-icon-button,
.aq-avatar{
    border:1px solid rgba(255,255,255,.1);
    border-radius:var(--aq-radius-pill);
    background:rgba(255,255,255,.1);
    color:#fff;
    text-decoration:none;
}

.aq-pill{
    min-height:38px;
    padding:8px 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    font-size:12px;
    line-height:1;
    font-weight:880;
    white-space:nowrap;
}

.aq-icon-button{
    width:38px;
    height:38px;
    display:inline-grid;
    place-items:center;
    font:inherit;
}

.aq-avatar{
    width:36px;
    height:36px;
    border-color:rgba(246,184,26,.55);
    background:linear-gradient(135deg,#7c2d12,#f59e0b);
    display:inline-grid;
    place-items:center;
    font-weight:900;
}

.aq-main{
    width:min(calc(100% - 28px),1240px);
    margin:0 auto 32px;
    padding:22px;
    border:1px solid var(--aq-line);
    border-radius:0 0 var(--aq-radius-page) var(--aq-radius-page);
    background:var(--aq-shell);
    box-shadow:var(--aq-shadow);
}

.aq-grid{
    display:grid;
    gap:14px;
}

.aq-grid.is-two{
    grid-template-columns:minmax(0,1fr) minmax(280px,.34fr);
    align-items:start;
}

.aq-card,
.aq-panel,
.aq-match-card{
    border:1px solid var(--aq-line);
    border-radius:var(--aq-radius-lg);
    background:var(--aq-surface);
    box-shadow:var(--aq-shadow-soft);
}

.aq-card,
.aq-panel{
    padding:16px;
}

.aq-card.is-compact{
    padding:12px;
    border-radius:var(--aq-radius-md);
}

.aq-stack{
    display:grid;
    gap:10px;
}

.aq-row{
    display:flex;
    align-items:center;
    gap:10px;
}

.aq-row.is-between{
    justify-content:space-between;
}

.aq-button{
    min-height:40px;
    border:1px solid var(--aq-ink);
    border-radius:var(--aq-radius-pill);
    background:var(--aq-ink);
    color:#fff;
    padding:10px 14px;
    font:inherit;
    font-size:12px;
    line-height:1;
    font-weight:850;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    box-shadow:0 10px 22px rgba(7,18,37,.12);
    cursor:pointer;
}

.aq-button.is-secondary{
    background:#fff;
    color:var(--aq-ink);
    border-color:var(--aq-line);
    box-shadow:none;
}

.aq-button.is-danger{
    background:#fff;
    color:var(--aq-red);
    border-color:rgba(239,68,68,.38);
    box-shadow:none;
}

.aq-field{
    width:100%;
    min-height:42px;
    border:1px solid var(--aq-line);
    border-radius:var(--aq-radius-sm);
    background:#fff;
    color:var(--aq-ink);
    padding:10px 12px;
    font:inherit;
    font-size:13px;
}

.aq-field:focus,
.aq-button:focus-visible,
.aq-icon-button:focus-visible{
    outline:2px solid rgba(36,92,255,.22);
    outline-offset:2px;
}

.aq-badge{
    width:max-content;
    max-width:100%;
    min-height:24px;
    border:1px solid var(--aq-line);
    border-radius:var(--aq-radius-pill);
    background:var(--aq-soft);
    color:var(--aq-muted);
    padding:5px 9px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    font-size:11px;
    line-height:1;
    font-weight:860;
    white-space:nowrap;
}

.aq-badge.is-live,
.aq-badge.is-success{
    border-color:rgba(22,163,74,.24);
    background:#dcfce7;
    color:#137333;
}

.aq-badge.is-info{
    border-color:rgba(36,92,255,.18);
    background:#eef2ff;
    color:#4963a8;
}

.aq-badge.is-warning{
    border-color:rgba(246,184,26,.28);
    background:#fff8df;
    color:#8a5a00;
}

.aq-badge.is-danger{
    border-color:rgba(239,68,68,.28);
    background:#fff1f2;
    color:#b42318;
}

.aq-match-card{
    padding:10px 12px;
    display:grid;
    gap:8px;
}

.aq-match-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(64px,auto) minmax(0,1fr);
    gap:10px;
    align-items:center;
}

.aq-match-team{
    min-width:0;
    display:grid;
    gap:5px;
}

.aq-match-team.is-home{
    justify-items:start;
    text-align:left;
}

.aq-match-team.is-away{
    justify-items:end;
    text-align:right;
}

.aq-team-main{
    min-width:0;
    display:flex;
    align-items:center;
    gap:7px;
    max-width:100%;
}

.aq-match-team.is-away .aq-team-main{
    flex-direction:row-reverse;
}

.aq-team-icon{
    width:24px;
    height:24px;
    min-width:24px;
    border-radius:999px;
    object-fit:cover;
    background:#fff;
    border:1px solid var(--aq-line);
    box-shadow:0 4px 10px rgba(11,23,49,.08);
}

.aq-team-name{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
    line-height:1.1;
    font-weight:850;
}

.aq-match-score{
    font-size:20px;
    line-height:1;
    font-weight:950;
}

.aq-match-center{
    min-width:0;
    display:grid;
    justify-items:center;
    gap:3px;
    text-align:center;
}

.aq-match-clock{
    color:var(--aq-green);
    font-size:10px;
    line-height:1;
    font-weight:900;
}

.aq-stat-line{
    display:flex;
    gap:5px;
    align-items:center;
    flex-wrap:wrap;
}

.aq-match-team.is-away .aq-stat-line{
    justify-content:flex-end;
}

.aq-stat{
    border-radius:var(--aq-radius-pill);
    background:var(--aq-soft);
    padding:2px 5px;
    color:rgba(7,18,37,.76);
    font-size:10px;
    line-height:1;
    font-weight:900;
}

.aq-mobile-title{
    display:none;
}

.aq-mobile-nav{
    display:none;
}

@media(max-width:760px){
    .aq-shell{
        padding-bottom:calc(var(--aq-bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
    }

    .aq-shell::before{
        height:148px;
    }

    .aq-topbar{
        width:100%;
        min-height:112px;
        padding:14px 14px 18px;
        grid-template-columns:auto minmax(0,1fr) auto;
        gap:10px;
    }

    .aq-brand-name,
    .aq-nav,
    .aq-search{
        display:none;
    }

    .aq-brand-mark{
        width:38px;
        height:38px;
        border-radius:11px;
        font-size:25px;
    }

    .aq-mobile-title{
        display:block;
        min-width:0;
        color:#fff;
        font-size:23px;
        line-height:1;
        font-weight:920;
        letter-spacing:-.02em;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }

    .aq-actions{
        gap:8px;
    }

    .aq-pill{
        min-height:34px;
        padding:7px 10px;
    }

    .aq-icon-button,
    .aq-avatar{
        width:34px;
        height:34px;
    }

    .aq-main{
        width:min(100% - 16px,520px);
        margin:-22px auto 0;
        padding:10px;
        border-radius:24px;
    }

    .aq-grid.is-two{
        grid-template-columns:1fr;
    }

    .aq-match-row{
        grid-template-columns:minmax(0,1fr) minmax(54px,auto) minmax(0,1fr);
        gap:6px;
    }

    .aq-match-score{
        font-size:18px;
    }

    .aq-mobile-nav{
        position:fixed;
        left:12px;
        right:12px;
        bottom:max(10px,env(safe-area-inset-bottom));
        z-index:3000;
        min-height:var(--aq-bottom-nav-height);
        border:1px solid var(--aq-line);
        border-radius:22px;
        background:rgba(255,255,255,.94);
        box-shadow:0 18px 48px rgba(11,23,49,.18);
        backdrop-filter:blur(18px);
        display:grid;
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:4px;
        padding:7px;
    }

    .aq-mobile-nav a,
    .aq-mobile-nav span{
        min-width:0;
        border-radius:16px;
        color:rgba(15,23,42,.62);
        display:grid;
        place-items:center;
        gap:3px;
        font-size:10px;
        line-height:1;
        font-weight:850;
        text-decoration:none;
        white-space:nowrap;
    }

    .aq-mobile-nav b{
        font-size:20px;
        line-height:1;
        font-weight:900;
    }

    .aq-mobile-nav .is-active{
        color:var(--aq-blue);
        background:#eff4ff;
    }
}

.app-header{
    min-height:46px;
    display:grid;
    grid-template-columns:40px 1fr 40px;
    align-items:center;
    gap:10px;
}

.app-header-title{
    font-size:22px;
    line-height:1;
    font-weight:760;
    letter-spacing:-.02em;
    text-align:center;
}

.app-icon-button{
    width:40px;
    height:40px;
    border:0;
    background:transparent;
    color:var(--app-text);
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.app-section{
    margin-bottom:10px;
}

.app-card{
    border:1px solid var(--app-line);
    border-radius:var(--app-radius-card);
    background:var(--app-surface);
    box-shadow:var(--app-shadow);
}

.app-list-row{
    width:100%;
    min-height:44px;
    border:1px solid var(--app-line);
    border-radius:var(--app-radius-row);
    background:var(--app-surface);
}

.app-badge{
    width:22px;
    height:22px;
    min-width:22px;
    border-radius:999px;
    background:#050505;
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    line-height:1;
    font-weight:800;
    letter-spacing:-.02em;
}

.app-button{
    min-height:40px;
    border:1px solid #111;
    border-radius:var(--app-radius-control);
    padding:9px 12px;
    background:#060606;
    color:#fff;
    font:inherit;
    font-size:12px;
    font-weight:760;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.app-button.secondary{
    background:#fff;
    color:#111;
}

.app-button.danger{
    background:#fff;
    color:#9b1111;
    border-color:#9b1111;
    box-shadow:none;
}

.app-chip{
    width:max-content;
    border-radius:7px;
    background:#f0f0ef;
    padding:4px 8px;
    color:var(--app-muted);
}

.app-user-avatar{
    width:40px;
    height:40px;
    border-radius:999px;
    background:#050505;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    font-weight:800;
}

.app-empty-state,
.app-status{
    color:var(--app-muted);
    font-size:12px;
    line-height:1.45;
}

.app-action-row{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
}

.app-shell{
    width:min(100%,430px);
    min-height:100vh;
    margin:0 auto;
    padding:18px 18px 34px;
    background:var(--app-surface);
}

.app-top-line{
    min-height:46px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
    color:var(--app-text);
    font-size:12px;
}

.app-title{
    margin:8px 0 14px;
    font-size:26px;
    line-height:1.05;
    font-weight:780;
    letter-spacing:-.03em;
    text-align:center;
}

.app-nav{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    overflow:visible;
    padding:0 0 10px;
    margin:0 0 10px;
}

.app-nav .app-button{
    white-space:nowrap;
    flex:0 0 auto;
}

.app-nav .is-active{
    background:#060606;
    color:#fff;
    box-shadow:0 5px 12px rgba(0,0,0,.1);
}

.admin-main-nav{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    overflow:visible;
    padding:0 0 10px;
    margin:0 0 10px;
}

.admin-main-nav a,
.admin-main-nav span{
    min-height:38px;
    border:1px solid var(--app-line);
    border-radius:var(--app-radius-control);
    padding:8px 11px;
    background:#fff;
    color:#111;
    font-size:12px;
    line-height:1;
    font-weight:760;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    white-space:nowrap;
}

.admin-main-nav .is-active{
    border-color:#111;
    background:#111;
    color:#fff;
    box-shadow:0 5px 12px rgba(0,0,0,.1);
}

.admin-section-note{
    margin:-4px 0 12px;
    color:var(--app-muted);
    font-size:12px;
    line-height:1.45;
}

.app-category{
    border:1px solid var(--app-line);
    border-radius:var(--app-radius-card);
    background:var(--app-surface);
    box-shadow:var(--app-shadow);
    margin-bottom:10px;
    overflow:hidden;
}

.app-category summary{
    min-height:54px;
    padding:10px 12px;
    display:grid;
    grid-template-columns:1fr auto 24px;
    gap:10px;
    align-items:center;
    cursor:pointer;
    list-style:none;
    font-weight:760;
    letter-spacing:-.02em;
}

.app-category summary::-webkit-details-marker{
    display:none;
}

.app-category summary::after{
    content:"⌄";
    width:24px;
    height:24px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    transition:transform .24s ease;
}

.app-category[open] summary::after{
    transform:rotate(180deg);
}

.app-category-body{
    display:grid;
    gap:10px;
    padding:0 12px 12px;
}

.app-form-grid{
    display:grid;
    gap:10px;
}

.app-form-grid label{
    display:grid;
    gap:6px;
    font-size:12px;
    color:var(--app-muted);
}

.app-form-grid input,
.app-form-grid select,
.app-form-grid textarea{
    width:100%;
    min-height:42px;
    border:1px solid var(--app-line);
    border-radius:var(--app-radius-control);
    padding:10px 12px;
    background:#fff;
    color:var(--app-text);
    font:inherit;
}

.app-form-grid textarea{
    min-height:110px;
    resize:vertical;
}

.app-compact-card{
    border:1px solid var(--app-line);
    border-radius:var(--app-radius-row);
    background:#fff;
    padding:11px 12px;
    display:grid;
    gap:8px;
}

.app-compact-card strong{
    font-size:14px;
    line-height:1.2;
    font-weight:760;
}

.app-compact-card span,
.app-compact-card p{
    font-size:12px;
    line-height:1.35;
    color:var(--app-muted);
}

@media(min-width:760px){
    .app-shell{
        margin:24px auto;
        min-height:calc(100vh - 48px);
        border:1px solid rgba(17,17,17,.08);
        border-radius:var(--app-radius-page);
        box-shadow:0 20px 60px rgba(0,0,0,.08);
    }
}

@media(max-width:620px){
    .app-shell{
        padding:18px 14px 28px;
    }

    .app-top-line{
        min-height:38px;
        gap:8px;
        margin-bottom:8px;
        font-size:11px;
    }

    .app-top-line > *{
        min-width:0;
    }

    .app-top-line span,
    .app-top-line a{
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }

    .app-nav{
        flex-wrap:nowrap;
        overflow-x:auto;
        overscroll-behavior-x:contain;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
        padding:0 2px 10px;
        margin:0 -2px 10px;
    }

    .app-nav::-webkit-scrollbar{
        display:none;
    }

    .app-nav .app-button{
        min-height:40px;
    }

    .admin-main-nav{
        flex-wrap:nowrap;
        overflow-x:auto;
        overscroll-behavior-x:contain;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
        padding:0 2px 10px;
        margin:0 -2px 10px;
    }

    .admin-main-nav::-webkit-scrollbar{
        display:none;
    }

    .admin-main-nav a,
    .admin-main-nav span{
        flex:0 0 auto;
    }

    .app-action-row{
        gap:8px;
    }

    .app-badge{
        width:22px;
        height:22px;
        min-width:22px;
    }
}
/* Package 11 system Toast: one shared presentation layer for existing runtime calls. */
.system-toast-root{
    position:fixed;
    left:50%;
    bottom:22px;
    z-index:120;
    width:min(calc(100% - 32px),420px);
    display:grid;
    gap:8px;
    transform:translateX(-50%);
    pointer-events:none;
}
.system-toast{
    min-height:48px;
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;
    color:#fff;
    background:#0a1a30;
    box-shadow:0 18px 40px rgba(0,0,0,.35);
    font:700 12.5px/1.4 "Manrope",sans-serif;
    pointer-events:auto;
    cursor:pointer;
    animation:aq-toast-in .35s cubic-bezier(.22,1,.36,1);
}
.system-toast-icon{
    flex:0 0 24px;
    width:24px;
    height:24px;
    display:grid;
    place-items:center;
    border-radius:50%;
    color:#0a1a30;
    background:#5fe6fb;
    font-size:12px;
    font-weight:900;
}
.system-toast-copy{min-width:0;overflow-wrap:anywhere}
.system-toast.is-success .system-toast-icon,
.system-toast.is-saved .system-toast-icon{background:#5ee08f}
.system-toast.is-error .system-toast-icon{background:#ff9ea1}
.system-toast.is-warning .system-toast-icon{background:#ffd469}
.system-toast.is-saving .system-toast-icon{animation:aq-toast-spin .8s linear infinite}
@keyframes aq-toast-in{from{opacity:0;transform:translateY(10px)}}
@keyframes aq-toast-spin{to{transform:rotate(360deg)}}
@media(max-width:760px){
    .system-toast-root{
        bottom:calc(80px + env(safe-area-inset-bottom));
        width:calc(100% - 28px);
    }
    body.aq2-telegram .system-toast-root,
    body.is-awardiqs-telegram .system-toast-root{
        top:auto;
        bottom:calc(82px + env(safe-area-inset-bottom));
    }
}
@media(prefers-reduced-motion:reduce){
    .system-toast{animation:none}
    .system-toast.is-saving .system-toast-icon{animation:none}
}
