:root{
    --bg:#050505;
    --panel:#101113;
    --panel2:#17191c;
    --line:#2a2d31;
    --text:#f5f5f5;
    --muted:#9ca3af;
    --green:#c8ff00;
    --green2:#8fdc00;
    --danger:#ff5c5c;
    --radius-xl:22px;
    --radius-lg:18px;
    --glass:rgba(17,19,22,.58);
    --glass-strong:rgba(17,19,22,.78);
    --glow:0 0 0 1px rgba(200,255,0,.12),0 20px 60px rgba(0,0,0,.45);
    --card-size:260px;
}

*{box-sizing:border-box}

body{
    margin:0;
    background:radial-gradient(circle at top right,#172000 0,#050505 35%,#050505 100%);
    color:var(--text);
    font-family:Inter,Arial,sans-serif;
}

a{
    color:inherit;
    text-decoration:none;
}

.logo{
    height:38px;
    object-fit:contain;
}

.app{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:285px;
    border-right:1px solid rgba(255,255,255,.08);
    padding:24px;
    background:linear-gradient(180deg,rgba(24,26,30,.72),rgba(8,9,10,.62));
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    position:sticky;
    top:0;
    height:100vh;
    overflow:auto;
    box-shadow:0 18px 50px rgba(0,0,0,.28);
}

.brand{
    display:flex;
    align-items:center;
    gap:18px;
    margin-bottom:34px;
}

.brand span{
    color:var(--green);
    font-size:13px;
    font-weight:800;
    letter-spacing:.08em;
}

.sidebar-main-menu{
    margin:0 -6px 18px;
    padding:12px 6px;
    border:1px solid rgba(255,255,255,.07);
    border-radius:18px;
    background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.025));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

.client-brand{
    display:block;
    text-align:left;
}

.client-brand .logo{
    height:92px;
    max-width:220px;
    display:block;
    margin-bottom:18px;
}

.section-label{
    font-size:12px;
    color:var(--muted);
    text-transform:uppercase;
    margin:26px 0 10px;
    padding-top:18px;
    border-top:1px solid rgba(255,255,255,.08);
}

.filter-menu{
    margin:0;
}

.filter-menu .section-label{
    cursor:pointer;
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    user-select:none;
}

.filter-menu .section-label::-webkit-details-marker{
    display:none;
}

.filter-menu .section-label::after{
    content:"+";
    color:var(--green);
    font-size:18px;
    line-height:1;
    transition:transform .22s ease;
}

.filter-menu[open] .section-label::after{
    transform:rotate(45deg);
}

.filter-menu-content{
    animation:dopeFadeUp .22s ease both;
}

.brand + .filter,
.brand + .section-label,
.brand + .filter-menu .section-label,
.sidebar-main-menu + .filter-menu .section-label,
.sidebar > .filter:first-of-type{
    border-top:0;
    padding-top:10px;
}

.filter{
    display:block;
    padding:10px 12px;
    border-radius:999px;
    color:#d1d5db;
    font-size:14px;
    margin-bottom:6px;
    border:1px solid transparent;
    transition:all .22s ease;
}

.filter + .filter{
    border-top:1px solid rgba(255,255,255,.045);
}

.filter:hover,
.filter.active{
    background:linear-gradient(135deg,rgba(200,255,0,.18),rgba(200,255,0,.05));
    border-color:rgba(200,255,0,.28);
    color:var(--green);
    transform:translateX(3px);
}

.filter.has-content{
    border-color:rgba(200,255,0,.35);
    color:var(--green);
    background:rgba(200,255,0,.04);
}

.filter.has-content::after{
    content:"•";
    float:right;
    color:var(--green);
    font-size:18px;
    line-height:1;
}

.period-month{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding-left:20px;
}

.period-month b{
    background:rgba(200,255,0,.18);
    color:var(--green);
    border-radius:999px;
    padding:3px 9px;
    font-size:12px;
}

.taglist{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.tag{
    border:1px solid rgba(255,255,255,.08);
    padding:9px 11px;
    border-radius:999px;
    color:#cfd3d8;
    font-size:13px;
}

.tag.active{
    border-color:var(--green);
    color:var(--green);
    background:rgba(200,255,0,.09);
}

.main{
    flex:1;
    padding:28px 36px;
}

.client-main{
    padding-bottom:110px;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-bottom:36px;
}

.search{
    background:var(--panel);
    border:1px solid var(--line);
    color:var(--text);
    padding:14px 16px;
    border-radius:999px;
    min-width:320px;
}

.btn{
    border:0;
    border-radius:999px;
    padding:11px 18px;
    font-weight:800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    transition:all .22s ease;
    box-shadow:0 10px 24px rgba(0,0,0,.25);
}

.btn.green{
    background:linear-gradient(135deg,#d7ff35 0%,#9dff00 48%,#57c900 100%);
    color:#0b0b0b;
}

.btn.dark{
    background:linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,.02));
    border:1px solid rgba(255,255,255,.10);
    color:#fff;
}

.btn.danger{
    background:var(--danger);
    color:#fff;
}

.btn:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 34px rgba(200,255,0,.16);
}

.hero{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
    animation:dopeFadeUp .45s ease both;
}

.hello{
    color:#d1d5db;
}

.hello strong{
    color:var(--green);
}

h1{
    font-size:42px;
    line-height:1;
    margin:10px 0;
}

.muted{
    color:var(--muted);
}

.stat,
.period-panel,
.activebar,
.card,
.stream-card,
.asset-card,
.form-wrap,
.table,
.login-card{
    background:linear-gradient(180deg,rgba(24,26,30,.72),rgba(8,9,10,.62));
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.08);
    border-radius:var(--radius-xl);
    box-shadow:0 18px 50px rgba(0,0,0,.28);
}

.stat{
    padding:22px;
    min-width:220px;
}

.stat b{
    display:block;
    color:var(--green);
    font-size:34px;
}

.activebar{
    padding:14px 16px;
    margin:28px 0;
    animation:dopeFadeUp .45s ease both;
}

.pill{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin:4px 8px 4px 0;
    background:var(--panel2);
    border:1px solid var(--line);
    padding:8px 11px;
    border-radius:999px;
    color:#d8dde3;
    font-size:13px;
}

.period-panel{
    margin:28px 0;
    overflow:hidden;
    animation:dopeFadeUp .45s ease both;
}

.period-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:22px 24px;
    border-left:3px solid var(--green);
}

.period-head strong{
    font-size:24px;
}

.period-head p{
    margin:6px 0 0;
    color:var(--green);
}

.group-title{
    margin:32px 0 18px;
    font-size:20px;
    text-transform:uppercase;
    letter-spacing:.04em;
    animation:dopeFadeUp .45s ease both;
}

.group-title span{
    color:var(--green);
}

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(var(--card-size),var(--card-size)));
    gap:20px;
    align-items:start;
}

.card,
.stream-card,
.asset-card{
    overflow:hidden;
    animation:dopeFadeUp .45s ease both;
    transition:all .25s ease;
}

.card:hover,
.stream-card:hover,
.asset-card:hover{
    transform:translateY(-4px);
    border-color:rgba(200,255,0,.38);
    box-shadow:var(--glow);
}

.stream-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(var(--card-size),var(--card-size))) !important;
    gap:22px;
    align-items:start;
}

.stream-card{
    width:var(--card-size) !important;
    max-width:var(--card-size) !important;
    display:block;
}

.stream-thumb{
    position:relative;
    border:0;
    background:#1c1f22;
    width:100%;
    height:auto;
    aspect-ratio:9/16;
    cursor:pointer;
    color:var(--muted);
    font-weight:800;
    overflow:hidden;
    border-radius:18px 18px 0 0;
}

.stream-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.stream-body{
    padding:18px;
}

.stream-body h3{
    margin:0 0 12px;
    font-size:17px;
}

.stream-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:14px;
}

.play{
    position:absolute;
    inset:0;
    margin:auto;
    width:58px;
    height:58px;
    border:2px solid rgba(255,255,255,.72);
    background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.04));
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    border-radius:999px;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    box-shadow:0 12px 30px rgba(0,0,0,.35);
    transition:all .22s ease;
}

.stream-card:hover .play{
    transform:scale(1.08);
    border-color:var(--green);
    color:var(--green);
}

.thumb{
    height:auto;
    aspect-ratio:9/16;
    background:#1c1f22;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--muted);
    font-weight:800;
}

.thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.card-body{
    padding:15px;
}

.card h3{
    font-size:16px;
    margin:0 0 10px;
}

.meta{
    display:flex;
    justify-content:space-between;
    color:var(--muted);
    font-size:12px;
    margin:12px 0;
}

.actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.asset-grid,
.image-row{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
}

.asset-thumb,
.image-card{
    height:150px;
    background:#1c1f22;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--green);
    font-weight:800;
}

.asset-thumb img,
.image-card img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.asset-info{
    padding:14px;
}

.asset-info h3{
    font-size:15px;
    margin:0 0 6px;
}

.asset-info p{
    margin:0;
    color:var(--muted);
    font-size:12px;
}

.form-wrap{
    max-width:980px;
    padding:24px;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.field label{
    display:block;
    color:var(--muted);
    font-size:13px;
    margin-bottom:7px;
}

.input,
select,
textarea{
    width:100%;
    background:#0d0e10;
    color:#fff;
    border:1px solid var(--line);
    border-radius:999px;
    padding:12px;
}

textarea{
    min-height:90px;
    border-radius:18px;
}

.table{
    width:100%;
    border-collapse:collapse;
    overflow:hidden;
}

.table th,
.table td{
    border-bottom:1px solid var(--line);
    padding:13px;
    text-align:left;
}

.table th{
    color:var(--green);
    font-size:13px;
}

.client-logo-cell{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
    min-width:210px;
}

.client-logo-cell img{
    width:76px;
    height:46px;
    object-fit:contain;
    padding:7px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    background:rgba(255,255,255,.05);
}

.client-logo-cell span{
    color:var(--muted);
    font-size:12px;
}

.logo-upload-form{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
}

.logo-file-input{
    max-width:190px;
    color:var(--muted);
    font-size:12px;
}

.login{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.login-card{
    width:100%;
    max-width:430px;
    padding:28px;
}

.login-card .logo{
    height:46px;
    margin-bottom:24px;
}

.tag-checkbox-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}

.tag-check{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#0d0e10;
    color:#d1d5db;
    cursor:pointer;
}

.tag-check:hover,
.tag-check.active{
    border-color:rgba(200,255,0,.45);
    color:var(--green);
    background:linear-gradient(135deg,rgba(200,255,0,.16),rgba(200,255,0,.04));
}

.tag-check input{
    width:16px;
    height:16px;
    accent-color:var(--green);
}

.admin-material-card{
    width:var(--card-size) !important;
    max-width:var(--card-size) !important;
    outline:none;
    position:relative;
    transition:all .22s ease;
}

.admin-material-card:hover,
.admin-material-card.selected{
    border-color:rgba(200,255,0,.75);
    box-shadow:0 0 0 2px rgba(200,255,0,.12),0 18px 50px rgba(0,0,0,.42);
    transform:translateY(-4px) scale(1.01);
}

.tag-quick-menu{
    position:absolute;
    z-index:9999;
    width:280px;
    display:none;
    background:linear-gradient(180deg,rgba(20,22,25,.95),rgba(8,9,10,.92));
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    border:1px solid rgba(200,255,0,.18);
    border-radius:22px;
    box-shadow:0 18px 50px rgba(0,0,0,.55);
    padding:14px;
    animation:dopePop .18s ease both;
}

.tag-quick-menu.open{
    display:block;
}

.tag-quick-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
}

.tag-quick-head strong{
    color:var(--green);
}

.tag-quick-head span{
    font-size:11px;
    color:var(--muted);
}

.tag-quick-options{
    display:grid;
    gap:8px;
}

.tag-check.quick{
    padding:10px;
}

.tag-quick-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:14px;
}

.video-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.86);
    z-index:9999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:30px;
}

.video-modal.open{
    display:flex;
}

.video-modal-inner{
    width:min(1100px,94vw);
    aspect-ratio:16/9;
    background:#000;
    border:1px solid var(--line);
    border-radius:18px;
    position:relative;
    overflow:hidden;
}

.video-modal-inner iframe{
    width:100%;
    height:100%;
    border:0;
}

.video-close{
    position:absolute;
    top:10px;
    right:10px;
    z-index:2;
    width:38px;
    height:38px;
    border:0;
    border-radius:999px;
    background:rgba(0,0,0,.65);
    color:#fff;
    font-size:28px;
    cursor:pointer;
}

.floating-preview-control{
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:999;
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 16px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(10,10,10,.72);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    box-shadow:0 18px 50px rgba(0,0,0,.45);
}

.floating-preview-control span{
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}

.floating-preview-control input{
    width:150px;
}

@keyframes dopeFadeUp{
    from{
        opacity:0;
        transform:translateY(14px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes dopePop{
    from{
        opacity:0;
        transform:scale(.96) translateY(6px);
    }
    to{
        opacity:1;
        transform:scale(1) translateY(0);
    }
}

@media(max-width:1050px){
    .sidebar{
        width:250px;
    }

    .asset-grid,
    .image-row{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:760px){
    .app{
        display:block;
    }

    .sidebar{
        position:relative;
        width:100%;
        height:auto;
    }

    .main{
        padding:24px;
    }

    .topbar,
    .hero{
        display:block;
    }

    .search{
        min-width:100%;
        margin-bottom:12px;
    }

    .grid,
    .stream-grid{
        grid-template-columns:repeat(2,1fr) !important;
    }

    .asset-grid,
    .image-row{
        grid-template-columns:repeat(2,1fr) !important;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    .stream-card,
    .admin-material-card{
        width:100% !important;
        max-width:none !important;
    }

    .period-head{
        display:block;
    }

    .client-brand .logo{
        height:68px;
    }

    .floating-preview-control{
        display:none;
    }

    h1{
        font-size:34px;
    }
}
