:root{
    --sidebar-width:270px;

    --primary:#2563eb;
    --primary-light:#3b82f6;

    --dark:#0f172a;
    --dark-2:#111827;

    --body:#f1f5f9;
    --card:#ffffff;

    --text:#0f172a;
    --muted:#64748b;

    --border:#e2e8f0;

    --success:#16a34a;
    --danger:#dc2626;

    --shadow:
        0 10px 30px rgba(15,23,42,.06);
}

/* =====================================
BASE
===================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    height:100%;
}

body{
    background:var(--body);
    color:var(--text);
    font-family:
        Inter,
        system-ui,
        sans-serif;
    overflow-x:hidden;
}

/* =====================================
WRAPPER
===================================== */

#wrapper{
    display:flex;
    min-height:100vh;
}

/* =====================================
SIDEBAR
===================================== */

#sidebar-wrapper{
    width:var(--sidebar-width);
    min-width:var(--sidebar-width);

    background:
        linear-gradient(
            180deg,
            #0f172a 0%,
            #111827 100%
        );

    position:fixed;
    top:0;
    left:0;
    bottom:0;

    z-index:1040;

    overflow-y:auto;

    transition:.25s ease;

    border-right:1px solid rgba(255,255,255,.05);
}

#sidebar-wrapper::-webkit-scrollbar{
    width:5px;
}

#sidebar-wrapper::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.2);
    border-radius:20px;
}

/* =====================================
BRAND
===================================== */

.sidebar-brand{
    padding:22px 18px;

    display:flex;
    align-items:center;
    gap:14px;

    border-bottom:
        1px solid rgba(255,255,255,.08);
}

.sidebar-logo,
.sidebar-logo-placeholder{
    width:56px;
    height:56px;

    border-radius:16px;

    object-fit:cover;

    background:#fff;

    flex-shrink:0;
}

.sidebar-logo-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;

    color:var(--primary);

    font-size:24px;
}

.sidebar-brand-text{
    flex:1;
}

.sidebar-shop-name{
    color:#fff;

    font-size:15px;
    font-weight:700;

    line-height:1.2;
}

.sidebar-subtitle{
    color:rgba(255,255,255,.55);

    font-size:12px;

    margin-top:3px;
}

/* =====================================
MENU
===================================== */

.sidebar-menu{
    padding:14px;
}

.sidebar-item{
    margin-bottom:6px;
}

.sidebar-link{
    width:100%;

    display:flex;
    align-items:center;
    gap:12px;

    padding:13px 14px;

    border-radius:14px;

    text-decoration:none;

    color:rgba(255,255,255,.72);

    font-size:14px;
    font-weight:600;

    transition:.2s ease;
}

.sidebar-link i{
    width:20px;

    text-align:center;

    font-size:17px;

    color:#fff;
}

.sidebar-link:hover{
    background:rgba(255,255,255,.08);

    color:#fff;

    transform:translateX(3px);
}

.sidebar-link.active{
    background:
        linear-gradient(
            135deg,
            var(--primary-light),
            var(--primary)
        );

    color:#fff;

    box-shadow:
        0 10px 25px rgba(37,99,235,.25);
}

/* =====================================
SUBMENU
===================================== */

.has-submenu .submenu{
    display:none;

    padding-left:12px;

    margin-top:6px;

    border-left:
        1px solid rgba(255,255,255,.08);
}

.has-submenu.open .submenu{
    display:block;
}

.has-submenu.open > .sidebar-link{
    background:rgba(255,255,255,.06);
    color:#fff;
}

.submenu a{
    display:flex;
    align-items:center;
    gap:10px;

    text-decoration:none;

    padding:10px 12px;

    border-radius:12px;

    color:rgba(255,255,255,.65);

    font-size:13px;
    font-weight:500;

    transition:.2s ease;
}

.submenu a i{
    font-size:15px;
    width:18px;
    text-align:center;
}

.submenu a:hover{
    background:rgba(255,255,255,.08);

    color:#fff;
}

.submenu a.active{
    background:rgba(37,99,235,.18);

    color:#fff;
}

.submenu-arrow{
    margin-left:auto;

    transition:.2s ease;
}

.has-submenu.open .submenu-arrow{
    transform:rotate(180deg);
}

/* =====================================
TOPBAR
===================================== */

.topbar{
    height:72px;

    background:#fff;

    border-bottom:1px solid var(--border);

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:0 24px;

    position:sticky;
    top:0;

    z-index:1030;
}

.topbar-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.toggle-sidebar{
    width:42px;
    height:42px;

    border-radius:12px;
    border:1px solid var(--border);

    background:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;
}

.topbar-title{
    font-size:20px;
    font-weight:700;
}

.topbar-right{
    display:flex;
    align-items:center;
    gap:14px;
}

/* =====================================
CONTENT
===================================== */

#page-content-wrapper{
    width:100%;

    margin-left:var(--sidebar-width);

    transition:.25s ease;
}

.main-content{
    padding:24px;
}

/* =====================================
CARDS
===================================== */

.card{
    border:none;

    border-radius:20px;

    background:var(--card);

    box-shadow:var(--shadow);
}

.card-header{
    background:#fff;

    border-bottom:1px solid var(--border);

    border-radius:20px 20px 0 0 !important;

    padding:18px 22px;

    font-weight:700;
}

/* =====================================
TABLE
===================================== */

.table{
    margin-bottom:0;
}

.table thead th{
    background:#f8fafc;

    border:none;

    color:#475569;

    font-size:13px;
    font-weight:700;

    padding:15px;
}

.table tbody td{
    padding:15px;

    border-color:#f1f5f9;

    vertical-align:middle;
}

/* =====================================
FORM
===================================== */

.form-control,
.form-select{
    height:48px;

    border-radius:14px;

    border:1px solid var(--border);

    box-shadow:none;
}

.form-control:focus,
.form-select:focus{
    border-color:var(--primary);

    box-shadow:
        0 0 0 4px rgba(37,99,235,.1);
}

/* =====================================
BUTTONS
===================================== */

.btn{
    height:46px;

    border-radius:14px;

    font-weight:600;

    padding-inline:18px;
}

.btn-primary{
    background:var(--primary);
    border-color:var(--primary);
}

.btn-primary:hover{
    background:#1d4ed8;
    border-color:#1d4ed8;
}

.btn-danger{
    background:var(--danger);
    border-color:var(--danger);
}

/* =====================================
DROPDOWN
===================================== */

.dropdown-menu{
    border:none;

    border-radius:16px;

    padding:8px;

    box-shadow:
        0 20px 40px rgba(15,23,42,.12);
}

.dropdown-item{
    border-radius:10px;

    padding:10px 12px;

    font-size:14px;
}

.dropdown-item:hover{
    background:#eff6ff;
}

/* =====================================
MODAL
===================================== */

.modal-content{
    border:none;

    border-radius:22px;
}

.modal-header{
    border-bottom:1px solid var(--border);
}

.modal-footer{
    border-top:1px solid var(--border);
}

/* =====================================
POS OVERLAY
===================================== */

.pos-overlay{
    position:fixed;
    inset:0;

    z-index:99999;

    background:
        rgba(15,23,42,.72);

    display:flex;
    align-items:center;
    justify-content:center;

    padding:20px;
}

.pos-card{
    width:100%;
    max-width:440px;

    background:#fff;

    border-radius:26px;

    overflow:hidden;

    box-shadow:
        0 30px 70px rgba(0,0,0,.25);

    animation:zoomIn .25s ease;
}

.pos-card-header{
    padding:26px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #1d4ed8
        );

    color:#fff;

    text-align:center;
}

.pos-card-body{
    padding:28px;
}

.pos-card-body .form-control{
    height:58px;

    font-size:20px;

    text-align:center;
}

.pos-card-body .btn{
    height:54px;
}

/* =====================================
ANIMATION
===================================== */

@keyframes zoomIn{
    from{
        transform:scale(.95);
        opacity:0;
    }

    to{
        transform:scale(1);
        opacity:1;
    }
}

/* =====================================
RESPONSIVE
===================================== */

@media(max-width:991px){

    #sidebar-wrapper{
        transform:translateX(-100%);
    }

    body.sidebar-open #sidebar-wrapper{
        transform:translateX(0);
    }

    #page-content-wrapper{
        margin-left:0;
    }

    .main-content{
        padding:16px;
    }

    .topbar{
        padding:0 16px;
    }
}