:root {
    /* Primary - Orange vibrant */
    --primary: hsl(14, 100%, 60%);
    /* #FF6B35 */
    --primary-hover: hsl(14, 100%, 55%);

    /* Secondary - Red appetizing */
    --secondary: hsl(353, 67%, 49%);
    /* #C73E3A */

    /* Accent - Yellow warm */
    --accent: hsl(46, 100%, 50%);
    /* #FFB800 */

    /* Success */
    --success: hsl(142, 71%, 45%);

    /* Warning */
    --warning: hsl(45, 93%, 47%);

    /* Destructive */
    --destructive: hsl(0, 84%, 60%);

    /* Backgrounds */
    --background: hsl(0, 0%, 100%);
    --surface: hsl(0, 0%, 98%);
    --card: hsl(0, 0%, 100%);
    --muted: hsl(0, 0%, 96%);
    --border: hsl(0, 0%, 90%);

    /* Text */
    --foreground: hsl(0, 0%, 13%);
    --muted-foreground: hsl(0, 0%, 45%);
    --sidebar-width: 80px;
    --header-height: 70px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--muted);
    color: var(--foreground);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Helpers & Utilities */
.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-initial {
    flex: 0 1 auto;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.w-44 {
    width: 11rem;
}

.w-64 {
    width: 16rem;
}

.min-w-0 {
    min-width: 0;
}

.max-w-full {
    max-width: 100%;
}

.h-full {
    height: 100%;
}

.ml-auto {
    margin-left: auto;
}

.mr-auto {
    margin-right: auto;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Responsive Grid & Flex Utilities (Tailwind-like) */
@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row !important;
    }
    .sm\:flex-col {
        flex-direction: column !important;
    }
    .sm\:flex-wrap {
        flex-wrap: wrap !important;
    }
    .sm\:flex-nowrap {
        flex-wrap: nowrap !important;
    }
    .sm\:items-center {
        align-items: center !important;
    }
    .sm\:items-start {
        align-items: flex-start !important;
    }
    .sm\:items-end {
        align-items: flex-end !important;
    }
    .sm\:justify-start {
        justify-content: flex-start !important;
    }
    .sm\:justify-end {
        justify-content: flex-end !important;
    }
    .sm\:justify-between {
        justify-content: space-between !important;
    }
    .sm\:justify-center {
        justify-content: center !important;
    }
    .sm\:w-auto {
        width: auto !important;
    }
    .sm\:w-full {
        width: 100% !important;
    }
    .sm\:w-44 {
        width: 11rem !important;
    }
    .sm\:w-64 {
        width: 16rem !important;
    }
    .sm\:flex-1 {
        flex: 1 1 0% !important;
    }
    .sm\:flex-initial {
        flex: 0 1 auto !important;
    }
    .sm\:ml-auto {
        margin-left: auto !important;
    }
    .sm\:mr-auto {
        margin-right: auto !important;
    }
    .sm\:inline {
        display: inline !important;
    }
    .sm\:block {
        display: block !important;
    }
    .sm\:flex {
        display: flex !important;
    }
    .sm\:hidden {
        display: none !important;
    }
    .sm\:p-3 {
        padding: 0.75rem !important;
    }
    .sm\:p-4 {
        padding: 1rem !important;
    }
    .sm\:p-6 {
        padding: 1.5rem !important;
    }
    .sm\:p-8 {
        padding: 2rem !important;
    }
    .sm\:text-xs {
        font-size: 0.75rem !important;
    }
    .sm\:text-sm {
        font-size: 0.875rem !important;
    }
    .sm\:text-base {
        font-size: 1rem !important;
    }
    .sm\:text-xl {
        font-size: 1.25rem !important;
    }
    .sm\:text-2xl {
        font-size: 1.5rem !important;
    }
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 769px) {
    .md\:flex-row {
        flex-direction: row !important;
    }
    .md\:flex-col {
        flex-direction: column !important;
    }
    .md\:flex-wrap {
        flex-wrap: wrap !important;
    }
    .md\:flex-nowrap {
        flex-wrap: nowrap !important;
    }
    .md\:items-center {
        align-items: center !important;
    }
    .md\:items-start {
        align-items: flex-start !important;
    }
    .md\:items-end {
        align-items: flex-end !important;
    }
    .md\:justify-between {
        justify-content: space-between !important;
    }
    .md\:justify-end {
        justify-content: flex-end !important;
    }
    .md\:justify-start {
        justify-content: flex-start !important;
    }
    .md\:justify-center {
        justify-content: center !important;
    }
    .md\:w-auto {
        width: auto !important;
    }
    .md\:w-full {
        width: 100% !important;
    }
    .md\:w-44 {
        width: 11rem !important;
        min-width: 11rem !important;
    }
    .md\:w-64 {
        width: 16rem !important;
        min-width: 16rem !important;
    }
    .md\:flex-1 {
        flex: 1 1 0% !important;
    }
    .md\:flex-initial {
        flex: 0 1 auto !important;
    }
    .md\:ml-auto {
        margin-left: auto !important;
    }
    .md\:mr-auto {
        margin-right: auto !important;
    }
    .md\:hidden {
        display: none !important;
    }
    .md\:block {
        display: block !important;
    }
    .md\:flex {
        display: flex !important;
    }
    .md\:inline {
        display: inline !important;
    }
    .md\:p-0 {
        padding: 0 !important;
    }
    .md\:p-4 {
        padding: 1rem !important;
    }
    .md\:p-6 {
        padding: 1.5rem !important;
    }
    .md\:p-8 {
        padding: 2rem !important;
    }
    .md\:pt-0 {
        padding-top: 0 !important;
    }
    .md\:pb-0 {
        padding-bottom: 0 !important;
    }
    .md\:bg-transparent {
        background-color: transparent !important;
    }
    .md\:text-sm {
        font-size: 0.875rem !important;
    }
    .md\:text-base {
        font-size: 1rem !important;
    }
    .md\:text-xl {
        font-size: 1.25rem !important;
    }
    .md\:text-2xl {
        font-size: 1.5rem !important;
    }
    .md\:border-b-0 {
        border-bottom-width: 0px !important;
    }
    .md\:border-r {
        border-right: 1px solid var(--border) !important;
    }
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    .md\:grid-cols-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

.col-span-full {
    grid-column: 1 / -1;
}

/* Orders Grid Specific (KDS Style) */
#orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.order-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none !important;
    height: fit-content;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.order-card-header {
    padding: 1rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
}

/* Header status colors */
.status-normal {
    background: var(--success);
}

.status-warning {
    background: var(--warning);
}

.status-critical {
    background: var(--destructive);
}

.order-card-body {
    padding: 1rem;
    flex: 1;
}

.order-card-footer {
    padding: 1rem;
    background: #fdfdfd;
    border-top: 1px dashed var(--border);
}

.order-number-lg {
    font-size: 1.5rem;
}

.order-item-list {
    margin-top: 0.75rem;
}

.order-item-kds {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item-kds:last-child {
    border-bottom: none;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.rounded {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.border {
    border: 1px solid var(--border);
}

.border-b {
    border-bottom: 1px solid var(--border);
}

.bg-gray-50 {
    background-color: var(--muted);
}

.bg-gray-100 {
    background-color: hsl(0, 0%, 96%);
}

.bg-gray-200 {
    background-color: hsl(0, 0%, 90%);
}

.bg-green-100 {
    background-color: hsl(142, 71%, 95%);
}

.bg-red-100 {
    background-color: hsl(0, 84%, 95%);
}

.bg-blue-100 {
    background-color: hsl(210, 100%, 95%);
}

.text-green-800 {
    color: hsl(142, 71%, 25%);
}

.text-red-800 {
    color: hsl(0, 84%, 25%);
}

.text-red-500 {
    color: var(--destructive);
}

.text-red-600 {
    color: hsl(0, 84%, 50%);
}

.text-red-700 {
    color: hsl(0, 84%, 40%);
}

.text-blue-600 {
    color: hsl(210, 100%, 50%);
}

.text-blue-800 {
    color: hsl(210, 100%, 30%);
}

.text-gray-400 {
    color: hsl(0, 0%, 60%);
}

.text-gray-600 {
    color: var(--muted-foreground);
}

.text-gray-800 {
    color: hsl(0, 0%, 20%);
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.text-primary {
    color: var(--primary);
}

.text-muted-foreground {
    color: var(--muted-foreground);
}

.cursor-pointer {
    cursor: pointer;
}

.inline {
    display: inline;
}

.block {
    display: block;
}

.hidden {
    display: none;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.h-32 {
    height: 8rem;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.hover\:bg-gray-50:hover {
    background-color: var(--muted);
}

.hover\:bg-gray-200:hover {
    background-color: hsl(0, 0%, 85%);
}

.hover\:text-blue-800:hover {
    color: hsl(210, 100%, 30%);
}

.hover\:text-red-700:hover {
    color: hsl(0, 84%, 40%);
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.transition {
    transition: all 0.2s;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-secondary {
    background-color: var(--muted);
    color: var(--foreground);
}

.btn-destructive {
    background-color: var(--destructive);
    color: white;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.card {
    background-color: var(--card);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.input,
.select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.input:focus,
.select:focus {
    outline: none;
    border-color: var(--primary);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.logo-animate {
    font-size: 3rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(-5%);
    }

    50% {
        transform: translateY(5%);
    }
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--muted);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    color: var(--muted-foreground);
    font-weight: 500;
    transition: 0.3s;
}

.tab.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.tab-content {
    padding: 2rem;
    display: none;
}

.tab-content.active {
    display: block;
}

/* Dashboard Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-tabs {
    display: flex;
    gap: 1rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--muted-foreground);
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--muted);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(255, 107, 53, 0.3);
}

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* User info - custom visibility handling */
.user-info-container {
    display: none;
    /* Mobile default */
}

@media (min-width: 769px) {
    .user-info-container {
        display: flex !important;
        flex-direction: column;
        align-items: flex-end;
        margin-right: 0.5rem;
    }
}

/* Sales Module */
.sales-layout {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 1.5rem;
    height: calc(100vh - var(--header-height) - 3rem);
}

.products-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.category-filter {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.cat-btn {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    padding: 0.5rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 185px;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 107, 53, 0.15);
}

.product-image-container {
    width: 100%;
    height: 85px;
    border-radius: 12px;
    margin-bottom: 0.4rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--muted);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    gap: 1px;
}

.product-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--foreground);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.95rem;
}

.product-stock {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted-foreground);
    background: var(--muted);
    padding: 1px 6px;
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto;
}

.order-section {
    background: white;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 0;
}

.order-header {
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-item {
    background: var(--muted);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: 0.2s;
}

.order-footer {
    padding: 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.total-display {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.pay-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.pay-btn {
    padding: 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pay-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.btn-cash {
    background-color: var(--success);
}

.btn-qr {
    background-color: #0088CC;
}

.btn-card {
    background-color: #6B46C1;
}

.btn-mixed {
    background: linear-gradient(90deg, #F6AD55, #ED8936);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    padding: 2rem;
    animation: modalSlide 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlide {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Cart Elements Base (Hidden on Desktop & Tablet Landscape) */
.mobile-cart-bar {
    display: none;
}

.mobile-order-backdrop {
    display: none;
}

/* Admin / Settings Layout (Desktop Defaults) */
.admin-layout {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - var(--header-height, 70px));
    width: 100%;
}

.admin-sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-sidebar-heading {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--muted-foreground);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
    letter-spacing: 0.1em;
}

.admin-sidebar-footer {
    display: block;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.admin-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #6b7280;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    border: 2px solid transparent;
    cursor: pointer;
    background: transparent;
}

.admin-nav-btn:hover {
    background: #f9fafb;
    color: var(--primary);
}

.admin-nav-btn.active {
    background: #ffffff;
    color: var(--primary);
    border-color: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-layout > main {
    flex: 1;
    width: calc(100% - 260px);
    padding: 2rem;
    background: #f9fafb;
    overflow-y: auto;
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .main-header {
        padding: 0 0.75rem;
        height: var(--header-height);
    }

    .brand {
        font-size: 1.15rem;
    }

    /* Fixed Bottom Nav Bar (Mobile Icon Bar) */
    .nav-tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 58px;
        background: #ffffff;
        border-top: 1px solid var(--border);
        padding: 0.25rem 0.5rem;
        padding-bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px));
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.07);
        gap: 0.25rem;
    }

    .nav-item {
        flex: 1;
        min-width: 0;
        height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        color: var(--muted-foreground);
        transition: all 0.2s ease;
    }

    .nav-item span {
        display: none !important;
    }

    .nav-item i {
        font-size: 1.3rem;
        margin: 0;
    }

    .nav-item:hover {
        background: var(--muted);
        color: var(--primary);
    }

    .nav-item.active {
        background: var(--primary) !important;
        color: #ffffff !important;
        box-shadow: 0 3px 8px rgba(234, 88, 12, 0.35);
        transform: translateY(-2px);
    }

    .main-content {
        padding: 0.75rem;
        padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
        /* Space for fixed nav */
    }

    /* Admin / Settings Mobile Responsive Navigation */
    .admin-layout {
        display: flex !important;
        flex-direction: column !important;
        min-height: auto !important;
        width: 100% !important;
    }

    .admin-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border) !important;
        padding: 0.5rem 0.75rem !important;
        background: #ffffff !important;
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0.5rem !important;
        position: sticky !important;
        top: var(--header-height, 56px) !important;
        z-index: 40 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }

    .admin-sidebar::-webkit-scrollbar {
        height: 3px;
    }

    .admin-sidebar::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 4px;
    }

    .admin-sidebar-heading,
    .admin-sidebar-footer {
        display: none !important;
    }

    .admin-nav-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        width: auto !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.8rem !important;
        border-radius: 9999px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        border: 1px solid var(--border) !important;
        background: #f9fafb !important;
        color: #4b5563 !important;
        box-shadow: none !important;
    }

    .admin-nav-btn:hover {
        background: #f3f4f6 !important;
        color: var(--primary) !important;
    }

    .admin-nav-btn.active {
        background: var(--primary) !important;
        color: #ffffff !important;
        border-color: var(--primary) !important;
        box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3) !important;
    }

    .admin-layout > main {
        padding: 1rem 0.75rem calc(85px + env(safe-area-inset-bottom, 0px)) 0.75rem !important;
        width: 100% !important;
    }

    /* Sales Module Mobile Layout */
    .sales-layout {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: calc(100vh - var(--header-height, 56px) - 75px) !important;
        padding-bottom: 75px !important;
        gap: 0 !important;
    }

    .products-section {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding-bottom: 80px !important; /* Extra padding so last row of products is never blocked */
    }

    /* Floating Mobile Cart Bar */
    .mobile-cart-bar {
        display: flex !important;
        position: fixed !important;
        bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 6px) !important;
        left: 10px !important;
        right: 10px !important;
        z-index: 950 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 2px solid #e5e7eb !important;
        border-radius: 16px !important;
        padding: 8px 14px !important;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
        align-items: center !important;
        justify-content: space-between !important;
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .mobile-cart-bar.has-items {
        border-color: #ea580c !important;
        background: linear-gradient(to right, #ffffff, #fff7ed) !important;
        box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.3), 0 4px 6px -2px rgba(234, 88, 12, 0.1) !important;
    }

    .mobile-cart-icon {
        position: relative !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        background: #ffedd5 !important;
        color: #ea580c !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
    }

    .mobile-cart-badge {
        position: absolute !important;
        top: -6px !important;
        right: -6px !important;
        background: #ea580c !important;
        color: white !important;
        font-size: 0.65rem !important;
        font-weight: 800 !important;
        border-radius: 9999px !important;
        min-width: 18px !important;
        height: 18px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 2px solid white !important;
        line-height: 1 !important;
        padding: 0 4px !important;
    }

    .mobile-cart-btn {
        background: linear-gradient(135deg, #ea580c, #c2410c) !important;
        color: white !important;
        border: none !important;
        padding: 8px 16px !important;
        border-radius: 12px !important;
        font-size: 0.8rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.02em !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35) !important;
        cursor: pointer !important;
        transition: transform 0.15s ease !important;
    }

    .mobile-cart-btn:active {
        transform: scale(0.96) !important;
    }

    /* Mobile Order Drawer / Modal */
    .mobile-order-backdrop {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(3px) !important;
        -webkit-backdrop-filter: blur(3px) !important;
        z-index: 1150 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease !important;
    }

    .mobile-order-backdrop.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .order-section {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 90vh !important;
        width: 100% !important;
        z-index: 1200 !important;
        background: #ffffff !important;
        border-radius: 24px 24px 0 0 !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3) !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateY(110%) !important;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
        overflow: hidden !important;
        padding: 0 !important;
        border: none !important;
    }

    .order-section.mobile-open {
        transform: translateY(0) !important;
    }

    .order-header {
        padding: 1rem 1.25rem !important;
        border-bottom: 1px solid #f3f4f6 !important;
        background: #ffffff !important;
        border-radius: 24px 24px 0 0 !important;
    }

    .order-items {
        max-height: 40vh !important;
        overflow-y: auto !important;
        padding: 0.75rem 1rem !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .order-footer {
        padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)) 1rem !important;
        background: #f9fafb !important;
        border-top: 1px solid #f3f4f6 !important;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .product-card {
        height: 140px;
        border-radius: 12px;
        padding: 0.4rem;
    }

    .product-image-container {
        height: 60px;
    }

    .product-name {
        font-size: 0.75rem;
    }

    .product-price {
        font-size: 0.8rem;
    }

    .product-stock {
        font-size: 0.6rem;
        padding: 0 4px;
    }

    /* Tables */
    .card table {
        display: table;
        width: 100%;
    }

    .card.overflow-hidden,
    .card.overflow-x-auto,
    .overflow-x-auto {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        padding: 1.25rem;
    }

    .category-filter {
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pay-buttons {
        grid-template-columns: 1fr 1fr;
        /* Keep 2 columns as user liked */
        gap: 0.5rem;
    }

    .pay-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .total-display {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 1.25rem !important;
    }
}

/* Tailwind Compatibility Utilities needed for Admin Panel */
.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.w-20 {
    width: 5rem;
}

.h-20 {
    height: 5rem;
}

.object-cover {
    object-fit: cover;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* Base Utility Classes */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.flex {
    display: flex;
}

.hidden {
    display: none;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.grid {
    display: grid;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.border {
    border: 1px solid var(--border);
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.bg-white {
    background-color: #ffffff;
}

.p-3 {
    padding: 0.75rem;
}

.left-1 {
    left: 0.25rem;
}

.left-4 {
    left: 1rem;
}

.top-1\/2 {
    top: 50%;
}

.-translate-y-1\/2 {
    transform: translateY(-50%);
}

.text-gray-400 {
    color: #9ca3af;
}

/* =========================================================================
   QR Payment Notification Toast Styles
   ========================================================================= */
.qr-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: 100%;
    pointer-events: none;
}

.qr-notification-toast {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-left: 5px solid #ea580c;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: start;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    border: 1px solid rgba(0,0,0,0.05);
}

.qr-notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.qr-notification-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffedd5;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.qr-notification-content {
    flex-grow: 1;
    text-align: left;
}

.qr-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.qr-notification-badge-static {
    background: #ffedd5;
    color: #c2410c;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
}

.qr-notification-badge-dynamic {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
}

.qr-notification-time {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
}

.qr-notification-title {
    font-weight: 800;
    color: #1f2937;
    margin: 4px 0 2px 0;
    font-size: 14px;
    line-height: 1.2;
}

.qr-notification-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.qr-notification-amount {
    color: #ea580c;
    font-weight: 950;
    font-size: 16px;
}

.qr-notification-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    transition: color 0.2s;
    line-height: 1;
    margin-left: auto;
}

.qr-notification-close:hover {
    color: #4b5563;
}