/* ================== GLOBAL ================== */
body{
    margin:0;
    padding-top:70px; /* space for fixed topbar */
    font-family:'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background:linear-gradient(135deg,#fff7ed,#fef3c7);
    color:#111;
}

h1,h2,h3{ margin:0 0 12px; }
a{ text-decoration:none; }

/* ================== CENTER / LOGIN ================== */
.center{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:16px;
}

.login-box{
    background:#ffffff;
    padding:30px 24px;
    border-radius:20px;
    width:100%;
    max-width:360px;
    box-shadow:0 20px 40px rgba(0,0,0,.18);
    text-align:center;
}

.login-box h2{
    font-size:22px;
    margin-bottom:6px;
}

.login-box .sub{
    font-size:14px;
    color:#666;
    margin-bottom:16px;
}

.login-box input{
    width:100%;
    padding:14px;
    margin:10px 0;
    border-radius:14px;
    border:1px solid #ddd;
    font-size:15px;
}

.login-box input:focus{
    outline:none;
    border-color:#f97316;
}

/* ================== TOPBAR ================== */
.topbar{
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1000;

    background:linear-gradient(135deg,#f97316,#ea580c);
    color:#fff;
    padding:14px 18px;

    display:flex;
    align-items:center;
    justify-content:space-between;
}

.topnav{
    display:flex;
    gap:10px;
}

.topnav a{
    padding:8px 16px;
    border-radius:12px;
    font-weight:600;
    color:#fff;
    background:rgba(255,255,255,.25);
    transition:background .15s, transform .1s;
}

.topnav a:hover{
    background:rgba(255,255,255,.4);
}

.topnav a.active{
    background:#fff;
    color:#ea580c;
}

.topnav a:active{
    transform:scale(.94);
}

.logout{
    background:rgba(255,255,255,.2);
    padding:8px 14px;
    border-radius:12px;
    color:#fff;
    font-weight:600;
}

/* ================== LAYOUT ================== */
.admin-layout{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    padding:16px;
}

/* ================== PANELS ================== */
.panel{
    background:#ffffff;
    border-radius:20px;
    padding:14px;
    box-shadow:0 12px 28px rgba(0,0,0,.15);
    overflow-x:auto;
}

/* ================== TABLE ================== */
.table{
    width:100%;
    border-collapse:collapse;
    font-size:14px;
}

.table th,
.table td{
    padding:12px 10px;
    border-bottom:1px solid #eee;
}

.table th{
    color:#555;
    font-weight:600;
}

/* ================== INPUT ================== */
input[type="text"],
input[type="number"]{
    width:100%;
    padding:12px;
    border-radius:14px;
    border:1px solid #ddd;
    margin-bottom:10px;
    font-size:15px;
}

/* ================== BUTTONS ================== */
.btn{
    border:none;
    border-radius:14px;
    padding:10px 18px;
    cursor:pointer;
    font-weight:600;
    font-size:14px;
    transition:transform .12s, box-shadow .12s, background .12s;
}

.btn:active{
    transform:scale(.94);
    box-shadow:0 6px 14px rgba(0,0,0,.2) inset;
}

.primary{ background:#f97316;color:#fff; }
.add{ background:#22c55e;color:#fff; }
.remove{ background:#ef4444;color:#fff; }

/* ================== PUBLIC MENU ================== */
.public-wrap{
    max-width:980px;
    margin:0 auto;
    padding:16px;
}

.menu-header{
    text-align:center;
    margin-bottom:16px;
}

.menu-header h1{ font-size:28px; }

.menu-date{
    color:#555;
    font-size:14px;
}

.group-title{
    background:linear-gradient(135deg,#22c55e,#16a34a);
    color:#fff;
    padding:12px 16px;
    border-radius:16px;
    font-size:18px;
    font-weight:700;
    margin:20px 0 12px;
    text-align:center;
}

.menu-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:14px;
}

.menu-card{
    background:#ffffff;
    border-radius:18px;
    padding:16px;
    box-shadow:0 10px 22px rgba(0,0,0,.15);
}

.menu-name{
    font-weight:700;
    font-size:16px;
}

.menu-price{
    margin-top:8px;
    font-weight:800;
    color:#15803d;
}

/* ================== SCREENSHOT MODE ================== */
.screenshot .actions{
    display:none;
}

/* ================== BACK TO TOP ================== */
#backToTop{
    position:fixed;
    bottom:20px;
    right:20px;
    width:54px;
    height:54px;
    border-radius:50%;
    background:#ea580c;
    color:#fff;
    font-size:28px;
    font-weight:900;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    box-shadow:0 12px 24px rgba(0,0,0,.25);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s, transform .2s;
    z-index:9999;
}

#backToTop.show{
    opacity:1;
    pointer-events:auto;
}

#backToTop:active{
    transform:scale(.9);
}

/* ================== MOBILE FIX ================== */
@media(max-width:900px){
    .admin-layout{
        grid-template-columns:1fr;
    }
}

@media(max-width:768px){
    .topnav a{
        padding:6px 10px;
        font-size:13px;
    }

    input, button{
        font-size:14px;
    }
}

@media(max-width:480px){
    .topbar{
        padding:12px 14px;
    }

    .logout{
        padding:6px 10px;
        font-size:13px;
    }
}

@media(max-width:400px){
    .menu-grid{
        grid-template-columns:1fr;
    }
}
