/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #222;
    background: #fff;
}

body.menu-page {
    overflow: hidden;
    height: 100vh;
}

[x-cloak] { display: none !important; }

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Navigation */
.navigation {
    width: 88px;
    min-width: 88px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #e0e0e0;
    background: #fff;
    z-index: 10;
}

.navigation::-webkit-scrollbar {
    width: 0;
}

.nav {
    display: flex;
    flex-direction: column;
    padding: 10px 5px;
}

.nav__categories {
    display: flex;
    flex-direction: column;
}

.nav__button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    min-height: 64px;
}

.nav__button:hover {
    background: #f0f0f0;
}

.nav__button.active {
    background: #e8e8e8;
    font-weight: 500;
}

.nav__button__icon {
    font-size: 20px;
    color: #333;
}

.nav__button__icon_new {
    width: 24px;
    height: 24px;
    filter: brightness(0);
}

.nav__button__label {
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
    color: #333;
    cursor: pointer;
    word-break: break-word;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    height: 50px;
    background: #808080;
    color: #fff;
    margin-bottom: 0;
    flex-shrink: 0;
}

.logo {
    font-size: 22px;
    font-weight: 500;
    color: #fff;
}

.guest {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guest__name {
    color: #fff;
    font-size: 14px;
}

.nav__cart__button .nav__button__icon {
    color: #fff;
    font-size: 18px;
}

/* Menu List */
main {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 80px;
}

.menu__list {
    display: flex;
    flex-direction: column;
}

.menu__category {
    display: flex;
    flex-direction: column;
    gap: 2px;
    scroll-margin-top: 10px;
}

.menu__category__title {
    font-size: 18px;
    font-weight: 500;
    padding: 0 0 5px;
    margin: 15px 0 5px;
    border-bottom: 1px solid #e0e0e0;
    color: #000;
}

/* Product Card */
.menu__product {
    border-bottom: 1px solid #f0f0f0;
}

.product {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 40px 8px 0;
    min-height: 90px;
    cursor: pointer;
}

.product__timing {
    position: absolute;
    top: 4px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #999;
}

.product__timing i {
    font-size: 11px;
}

.product__image-container {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.product__image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.product__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 6px;
    color: #ccc;
    font-size: 24px;
}

.product__info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.product__name {
    font-size: 16px;
    font-weight: 500;
    color: #222;
}

.product__main-count {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-holder {
    display: flex;
    align-items: center;
    background: #000;
    color: #fff;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Count Buttons */
.count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.count span {
    min-width: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.count__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 5px;
    background: #808080;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.15s;
}

.count__button:hover {
    background: #666;
}

.count__button.disabled {
    opacity: 0.4;
    cursor: default;
}

.count--small .count__button {
    width: 26px;
    height: 26px;
    font-size: 12px;
}

/* Cart Floating Button */
.cart-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
}

.cart__button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: #333;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}

.cart__button:hover {
    transform: scale(1.05);
}

.cart__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f44336;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    justify-content: flex-end;
}

.cart-panel {
    width: 380px;
    max-width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}

.cart-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-panel__header h3 {
    font-size: 18px;
    font-weight: 500;
}

.cart-panel__header button {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    color: #666;
}

.cart-panel__items {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item__name {
    font-size: 14px;
    font-weight: 500;
}

.cart-item__mods {
    font-size: 12px;
    color: #888;
}

.cart-item__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item__price {
    font-size: 14px;
    font-weight: 500;
    min-width: 70px;
    text-align: right;
}

.cart-panel__footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}

.cart-panel__total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}

.cart-panel__submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.cart-panel__submit:hover {
    background: #555;
}

/* Modifications Modal */
.mod-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mod-panel {
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.mod-content {
    padding: 20px;
}

.mod-content__title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
}

.mod-content__price {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
}

.mod-group {
    margin-bottom: 16px;
}

.mod-group__title {
    font-size: 14px;
    font-weight: 500;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.mod-group__items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mod-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.mod-item:hover {
    border-color: #bbb;
}

.mod-item--selected {
    border-color: #333;
    background: #f8f8f8;
}

.mod-item__photo {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
}

.mod-item__name {
    flex: 1;
    font-size: 14px;
}

.mod-item__price {
    font-size: 13px;
    color: #666;
}

.mod-item__check {
    color: #333;
    font-size: 14px;
}

.mod-content__add {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.mod-content__add:hover {
    background: #555;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .navigation {
        width: 65px;
        min-width: 65px;
        background: #333;
        border-right: none;
    }

    .nav {
        padding: 5px 2px;
    }

    .nav__button {
        min-height: 56px;
        padding: 6px 2px;
    }

    .nav__button__icon_new {
        filter: brightness(0) invert(1);
    }

    .nav__button__icon {
        color: #fff;
    }

    .nav__button__label {
        font-size: 8px;
        color: #ccc;
    }

    .nav__button.active {
        background: rgba(255,255,255,0.15);
    }

    .nav__button.active .nav__button__label {
        color: #fff;
    }

    .header {
        padding: 0 8px;
        height: 40px;
    }

    .logo {
        font-size: 18px;
    }

    main {
        padding: 0 6px 80px;
    }

    .product {
        min-height: 70px;
        padding: 6px 35px 6px 0;
        gap: 6px;
    }

    .product__image-container {
        width: 65px;
        height: 65px;
    }

    .product__image {
        width: 65px;
        height: 65px;
    }

    .product__name {
        font-size: 14px;
    }

    .price-holder {
        font-size: 13px;
        padding: 2px 5px;
    }

    .count__button {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .count span {
        font-size: 13px;
    }

    .count {
        gap: 5px;
    }

    .menu__category__title {
        font-size: 16px;
        margin: 10px 0 3px;
    }

    .cart-panel {
        width: 100%;
    }

    .product-detail {
        padding: 10px;
    }

    .product-detail__image-container {
        max-width: 100%;
    }
}

/* Product Detail Page */
.product-detail {
    padding: 20px;
    max-width: 600px;
    position: relative;
}

.product-detail__timing {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
}

.product-detail__image-container {
    width: 100%;
    max-width: 400px;
    margin-bottom: 16px;
}

.product-detail__image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.product-detail__image--placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #ccc;
    font-size: 48px;
}

.product-detail__name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-detail__description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.product-detail__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.product-detail__mods {
    margin-top: 16px;
}

.product-detail__mods h3 {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-detail__mod-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.product-detail__mod-price {
    margin-left: auto;
    color: #666;
    font-size: 13px;
}

/* ===== ADMIN STYLES ===== */
.admin-container {
    min-height: 100vh;
    background: #f5f5f5;
    overflow: auto;
}

.admin-header {
    background: #333;
    color: #fff;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header__title {
    font-size: 20px;
    font-weight: 500;
}

.admin-header__nav {
    display: flex;
    gap: 16px;
}

.admin-header__link {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
}

.admin-header__link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.admin-card__title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.admin-stat {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.admin-stat__value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.admin-stat__label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #eee;
    font-weight: 500;
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.admin-table tr:hover td {
    background: #fafafa;
}

.admin-table__photo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.admin-table__actions {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn--primary {
    background: #333;
    color: #fff;
}

.btn--primary:hover {
    background: #555;
}

.btn--danger {
    background: #f44336;
    color: #fff;
}

.btn--danger:hover {
    background: #d32f2f;
}

.btn--sm {
    padding: 4px 10px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #333;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f5f5f5;
}

.login-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-card__title {
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 24px;
}

.login-card__error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
}
