/* ===========================
   FoodServe Admin Theme
   Palette + Typography
   =========================== */

:root {
    /* Brand palette */
    --fs-primary: #FF5757; /* red */
    --fs-navy: #000000;
    --fs-sky: #f0eeeb;
    --fs-muted: #6b6b6b;
    --fs-sand: #f0eeeb;
    --fs-bg: #f7f7f7;
    --fs-text: #383838;
    /* Derived */
    --sidebar-bg: var(--fs-sand);
    --sidebar-text: var(--fs-text);
    --submenu-bg: white;
    --footer-bg: var(--fs-sand);
    --accent: var(--fs-primary);
}

/* Base layout */
.layout {
    z-index: 1;
    overflow-x: visible !important;
}

    .layout .header {
        display: flex;
        align-items: center;
        padding: 20px;
    }

    .layout .content {
        background: var(--fs-bg);
        padding: 12px 50px 12px;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

@media (max-width: 576px) {
    .layout .content {
        padding: 5px !important;
    }
}

.layout .footer {
    text-align: center;
    margin-top: auto;
    margin-bottom: 20px;
    padding: 20px;
}

/* Typography (Roboto) */
body {
    margin: 0;
    height: 100vh;
    font-family: "Roboto", sans-serif;
    background: var(--fs-bg);
    color: var(--fs-text);
    font-size: 0.9rem;
}

h1, h2, h3, h4, .pro-sidebar-logo > h5 {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
}

.layout .sidebar .menu .menu-header,
.layout .sidebar .menu .menu-item a,
.sidebar-footer .sf-name,
.sidebar-footer .sf-role,
.fs-btn,
.fs-btn-red,
.fs-btn-primary,
.fs-btn-black {
    font-family: "Roboto", sans-serif;
}

.fs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    padding: .55rem .95rem;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
    transition: filter .15s ease, transform .08s ease, opacity .15s ease;
}

.fs-btn:hover,
.fs-btn:focus-visible {
    filter: brightness(.97);
}

.fs-btn:active {
    transform: translateY(1px);
}

.fs-btn:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.fs-btn-red,
.fs-btn-primary {
    background: var(--fs-primary);
    color: #f7f7f7;
}

.fs-btn-black {
    background: #000000;
    color: #f7f7f7;
}

.fs-grid-action {
    display: flex;
    justify-content: flex-start !important;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.fs-grid-action-left {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.fs-grid-action-right {
    display: flex;
    justify-content: flex-start !important;
    gap: .5rem;
    flex-wrap: wrap;
    margin-left: 0 !important;
}

.e-grid .e-toolbar {
    position: relative;
}

.e-grid .e-toolbar .e-toolbar-items {
    background: #f0eeeb !important;
    position: absolute !important;
    left: 5px !important;
}

.e-grid .e-toolbar .e-toolbar-items .e-toolbar-left .e-toolbar-item:first-child,
.e-grid .e-toolbar .e-toolbar-items:not(.e-tbar-pos):not(.e-toolbar-multirow) .e-toolbar-item:first-child {
    position: absolute !important;
    left: 5px !important;
}

/* Sidebar shell */
.sidebar {
    color: var(--sidebar-text);
    position: relative;
    /*box-shadow: 2px 0 24px rgba(0,0,0,.12);*/ /* x-offset > 0 = shadow to the right */
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.layout .sidebar.collapsed {
    box-shadow: 1px 0 16px rgba(0,0,0,.10);
    border-right-color: rgba(0, 0, 0, 0.10);
}

@media (max-width: 576px) {
    .sidebar {
        color: var(--sidebar-text);
        position: relative;
        box-shadow: 2px 0 24px rgba(0,0,0,0); /* x-offset > 0 = shadow to the right */
        border-right: 1px solid rgba(0, 0, 0, 0);
    }

    .layout .sidebar.collapsed {
        box-shadow: 1px 0 16px rgba(0,0,0,0);
        border-right-color: rgba(0, 0, 0, 0);
    }
}

.sidebar::-webkit-scrollbar {
    width: 6px;
    background-color: var(--sidebar-bg);
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 4px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
    background-color: var(--fs-navy);
}

.sidebar .image-wrapper {
    overflow: hidden;
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
}

    .sidebar .image-wrapper > img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

.sidebar.has-bg-image .image-wrapper {
    display: block;
}

.sidebar .sidebar-layout {
    height: auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--sidebar-bg);
    z-index: 2;
}

    .sidebar .sidebar-layout .sidebar-header {
        height: auto;
        min-height: 0px;
        display: flex;
        align-items: center;
        padding: 0 20px;
    }

        .sidebar .sidebar-layout .sidebar-header > span {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

    .sidebar .sidebar-layout .sidebar-content {
        flex-grow: 1;
        padding: 10px 0;
    }

    .sidebar .sidebar-layout .sidebar-footer {
        height: 230px;
        min-height: 230px;
        display: flex;
        align-items: center;
        padding: 0 20px;
        background: var(--footer-bg);
        border-top: 1px solid rgba(0,0,0,.08);
    }

        .sidebar .sidebar-layout .sidebar-footer > span {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

    /* Logo panel (keep old look) */
    /* Make header + logo-area span full width */
    .sidebar .sidebar-layout .sidebar-header {
        padding: 0; /* remove side padding so logo-area can be full width */
    }

/* Full-width logo panel */
.logo-area {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    /*    margin: 0 0 1rem;
*/ background: var(--sidebar-bg);
    box-shadow: none;
    transition: height .25s ease, padding .25s ease, margin .25s ease;
}

/* Logo scales with container */
.sidebar-logo {
    width: 80%;
    object-fit: contain;
    transition: max-width .25s ease, max-height .25s ease, transform .25s ease;
    display: block;
    margin-inline: auto;
}

/* When sidebar is collapsed, shrink the logo-area + image */
.layout .sidebar.collapsed .logo-area {
    height: 56px;
}

.layout .sidebar.collapsed .sidebar-logo {
}

/* Menu */
.layout .sidebar .menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.layout .sidebar .menu .menu-header {
    font-weight: 700;
    padding: 10px 20px;
    font-size: 0.8em;
    letter-spacing: 2px;
    opacity: .85;
    color: var(--sidebar-text);
}

.layout .sidebar .menu .menu-item a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    gap: 10px;
    color: var(--sidebar-text);
    font-weight: 700;
}

    .layout .sidebar .menu .menu-item a .menu-icon {
        font-size: 1.2rem;
        width: 37px;
        min-width: 37px;
        height: 28px;
        line-height: 28px;
        text-align: center;
        display: inline-block;
        margin-right: 0;
        border-radius: 8px;
        transition: color .2s, background-color .2s;
        background-color: rgba(56, 56, 56, 0.08);
        color: var(--sidebar-text);
    }

        .layout .sidebar .menu .menu-item a .menu-icon i {
            display: inline-block;
        }

    .layout .sidebar .menu .menu-item a .menu-title {
        font-size: 0.95em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex-grow: 1;
        transition: color .2s;
        color: inherit;
    }

    .layout .sidebar .menu .menu-item a .menu-prefix,
    .layout .sidebar .menu .menu-item a .menu-suffix {
        display: inline-block;
        padding: 5px;
        opacity: 1;
        transition: opacity .2s;
    }

    /* Hover/active */
    .layout .sidebar .menu .menu-item a:hover .menu-title {
        color: var(--sidebar-text);
    }

    .layout .sidebar .menu .menu-item a:hover .menu-icon {
        color: var(--sidebar-text);
        background-color: rgba(56, 56, 56, .12);
    }

    .layout .sidebar .menu .menu-item a:hover::after {
        border-color: var(--sidebar-text) !important;
    }

.layout .sidebar .menu .menu-item.active > a .menu-title {
    color: var(--sidebar-text);
}

.layout .sidebar .menu .menu-item.active > a::after {
    border-color: var(--sidebar-text);
}

.layout .sidebar .menu .menu-item.active > a .menu-icon {
    color: var(--sidebar-text);
    background-color: rgba(56, 56, 56, .12);
}

/* Submenus */
.layout .sidebar .menu .menu-item.sub-menu {
    position: relative;
}

    .layout .sidebar .menu .menu-item.sub-menu > a::after {
        content: "";
        transition: transform .2s;
        border-right: 2px solid currentcolor;
        border-bottom: 2px solid currentcolor;
        width: 5px;
        height: 5px;
        transform: rotate(-45deg);
    }

    .layout .sidebar .menu .menu-item.sub-menu > .sub-menu-list {
        display: none;
        overflow: hidden;
        z-index: 999;
        background-color: var(--submenu-bg);
        border-left: 3px solid rgba(56, 56, 56, .12);
    }

    .layout .sidebar .menu .menu-item.sub-menu.open > a {
        color: var(--sidebar-text);
    }

        .layout .sidebar .menu .menu-item.sub-menu.open > a::after {
            transform: rotate(45deg);
        }

/* Icon shape helpers */
.layout .sidebar .menu.icon-shape-circle .menu-item a .menu-icon {
    border-radius: 50%;
}

.layout .sidebar .menu.icon-shape-rounded .menu-item a .menu-icon {
    border-radius: 8px;
}

.layout .sidebar .menu.icon-shape-square .menu-item a .menu-icon {
    border-radius: 0;
}

/* Keep expanded layout behavior */
.layout .sidebar:not(.collapsed) .menu > ul > .menu-item.sub-menu > .sub-menu-list {
    visibility: visible !important;
    position: static !important;
    transform: translate(0,0) !important;
}

/* Collapsed states */
.layout .sidebar.collapsed .menu > ul > .menu-header {
    opacity: 0;
}

.layout .sidebar.collapsed .menu > ul > .menu-item > a .menu-prefix,
.layout .sidebar.collapsed .menu > ul > .menu-item > a .menu-suffix {
    opacity: 0;
}

.layout .sidebar.collapsed .menu > ul > .menu-item.sub-menu > a::after {
    content: "";
    width: 5px;
    height: 5px;
    background-color: currentcolor;
    border-radius: 50%;
    display: inline-block;
    position: absolute;
    right: 10px;
    top: 50%;
    border: none;
    transform: translateY(-50%);
}

.layout .sidebar.collapsed .menu > ul > .menu-item.sub-menu > .sub-menu-list {
    width: 200px;
    margin-left: 3px !important;
    border-radius: 8px;
    display: block !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.sidebar.collapsed {
    overflow: visible !important;
}

.layout .sidebar.collapsed .menu > ul > .menu-item.sub-menu.open > .sub-menu-list {
    position: absolute;
    left: 80px;
    top: 0;
    transform: translateY(calc(-50% + 25px));
}

/* Collapser (floating toggle) � brand accent */
.layout .sidebar .sidebar-collapser {
    transition: left, right, .3s;
    position: fixed;
    left: 260px;
    top: 40px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    transform: translateX(50%);
    z-index: 111;
    cursor: pointer;
    color: white;
    box-shadow: 1px 1px 4px rgba(0,0,0,.2);
}

.layout .sidebar.collapsed .sidebar-collapser {
    left: 60px;
}

    .layout .sidebar.collapsed .sidebar-collapser i {
        transform: rotate(180deg);
    }

/* Pro logo chip */
.layout .sidebar .pro-sidebar-logo {
    display: flex;
    align-items: center;
}

.layout.fixed-sidebar .sidebar {
    overflow-x: hidden;
}

.layout .sidebar .pro-sidebar-logo > div {
    width: 35px;
    min-width: 35px;
    height: 35px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    background-color: var(--fs-primary);
    margin-right: 10px;
}

.layout .sidebar .pro-sidebar-logo > h5 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 20px;
    line-height: 30px;
    transition: opacity .3s;
    opacity: 1;
    color: var(--fs-navy);
}

/* Footer promo box */
.layout .sidebar .footer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8em;
    padding: 20px 0;
    border-radius: 8px;
    width: 180px;
    min-width: 190px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.06);
}

    .layout .sidebar .footer-box img.react-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }

    .layout .sidebar .footer-box a {
        color: var(--fs-navy);
        font-weight: 600;
        margin-bottom: 10px;
    }

/* Badges */
.badge {
    display: inline-block;
    padding: .25em .4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
    color: #fff;
    background-color: #6c757d;
}

    .badge.primary {
        background-color: var(--fs-primary);
    }

    .badge.secondary {
        background-color: var(--fs-navy);
    }

/* Misc */
.sidebar-toggler {
    position: fixed;
    left: 20px;
    top: 20px;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--sidebar-bg);
    color: var(--fs-text);
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    z-index: 9999;
}

.layout-mobile-header {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.social-links a {
    margin: 0 10px;
    color: #3f4750;
}

@media (max-width: 576px) {
    #btn-collapse {
        display: none;
    }

    .layout .content {
        padding: 8px 12px 12px !important;
    }

    .layout-mobile-header {
        margin-bottom: .25rem;
    }

    .sidebar-toggler {
        position: static;
        left: auto;
        top: auto;
        margin-left: 0;
    }

    .sidebar .sidebar-layout .sidebar-content {
        padding: 6px 0 10px;
    }

    .layout .sidebar .menu .menu-header {
        padding: 8px 14px;
    }

    .layout .sidebar .menu .menu-item a {
        min-height: 44px;
        padding: 0 14px;
        gap: 8px;
    }

    .layout .sidebar .menu .menu-item a .menu-icon {
        width: 43px;
        min-width: 43px;
        height: 24px;
        line-height: 24px;
        font-size: 1.05rem;
    }

    .layout .sidebar .menu .menu-item a .menu-title {
        font-size: .94rem;
    }
}

/* Fun swing animation stays */
@keyframes swing {
    0%,30%,50%,70%,100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(10deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Shared status badge variants used by DataAction grids and order detail views. */
.fs-status-badge--success {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.fs-status-badge--secondary {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
}

.fs-status-badge--danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.fs-status-badge--warning {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.fs-status-badge--info {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}
