:root {
    --primary: #C2410C;
    --primary-dark: #9A3412;
    --primary-light: #FB923C;
    --dark: #1F2937;
    --darker: #111827;
    --background: #F8FAFC;
    --white: #FFFFFF;
    --text: #111827;
    --muted: #6B7280;
    --border: #E5E7EB;
    --success: #16A34A;
    --warning: #D97706;
    --danger: #DC2626;
    --info: #2563EB;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 68px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text);
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(194, 65, 12, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.35);
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1F2937 0%, #111827 100%);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1030;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.sidebar-brand {
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #1F2937, rgba(31, 41, 55, 0.98));
    z-index: 1;
}

.sidebar-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.3);
}

.sidebar-brand-text h5 {
    color: white;
    font-size: 1rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.sidebar-brand-text p {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    margin: 0;
}

.sidebar-menu {
    padding: 0.8rem 0.7rem;
}

.sidebar-section-title {
    padding: 0.8rem 0.8rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.35);
}

.sidebar-item {
    list-style: none;
    margin-bottom: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.9rem;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    border-radius: 0.55rem;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link:hover, .sidebar-link.active {
    background: linear-gradient(135deg, rgba(194, 65, 12, 0.2), rgba(194, 65, 12, 0.08));
    color: white;
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 2px 8px rgba(194, 65, 12, 0.3);
}

.sidebar-submenu {
    margin-left: 28px;
    padding-left: 0;
    border-left: 1px dashed rgba(255,255,255,0.08);
    margin-top: 2px;
    margin-bottom: 6px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-submenu.open {
    max-height: 500px;
}

.sidebar-submenu .sidebar-link {
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
}

.sidebar-submenu .sidebar-link::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    margin-right: -3px;
}

.sidebar-submenu .sidebar-link:hover::before,
.sidebar-submenu .sidebar-link.active::before {
    background: var(--primary-light);
}

.sidebar-link .dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.sidebar-link.collapsed .dropdown-arrow {
    transform: rotate(-90deg);
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all 0.3s ease;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 1.8rem;
    height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.sidebar-toggle {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--background);
    color: var(--primary);
}

.search-box {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.search-box .input-group {
    background: var(--background);
    border-radius: 0.7rem;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.search-box .input-group:focus-within {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.08);
}

.search-box .form-control, .search-box .input-group-text {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.65rem 1rem;
    color: var(--text);
}

.search-box .input-group-text {
    color: var(--muted);
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 0.7rem;
    background: var(--background);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.topbar-icon-btn:hover {
    background: #F1F5F9;
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid white;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    border-radius: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}

.user-dropdown:hover {
    background: var(--background);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(194, 65, 12, 0.25);
}

.user-info h6 {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.2;
}

.user-info p {
    font-size: 0.72rem;
    margin: 2px 0 0;
    color: var(--muted);
}

.dropdown-menu.dropdown-menu-end {
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    padding: 0.4rem;
}

.dropdown-menu .dropdown-item {
    padding: 0.55rem 0.8rem;
    border-radius: 0.45rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.dropdown-menu .dropdown-item:hover {
    background: var(--background);
}

.dropdown-menu .dropdown-item i {
    width: 16px;
    color: var(--muted);
}

.page-content {
    padding: 1.8rem;
}

.page-header {
    margin-bottom: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.page-header h2 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.page-header .page-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.page-header-right {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.4rem 1.2rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.9rem;
}

.stat-card .stat-icon.primary {
    background: rgba(194, 65, 12, 0.1);
    color: var(--primary);
}

.stat-card .stat-icon.success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.stat-card .stat-icon.warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.stat-card .stat-icon.info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--info);
}

.stat-card .stat-icon.danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.stat-card .stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.stat-card h3 {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.stat-card h6 {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0.5rem 0 0.3rem;
    font-weight: 500;
}

.stat-trend {
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    overflow: hidden;
}

.card-header {
    padding: 1.1rem 1.4rem;
    background: transparent;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.4rem;
}

.badge {
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge.bg-pending {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.badge.bg-confirmed {
    background: rgba(37, 99, 235, 0.1);
    color: var(--info);
}

.badge.bg-preparing {
    background: rgba(234, 179, 8, 0.12);
    color: #CA8A04;
}

.badge.bg-ready {
    background: rgba(139, 92, 246, 0.12);
    color: #8B5CF6;
}

.badge.bg-completed {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.badge.bg-cancelled {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.badge.bg-veg {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
    border: 1px solid rgba(22, 163, 74, 0.25);
}

.badge.bg-nonveg {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge.bg-egg {
    background: rgba(234, 179, 8, 0.12);
    color: #CA8A04;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.badge.bg-paid {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.badge.bg-partial {
    background: rgba(37, 99, 235, 0.1);
    color: var(--info);
}

.table-wrapper {
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.table-wrapper thead th {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.table-wrapper tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.87rem;
}

.table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

.table-wrapper tbody tr:hover {
    background: #FBFDFF;
}

.table-responsive {
    overflow-x: auto;
    padding: 10px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.3rem 0.7rem;
    border-radius: 0.4rem;
    margin: 0 0.1rem;
    border: 1px solid var(--border);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.filter-bar {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--border);
    margin-bottom: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: end;
}

.filter-bar label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
    display: block;
}

.form-control, .form-select {
    padding: 0.55rem 0.85rem;
    border-radius: 0.6rem;
    border: 1px solid var(--border);
    font-size: 0.87rem;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.08);
    outline: none;
}

.action-btns {
    display: flex;
    gap: 0.3rem;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.action-btn.view {
    background: rgba(37, 99, 235, 0.1);
    color: var(--info);
}

.action-btn.view:hover {
    background: var(--info);
    color: white;
}

.action-btn.edit {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.action-btn.edit:hover {
    background: var(--warning);
    color: white;
}

.action-btn.delete {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.action-btn.delete:hover {
    background: var(--danger);
    color: white;
}

.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
}

.modal-header {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.btn-close {
    border-radius: 0.4rem;
}

.modal-body {
    padding: 1.4rem;
}

.modal-footer {
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--border);
    gap: 0.5rem;
}

.img-thumb {
    width: 40px;
    height: 40px;
    border-radius: 0.55rem;
    object-fit: cover;
    border: 1px solid var(--border);
}

.img-thumb-sm {
    width: 32px;
    height: 32px;
    border-radius: 0.45rem;
    object-fit: cover;
}

.pos-container {
    display: grid;
    grid-template-columns: 220px 1fr 340px;
    gap: 1rem;
    height: calc(100vh - var(--topbar-height) - 3.6rem);
    min-height: 580px;
}

.pos-categories, .pos-menu, .pos-cart {
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-section-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-category-list {
    padding: 0.8rem;
    overflow-y: auto;
    flex: 1;
}

.pos-category-item {
    padding: 0.7rem 0.85rem;
    border-radius: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text);
    margin-bottom: 0.3rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.pos-category-item:hover {
    background: var(--background);
}

.pos-category-item.active {
    background: linear-gradient(135deg, rgba(194, 65, 12, 0.12), rgba(194, 65, 12, 0.05));
    color: var(--primary);
    border-color: rgba(194, 65, 12, 0.2);
    font-weight: 600;
}

.pos-category-item i {
    font-size: 1rem;
    width: 22px;
    text-align: center;
}

.pos-menu-grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.85rem;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

.pos-menu-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    overflow: hidden;
    transition: all 0.25s;
    cursor: pointer;
    position: relative;
}

.pos-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: rgba(194, 65, 12, 0.25);
}

.pos-menu-image {
    height: 110px;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
}

.pos-menu-image.combo {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(251, 191, 36, 0.1));
}

.combo-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.food-type-dot {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.food-type-dot.veg {
    border-color: var(--success);
}

.food-type-dot.veg::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.food-type-dot.nonveg {
    border-color: var(--danger);
}

.food-type-dot.nonveg::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
}

.food-type-dot.egg {
    border-color: #CA8A04;
}

.food-type-dot.egg::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #CA8A04;
}

.pos-menu-info {
    padding: 0.7rem 0.85rem 0.85rem;
}

.pos-menu-info h6 {
    font-size: 0.87rem;
    margin: 0 0 0.3rem;
    line-height: 1.3;
    font-weight: 600;
}

.pos-menu-info .price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.price-current {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old {
    font-size: 0.75rem;
    text-decoration: line-through;
    color: var(--muted);
}

.price-save {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--success);
}

.add-btn {
    width: 100%;
    padding: 0.4rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(194, 65, 12, 0.3);
}

.pos-cart-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.cart-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border);
}

.cart-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cart-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.7rem;
}

.order-type-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.order-type-btn {
    padding: 0.5rem 0.3rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--dark);
}

.order-type-btn.active {
    border-color: var(--primary);
    background: rgba(194, 65, 12, 0.08);
    color: var(--primary);
}

.cart-items {
    padding: 0.8rem 1.1rem;
    overflow-y: auto;
    flex: 1;
    max-height: 340px;
    border-bottom: 1px solid var(--border);
}

.cart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--muted);
}

.cart-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
    opacity: 0.4;
    display: block;
}

.cart-item {
    background: #F8FAFC;
    border-radius: 0.7rem;
    padding: 0.75rem;
    margin-bottom: 0.6rem;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.cart-item-name {
    font-size: 0.87rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.cart-item-amount {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    overflow: hidden;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--background);
    color: var(--primary);
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.remove-btn {
    background: transparent;
    border: none;
    color: var(--danger);
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.35rem;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: rgba(220, 38, 38, 0.1);
}

.cart-summary {
    padding: 1rem 1.1rem;
    background: #F8FAFC;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.55rem;
    font-size: 0.87rem;
}

.summary-row.grand-total {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 2px dashed var(--border);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

.place-order-btn {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 0.7rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.3);
}

.place-order-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(194, 65, 12, 0.4);
}

.combo-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.combo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.combo-card-image {
    height: 160px;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
}

.combo-card.bestseller .combo-card-image {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(251, 191, 36, 0.12));
}

.bestseller-badge {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: linear-gradient(135deg, #EF4444, var(--primary));
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}

.combo-card-body {
    padding: 1.1rem 1.2rem 1.2rem;
}

.combo-card-body h5 {
    font-size: 1.05rem;
    margin: 0 0 0.3rem;
    font-weight: 700;
}

.combo-items-text {
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 0.9rem;
    line-height: 1.4;
}

.combo-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.combo-price-new {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.combo-price-old {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--muted);
}

.save-price {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.combo-card-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 1rem;
}

.combo-card-actions .btn {
    flex: 1;
    font-size: 0.78rem;
    padding: 0.45rem 0.4rem;
    justify-content: center;
}

.report-summary-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.3rem 1.2rem;
    border: 1px solid var(--border);
    position: relative;
}

.report-summary-card .summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.6rem 0 0;
    color: var(--text);
}

.report-summary-card .summary-label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}

.report-summary-card .summary-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.invoice-wrapper {
    background: var(--white);
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem 2.8rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    font-family: 'Inter', sans-serif;
}

.invoice-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed var(--border);
    margin-bottom: 1.5rem;
}

.invoice-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 0.6rem;
}

.invoice-header h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.invoice-header p {
    color: var(--muted);
    margin: 0.2rem 0;
    font-size: 0.87rem;
}

.invoice-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

.invoice-meta h6 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin: 0 0 0.35rem;
    font-weight: 600;
}

.invoice-meta p {
    margin: 0 0 0.2rem;
    font-size: 0.9rem;
    color: var(--text);
}

.invoice-meta strong {
    color: var(--text);
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.invoice-table thead th {
    background: #F8FAFC;
    padding: 0.75rem 0.8rem;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.invoice-table tbody td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.9rem;
}

.invoice-table tfoot td {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
}

.invoice-table tfoot tr td:first-child {
    text-align: right;
    color: var(--muted);
    font-weight: 500;
}

.invoice-table tfoot tr td:last-child {
    text-align: right;
    font-weight: 600;
}

.invoice-table tfoot tr.grand-total td {
    padding-top: 1rem;
    border-top: 2px dashed var(--border);
    font-size: 1.1rem;
}

.invoice-table tfoot tr.grand-total td:last-child {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.15rem;
}

.invoice-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--border);
    text-align: center;
}

.invoice-footer h5 {
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--primary);
}

.invoice-footer p {
    color: var(--muted);
    font-size: 0.82rem;
    margin: 0;
}

.profile-form-avatar {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 0.8rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 0.8rem;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(194, 65, 12, 0.2);
}

.cover-preview {
    width: 100%;
    height: 140px;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, rgba(194, 65, 12, 0.15), rgba(251, 146, 60, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    border: 2px dashed rgba(194, 65, 12, 0.2);
    margin-top: 0.5rem;
}

.form-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 2px;
}

.nav-tabs.nav-justified {
    background: var(--white);
    border-radius: 0.8rem;
    padding: 0.35rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.nav-tabs.nav-justified .nav-link {
    border: none;
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.nav-tabs.nav-justified .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(194, 65, 12, 0.25);
}

.top-selling-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #F1F5F9;
}

.top-selling-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.top-selling-image {
    width: 44px;
    height: 44px;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.top-selling-info {
    flex: 1;
    min-width: 0;
}

.top-selling-info h6 {
    font-size: 0.88rem;
    margin: 0 0 0.15rem;
    font-weight: 600;
}

.top-selling-info p {
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0;
}

.top-selling-amount {
    text-align: right;
    font-weight: 700;
    font-size: 0.9rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container-sm {
    position: relative;
    height: 260px;
}

.payment-method-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.payment-method-card:hover {
    border-color: rgba(194, 65, 12, 0.25);
    background: #FDFBF9;
}

.payment-method-card.active {
    border-color: var(--primary);
    background: rgba(194, 65, 12, 0.06);
}

.payment-method-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.payment-method-text h6 {
    font-size: 0.88rem;
    margin: 0;
    font-weight: 600;
}

.payment-method-text p {
    font-size: 0.72rem;
    color: var(--muted);
    margin: 0;
}

.combo-items-list {
    background: #F8FAFC;
    border-radius: 0.7rem;
    padding: 1rem;
}

.combo-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 40px;
    gap: 0.6rem;
    align-items: end;
    margin-bottom: 0.6rem;
}

.combo-item-row:last-child {
    margin-bottom: 0;
}

.order-detail-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.order-detail-card {
    flex: 1;
    min-width: 200px;
    background: var(--background);
    padding: 0.9rem 1.1rem;
    border-radius: 0.7rem;
}

.order-detail-card h6 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin: 0 0 0.3rem;
    font-weight: 600;
}

.order-detail-card p {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.cal-summary-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(194, 65, 12, 0.25);
}

.cal-summary-card h5 {
    color: rgba(255,255,255,0.85);
    margin: 0 0 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.cal-summary-card h2 {
    color: white;
    margin: 0;
    font-weight: 700;
    font-size: 2rem;
}

.wrapper.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.wrapper.sidebar-collapsed .sidebar-brand-text,
.wrapper.sidebar-collapsed .sidebar-link span,
.wrapper.sidebar-collapsed .sidebar-section-title,
.wrapper.sidebar-collapsed .sidebar-link .dropdown-arrow,
.wrapper.sidebar-collapsed .sidebar-submenu {
    display: none !important;
}

.wrapper.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.wrapper.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.7rem;
}

.wrapper.sidebar-collapsed .sidebar-brand {
    padding: 1rem;
    justify-content: center;
}

@media (max-width: 1199px) {
    .pos-container {
        grid-template-columns: 200px 1fr 320px;
    }
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    .wrapper.sidebar-open .sidebar {
        transform: translateX(0);
    }
    .wrapper.sidebar-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1029;
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .topbar {
        padding: 0 1rem;
    }
    .page-content {
        padding: 1rem;
    }
    .search-box {
        display: none;
    }
    .pos-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        height: auto;
    }
    .pos-categories, .pos-menu, .pos-cart {
        max-height: none;
    }
    .pos-categories {
        order: 1;
    }
    .pos-menu {
        order: 2;
    }
    .pos-cart {
        order: 3;
    }
    .user-info {
        display: none;
    }
    .invoice-wrapper {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 575px) {
    .page-header h2 {
        font-size: 1.2rem;
    }
    .stat-card h3 {
        font-size: 1.35rem;
    }
    .pos-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    min-height: 37px;
    padding: 0.3rem 0.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 30px;
    font-size: 0.87rem;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary);
}
