*{
    box-sizing:border-box;
}

:root{
    --bg:#07090a;
    --panel:#101417;
    --panel-soft:#151a1e;
    --line:#352414;
    --line-bright:#c87805;
    --orange:#ff9f05;
    --orange-2:#ffb32b;
    --red:#f04438;
    --green:#7ccf2b;
    --blue:#36a3ff;
    --text:#f6f1e8;
    --muted:#aeb4b7;
    --shadow:0 24px 60px rgba(0,0,0,.45);
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    background:
        radial-gradient(circle at 80% 0%, rgba(255,159,5,.12), transparent 28%),
        radial-gradient(circle at 10% 70%, rgba(54,163,255,.08), transparent 26%),
        var(--bg);
    color:var(--text);
    font-family:Arial, sans-serif;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    background:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size:36px 36px;
    mask-image:linear-gradient(to bottom, rgba(0,0,0,.7), transparent 75%);
}

h1,h2,h3,p{
    margin-top:0;
}

h1{
    color:var(--text);
}

h2{
    color:var(--orange);
    font-size:22px;
    letter-spacing:0;
    text-transform:uppercase;
}

button,.button{
    background:linear-gradient(135deg, var(--orange), var(--orange-2));
    border:none;
    padding:14px 28px;
    font-size:16px;
    font-weight:bold;
    border-radius:8px;
    color:#201304;
    cursor:pointer;
    display:inline-block;
    text-decoration:none;
    box-shadow:0 10px 26px rgba(255,159,5,.22);
}

button:hover,.button:hover{
    filter:brightness(1.06);
}

.secondary-button,.danger-button{
    padding:10px 14px;
    font-size:13px;
    box-shadow:none;
}

.secondary-button{
    background:#252c31;
    color:var(--text);
    border:1px solid #3a444b;
}

.danger-button{
    background:#8f2e2e;
    color:white;
    border:1px solid #c94a4a;
}

.home-page{
    min-height:100vh;
    text-align:center;
    padding:18vh 20px 0;
    background:
        linear-gradient(90deg, rgba(7,9,10,.85), rgba(7,9,10,.35)),
        url("/assets/burger-hero.png") center/cover no-repeat;
}

.home-page h1{
    font-size:72px;
    text-shadow:0 8px 20px rgba(0,0,0,.65);
}

.home-page h2{
    color:var(--orange);
}

.login-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
    background:
        linear-gradient(90deg, rgba(7,9,10,.92), rgba(7,9,10,.45)),
        url("/assets/burger-hero.png") center/cover no-repeat;
}

.login-box{
    width:min(390px, 100%);
    padding:34px;
    border-radius:14px;
    background:linear-gradient(180deg, rgba(18,23,26,.94), rgba(9,12,14,.96));
    border:1px solid rgba(255,159,5,.55);
    box-shadow:var(--shadow);
}

.login-box h1{
    margin-bottom:8px;
    font-size:42px;
    color:var(--orange);
}

.login-box h2{
    font-size:20px;
}

.login-box input{
    display:block;
    width:100%;
}

.login-box button{
    width:100%;
    margin-top:6px;
}

.password-field{
    display:none;
}

.password-field.is-visible{
    display:block;
}

.dashboard-page{
    min-height:100vh;
}

.sidebar{
    position:fixed;
    top:0;
    left:0;
    z-index:10;
    height:100vh;
    width:270px;
    padding:22px 18px;
    text-align:left;
    background:
        linear-gradient(180deg, rgba(9,13,15,.96), rgba(7,9,10,.98)),
        radial-gradient(circle at 50% 84%, rgba(255,159,5,.12), transparent 28%);
    border-right:1px solid rgba(255,159,5,.55);
    box-shadow:16px 0 40px rgba(0,0,0,.35);
}

.sidebar h1{
    display:grid;
    place-items:center;
    width:210px;
    min-height:176px;
    margin:0 auto 10px;
    padding:0;
    border-radius:12px;
    background:transparent;
}

.sidebar h1 img{
    display:block;
    width:100%;
    height:auto;
    filter:drop-shadow(0 18px 24px rgba(0,0,0,.55));
}

.sidebar h2{
    display:none;
}

.sidebar p{
    display:none;
}

.sidebar a{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:42px;
    padding:12px 14px;
    margin:7px 0;
    border-radius:8px;
    color:#dce1e3;
    text-decoration:none;
    cursor:pointer;
    border:1px solid transparent;
}

.sidebar a:hover{
    background:rgba(255,255,255,.055);
    border-color:rgba(255,159,5,.22);
}

.sidebar .admin-only{
    display:none;
}

.sidebar .admin-only.is-visible{
    display:flex;
}

.sidebar .active{
    background:linear-gradient(135deg, var(--orange), #f28b00);
    color:#241303;
    font-weight:bold;
    box-shadow:0 12px 24px rgba(255,159,5,.20);
}

.sidebar button{
    width:100%;
    margin-top:22px;
}

.user-menu{
    position:fixed;
    top:18px;
    right:18px;
    z-index:9999;
}

.user-menu-toggle{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:10px;
    padding:10px 16px;
    border:1px solid rgba(255,159,5,.24);
    border-radius:999px;
    background:rgba(9,12,15,.86);
    backdrop-filter: blur(16px);
    color:var(--text);
    cursor:pointer;
    box-shadow:0 18px 48px rgba(0,0,0,.3);
    font-size:13px;
    text-align:left;
    min-width:190px;
}

.user-menu-avatar{
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    border-radius:50%;
    background:linear-gradient(135deg, var(--orange), #ffb32b);
    color:#241303;
    font-weight:800;
    font-size:15px;
    flex-shrink:0;
    box-shadow:0 4px 16px rgba(0,0,0,.28);
}

.user-menu-text{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    line-height:1.1;
    min-width:0;
    overflow:hidden;
}

.user-menu-name{
    display:block;
    font-weight:700;
    font-size:15px;
    line-height:1.1;
}

.user-menu-role{
    display:block;
    margin-top:2px;
    font-size:11px;
    opacity:.75;
    line-height:1.1;
}

.user-menu-caret{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:26px;
    height:26px;
    font-size:18px;
    line-height:1;
    opacity:.95;
    border-radius:50%;
    background:rgba(255,255,255,.12);
}

.user-menu-dropdown{
    display:none;
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    min-width:220px;
    padding:12px;
    border:1px solid rgba(255,159,5,.28);
    border-radius:12px;
    background:rgba(10,14,17,.97);
    box-shadow:0 16px 36px rgba(0,0,0,.35);
}

.user-menu.is-open .user-menu-dropdown{
    display:block;
}

.user-menu-info{
    display:flex;
    flex-direction:column;
    gap:2px;
    padding-bottom:8px;
    margin-bottom:8px;
    border-bottom:1px solid rgba(255,255,255,.1);
}

.user-menu-info strong{
    font-size:14px;
}

.user-menu-info span{
    font-size:12px;
    opacity:.75;
}

.user-menu-logout{
    width:100%;
    padding:10px 12px;
    border:none;
    border-radius:8px;
    background:linear-gradient(135deg, var(--orange), #f28b00);
    color:#241303;
    font-weight:700;
    cursor:pointer;
}

.sidebar::after{
    content:"";
    white-space:pre;
    position:absolute;
    left:18px;
    right:18px;
    bottom:24px;
    min-height:280px;
    display:block;
    padding:20px;
    border-radius:14px;
    background:
        url("/assets/hamburgarian-panel-fresh.png") 75% center/cover no-repeat;
    border:1px solid rgba(255,159,5,.28);
}

.main{
    position:relative;
    min-height:100vh;
    margin-left:270px;
    padding:320px 30px 30px;
    text-align:left;
    overflow:visible;
}

.main::before{
    content:"";
    position:absolute;
    top:-110px;
    left:0;
    right:0;
    height:435px;
    z-index:0;
    background:
        url("/assets/hamburgarian-banner.png") center 2%/cover no-repeat;
    border-bottom:1px solid rgba(255,159,5,.18);
}

.main > *{
    position:relative;
    z-index:2;
}

.main > .user-menu {
    z-index:9999;
}

.dashboard-page.is-loading .main{
    min-height:240px;
}

.dashboard-page.is-loading .main > *{
    visibility:hidden;
}

.dashboard-page.is-loading .main::after{
    content:"Laddar data...";
    position:absolute;
    z-index:2;
    top:38px;
    left:30px;
    padding:18px 22px;
    background:rgba(16,20,23,.95);
    border:1px solid var(--orange);
    border-radius:8px;
    color:var(--orange);
    font-weight:bold;
}

.main h1{
    margin:22px 0 2px;
    font-size:60px;
    line-height:1;
    color:var(--text);
    text-transform:uppercase;
    text-shadow:0 8px 22px rgba(0,0,0,.75);
}

.main > h3{
    margin-bottom:44px;
    color:var(--orange);
    font-size:18px;
    text-transform:uppercase;
}

.cards{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    scroll-margin-top:24px;
}

.card,.box{
    background:
        linear-gradient(180deg, rgba(20,25,28,.92), rgba(11,14,16,.94));
    border:1px solid rgba(255,159,5,.34);
    box-shadow:0 18px 36px rgba(0,0,0,.28);
    backdrop-filter:blur(8px);
}

.card{
    position:relative;
    min-height:102px;
    padding:20px 18px 18px 78px;
    border-radius:8px;
}

.card::before{
    content:"🍔";
    position:absolute;
    left:18px;
    top:22px;
    display:grid;
    place-items:center;
    width:44px;
    height:44px;
    border-radius:12px;
    background:rgba(255,159,5,.14);
    color:var(--orange);
    font-size:26px;
}

.card:nth-child(2)::before{
    content:"📋";
}

.card:nth-child(3)::before{
    content:"📈";
    color:var(--red);
    background:rgba(240,68,56,.14);
}

.card:nth-child(4)::before{
    content:"🏆";
}

.card h3{
    margin-bottom:4px;
    color:#d7d7d7;
    font-size:12px;
    text-transform:uppercase;
}

.card strong{
    color:var(--text);
    font-size:34px;
    line-height:1;
}

.box{
    margin-top:16px;
    padding:22px;
    border-radius:8px;
    scroll-margin-top:24px;
}

.box h2{
    margin-bottom:16px;
    color:var(--orange);
    font-size:20px;
}

.dashboard-grid,.settings-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.settings-list{
    display:grid;
    gap:12px;
}

input,select,textarea{
    width:100%;
    padding:14px 14px;
    margin:8px 0;
    background:rgba(7,9,10,.70);
    color:var(--text);
    border:1px solid rgba(255,255,255,.12);
    border-radius:6px;
    outline:none;
}

input:focus,select:focus,textarea:focus{
    border-color:var(--orange);
    box-shadow:0 0 0 3px rgba(255,159,5,.12);
}

textarea{
    height:116px;
    resize:vertical;
}

.form-message{
    min-height:22px;
    margin:12px 0 0;
    color:#d7dde0;
}

.form-message.success{
    color:#67d391;
}

.form-message.error{
    color:#ff7a7a;
}

.leaderboard,.reports,.bars{
    display:grid;
    gap:0;
}

.list-row{
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px;
    align-items:center;
    padding:14px 8px;
    border-bottom:1px solid rgba(255,255,255,.07);
}

.list-row:last-child{
    border-bottom:none;
}

.list-row span{
    color:#e8ecee;
}

.list-row strong{
    min-width:44px;
    padding:5px 9px;
    text-align:center;
    color:#a6ff3d;
    background:rgba(124,207,43,.10);
    border:1px solid rgba(124,207,43,.35);
    border-radius:5px;
}

.user-row{
    grid-template-columns:1fr auto;
}

.row-actions{
    grid-column:1 / -1;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.report-row small{
    grid-column:1 / -1;
    color:var(--muted);
}

.empty-state{
    margin:0;
    padding:12px 0;
    color:var(--muted);
}

.bar-row{
    display:grid;
    gap:8px;
    padding:10px 0;
}

.bar-label{
    display:flex;
    justify-content:space-between;
    gap:12px;
}

.bar-label strong{
    color:var(--orange);
}

.bar-track{
    height:10px;
    overflow:hidden;
    background:rgba(255,255,255,.07);
    border-radius:999px;
}

.bar-fill{
    height:100%;
    background:linear-gradient(90deg, var(--orange), var(--green));
    border-radius:999px;
}

@media (max-width: 1100px){
    .cards{
        grid-template-columns:repeat(2,1fr);
    }

    .sidebar::after{
        display:none;
    }
}

@media (max-width: 900px){
    .sidebar{
        position:static;
        width:100%;
        height:auto;
        border-right:none;
        border-bottom:1px solid rgba(255,159,5,.55);
    }

    .sidebar h1{
        width:160px;
        min-height:134px;
    }

    .main{
        margin-left:0;
        padding:22px;
    }

    .main::before{
        height:210px;
    }

    .dashboard-grid,.settings-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width: 600px){
    .home-page{
        padding-top:80px;
    }

    .login-box{
        padding:26px;
    }

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

    .main h1,.home-page h1{
        font-size:40px;
    }

    .card{
        padding-left:70px;
    }
}
