@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #F36A22;
    --primary-light: #FF8A4D;
    --secondary: #FFD700;
    --dark: #1A1918;
    --light: #F8F9FA;
    --white: #FFFFFF;
    --gray: #718096;
    --border: #EDF2F7;
    --danger: #E53E3E;
    --success: #38A169;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-md: 16px;
    --radius-lg: 28px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f4f7f9;
    color: var(--dark);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--secondary) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    opacity: 0.1;
    z-index: -1;
}

/* Forms & Typography */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 16px 20px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(243, 106, 34, 0.1);
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.5px;
}

p {
    color: var(--gray);
    font-weight: 500;
}

/* Buttons */
.btn-primary,
.btn-checkout {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 32px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(243, 106, 34, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-primary:hover,
.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(243, 106, 34, 0.3);
    filter: brightness(1.1);
}

.btn-primary:active,
.btn-checkout:active {
    transform: translateY(-1px);
}

/* Table Action & Small Buttons */
.btn-edit,
.btn-delete,
.btn-save,
.btn-cancel {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    margin-right: 5px;
}

.btn-edit {
    background: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

.btn-edit:hover {
    background: #3498DB;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.btn-delete {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

.btn-delete:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(229, 62, 62, 0.2);
}

.btn-save {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.btn-save:hover {
    background: var(--success);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(56, 161, 105, 0.2);
}

.btn-cancel {
    background: #EDF2F7;
    color: var(--gray);
}

.btn-cancel:hover {
    background: #E2E8F0;
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-filter {
    padding: 14px 28px;
    background: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s;
    color: var(--gray);
    box-shadow: var(--shadow-sm);
}

.btn-filter.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(243, 106, 34, 0.2);
}

.btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FED7D7;
    color: var(--danger);
    border: none;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
}

/* Logo & Header */
@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes glowLux {
    0%, 100% { 
        background: var(--secondary); 
        color: var(--dark); 
        box-shadow: none; 
        transform: scale(1) rotate(0deg);
    }
    50% { 
        background: var(--primary); 
        color: white; 
        box-shadow: 0 4px 12px rgba(243, 106, 34, 0.4); 
        transform: scale(1.08) rotate(4deg);
    }
}

.logo-text {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: -1.5px;
    transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    animation: floatLogo 3s infinite ease-in-out;
}

.logo-text:hover {
    transform: scale(1.05);
}

.logo-text span {
    color: var(--dark);
    background: var(--secondary);
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 6px;
    letter-spacing: 0;
    font-size: 22px;
    display: inline-block;
    transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: glowLux 3s infinite ease-in-out;
}

.main-header {
    height: 85px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.hamburger {
    font-size: 24px;
    background: var(--white);
    border: 1.5px solid var(--border);
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.hamburger:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-greeting {
    font-weight: 600;
    color: var(--gray);
    display: none;
}

.user-greeting span {
    color: var(--dark);
    font-weight: 800;
}

.btn-logout-header {
    background: #fff5f5;
    color: var(--danger);
    padding: 12px 24px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s;
}

.btn-logout-header:hover {
    background: var(--danger);
    color: white;
}

.btn-admin-header {
    background: #fdf6e3;
    color: #b8860b;
    padding: 12px 24px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s;
}

.btn-admin-header:hover {
    background: var(--secondary);
    color: var(--dark);
}

@media (min-width: 900px) {
    .user-greeting {
        display: block;
    }
}

/* Drawer & Sidebar */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: 0.4s;
}

.side-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: var(--dark);
    z-index: 2001;
    padding: 40px 30px;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.side-drawer.active {
    left: 0;
}

.drawer-overlay.active {
    display: block;
    opacity: 1;
}

.nav-links {
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #a0aec0;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    transition: 0.3s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 6px 15px rgba(243, 106, 34, 0.25);
    font-weight: 700;
}

/* POS Termial */
.pos-container {
    display: flex;
    height: 100vh;
    padding-top: 85px;
}

.product-section {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.search-filter-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    padding-left: 60px;
    border: none;
    box-shadow: var(--shadow-sm);
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--gray);
}

.category-filters {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    cursor: pointer;
    transition: 0.4s;
    border: 2px solid transparent;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

/* Cart Panel */
.cart-panel {
    width: 450px;
    background: var(--white);
    border-left: 1px solid var(--border);
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.cart-mobile-header {
    display: none;
}

.cart-desktop-header {
    margin-bottom: 25px;
}

.cart-desktop-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 5px;
}

.order-id {
    font-size: 14px;
    color: var(--gray);
    font-weight: 600;
}

.customer-input {
    margin-bottom: 20px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1.5px solid #f7fafc;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.cart-item-info p {
    font-size: 13px;
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 16px;
}

.total-section {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 35px;
    border: 1.5px solid var(--border);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--gray);
}

.final-total {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    margin: 20px 0;
    border-top: 2px dashed var(--border);
    padding-top: 20px;
}

/* Admin Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
    padding-top: 85px;
}

aside {
    width: 300px;
    background: var(--dark);
    padding: 3px 30px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 85px);
}

.dashboard-main {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
    background: #f7fafc;
}

@media (max-width: 900px) {
    .dashboard-main {
        overflow: visible;
        padding: 20px;
    }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -1px;
}

.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow-x: auto;
    border: 1px solid var(--border);
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 4px;
}

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

th {
    background: #f8fafc;
    padding: 20px 30px;
    text-align: left;
    font-size: 13px;
    color: var(--gray);
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1.5px solid var(--border);
}

td {
    padding: 22px 30px;
    border-bottom: 1.5px solid var(--border);
    font-size: 16px;
    font-weight: 600;
}

/* Responsive Mobile */
@media (max-width: 1200px) {
    .cart-panel {
        width: 380px;
    }
}

@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }

    aside {
        display: none;
    }

    .main-header {
        padding: 0 25px;
    }

    body {
        height: auto;
        overflow-y: auto;
    }

    .pos-container,
    .dashboard-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .product-section {
        padding: 25px;
        padding-bottom: 100px; /* Space for floating cart */
    }

    .cart-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80px;
        flex-direction: row;
        align-items: center;
        padding: 0 25px;
        border-radius: 32px 32px 0 0;
        box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.15);
        border: none;
        z-index: 1500;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .cart-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        cursor: pointer;
    }

    .cart-mobile-header h2 {
        font-size: 18px;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .badge {
        background: var(--primary);
        color: white;
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 14px;
    }

    .expand-icon {
        font-size: 18px;
        color: var(--gray);
        transition: 0.3s;
    }

    .cart-panel.expanded {
        height: 88vh;
        flex-direction: column;
        align-items: stretch;
        padding: 30px 25px;
    }

    .cart-panel.expanded .expand-icon {
        transform: rotate(180deg);
    }

    .cart-desktop-header,
    .customer-input,
    .cart-items,
    .total-section {
        display: none;
    }

    .cart-panel.expanded .cart-desktop-header,
    .cart-panel.expanded .customer-input,
    .cart-panel.expanded .cart-items,
    .cart-panel.expanded .total-section {
        display: block;
    }
}

/* Modals & Loading */
/* Modals & Loading */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-card {
    background: var(--white);
    width: 95%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    padding: 45px;
    animation: modalBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.close-modal {
    background: #f4f7f9;
    border: none;
    font-size: 24px;
    color: var(--gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.close-modal:hover {
    background: #e2e8f0;
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 35px;
}

.modal-footer .btn-cancel,
.modal-footer .btn-primary {
    padding: 14px 28px;
    font-size: 16px;
    width: auto;
    border-radius: 14px;
}

@keyframes modalBounce {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-text {
    margin-top: 30px;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
    animation: pulseText 1.5s infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cooking-loader {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.pan {
    position: absolute;
    bottom: 20px;
    width: 60px;
    height: 10px;
    background: #333;
    border-radius: 0 0 10px 10px;
    animation: panTilt 1.2s infinite ease-in-out;
}

.food {
    position: absolute;
    bottom: 35px;
    left: 20px;
    width: 25px;
    height: 10px;
    background: var(--primary);
    border-radius: 10px;
    animation: foodToss 1.2s infinite ease-in-out;
}

.steam {
    position: absolute;
    top: 20px;
    left: 25px;
    width: 6px;
    height: 15px;
    background: #cbd5e0;
    border-radius: 10px;
    filter: blur(3px);
    animation: steamRise 1.2s infinite;
}

@keyframes panTilt {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-12deg);
    }
}

@keyframes foodToss {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-50px);
        background: var(--secondary);
    }
}

@keyframes steamRise {
    0% {
        transform: translateY(0);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-40px);
        opacity: 0;
    }
}

/* Auth Page */
.auth-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 60px 45px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
    text-align: center;
    animation: fadeInScale 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* SweetAlert Overrides */
.swal2-container {
    z-index: 9999 !important;
}