body {
    font-size: .875rem;
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
}

.feather {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100; /* Behind the navbar */
    padding: 48px 0 0; /* Height of navbar */
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #fff;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.sidebar .nav-link {
    font-weight: 500;
    color: #343a40;
}

.sidebar .nav-link .feather {
    margin-right: 4px;
    color: #6c757d;
}

.sidebar .nav-link.active {
    color: #0d6efd;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
    color: inherit;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
    color: #6c757d;
}

/* Navbar */
.navbar {
    background: linear-gradient(90deg, #4e54c8, #8f94fb);
    color: #fff;
}

.navbar .navbar-brand {
    font-weight: 600;
    color: #fff;
}

.navbar .navbar-text {
    color: #fff;
}

/* Cards */
.card {
    border-radius: .75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: .5rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: .5rem;
}

/* Tables */
.table {
    border-radius: .5rem;
    overflow: hidden;
}

.table th, .table td {
    vertical-align: middle;
}

/* Modal enhancements */
.modal-content {
    border-radius: .75rem;
}

/* Footer */
.footer {
    background-color: #fff;
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid #dee2e6;
    margin-top: 2rem;
    font-size: .85rem;
    color: #6c757d;
}

/* Adjust tab content spacing */
.tab-content > .tab-pane {
    padding-top: 1rem;
}

/* Adjust modal widths for larger forms */
.modal-dialog {
    max-width: 800px;
}

/* Adjust alert styling */
.alert {
    border-radius: .5rem;
}

/* Misc */
.text-xs {
    font-size: .75rem;
}

/* ============================= */
/* App Shell (Admin/SuperAdmin)   */
/* ============================= */
.app-navbar {
    background: linear-gradient(90deg, #4e54c8, #8f94fb);
    padding-top: .55rem;
    padding-bottom: .55rem;
}

.app-navbar .navbar-brand {
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
}

.app-navbar .navbar-text {
    color: rgba(255, 255, 255, .9);
}

.app-shell {
    display: flex;
    align-items: flex-start;
}

.app-sidebar {
    --bs-offcanvas-width: 260px;
    background-color: #fff;
    border-right: 1px solid #e9ecef;
}

@media (min-width: 992px) {
    .app-sidebar {
        position: sticky;
        top: 56px;
        height: calc(100vh - 56px);
        flex: 0 0 260px;
    }
}

.app-sidebar .offcanvas-header {
    background: #f8f9fa;
}

.app-sidebar .sidebar-nav {
    padding: 1rem .75rem;
}

.app-sidebar .sidebar-heading {
    font-size: .7rem;
    letter-spacing: .04em;
    color: #adb5bd;
    padding: 0 .75rem;
    margin-bottom: .5rem;
}

.app-sidebar .nav-pills,
.app-sidebar .nav-item {
    width: 100%;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    gap: .65rem;
    color: #495057;
    font-weight: 500;
    font-size: .875rem;
    text-align: left;
    border-radius: .6rem;
    padding: .6rem .85rem;
    margin-bottom: .2rem;
    transition: background-color .15s ease, color .15s ease;
}

.app-sidebar .nav-link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.app-sidebar .nav-link:hover {
    background-color: #f1f2fd;
    color: #4e54c8;
}

.app-sidebar .nav-link.active {
    background: linear-gradient(90deg, #4e54c8, #8f94fb);
    color: #fff;
    box-shadow: 0 4px 10px rgba(78, 84, 200, .3);
}

.app-sidebar .nav-link .badge {
    margin-left: auto;
}

.app-main {
    flex: 1 1 0;
    min-width: 0;
    padding: 1.5rem;
}

@media (max-width: 991.98px) {
    .app-main {
        padding: 1rem;
    }
}

.app-content-card {
    border: 0;
}

/* Dashboard stat cards */
.stat-card {
    border-radius: 1rem;
    border: 0;
}

.stat-card h6 {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.stat-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .stat-card h2 {
        font-size: 1.4rem;
    }
}

/* ============================= */
/* Staff Panels (Waiter/Cashier/Kitchen) */
/* ============================= */
.staff-navbar {
    background: linear-gradient(90deg, #4e54c8, #8f94fb);
    padding-top: .6rem;
    padding-bottom: .6rem;
}

.staff-navbar .header-title,
.staff-navbar .navbar-brand {
    color: #fff;
    font-weight: 600;
}

.staff-navbar .header-subtitle,
.staff-navbar .navbar-text {
    color: rgba(255, 255, 255, .85);
}

.staff-navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, .55);
}

/* Section header row that stacks on mobile */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
}

@media (max-width: 575.98px) {
    .section-header {
        align-items: stretch;
    }

    .section-header > * {
        width: 100%;
    }
}
