:root {
    --bg-color: #f4f6fa;
    --card-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-primary: #1e202d;
    --text-muted: #64748b;
    --brand-primary: #ff4757;
    /* Vibrant Strawberry Red */
    --brand-secondary: #ffa502;
    /* Bright Cheese Yellow/Orange */
    --brand-success: #2ed573;
    --glass-blur: blur(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 71, 87, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 165, 2, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.glass-card-sm {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* --- LOGIN PAGE --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-wrapper {
    display: flex;
    width: 1000px;
    height: 600px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-cover {
    flex: 1;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.85) 0%, rgba(255, 165, 2, 0.85) 100%), url('https://images.unsplash.com/photo-1550547660-d9450f859349?ixlib=rb-1.2.1&auto=format&fit=crop&w=1000&q=80') center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 40px;
}

.cover-overlay h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: -10px;
    color: rgba(255, 255, 255, 0.9);
}

.cover-overlay h1 {
    font-size: 50px;
    font-weight: 800;
}

.cover-overlay h1 span {
    color: #fff;
}

.cover-overlay p {
    font-size: 18px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.login-section {
    width: 450px;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 28px;
    color: #1e202d;
    margin-bottom: 5px;
    font-weight: 800;
}

.login-header p {
    color: var(--text-muted);
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

@media(max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
        width: 90%;
        height: auto;
    }

    .login-cover {
        padding: 60px 20px;
    }

    .login-section {
        width: 100%;
        padding: 40px 20px;
    }
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

input:focus,
select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
    background: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b81 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 71, 87, 0.3);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-outline {
    background: transparent;
    color: var(--brand-secondary);
    border: 2px solid var(--brand-secondary);
    padding: 11px 23px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-outline:hover {
    background: rgba(255, 165, 2, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, #2ed573 0%, #20bf6b 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(46, 213, 115, 0.3);
}

.btn-danger {
    background: rgba(255, 71, 87, 0.1);
    color: var(--brand-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.2);
}


.w-100 {
    width: 100%;
}

.error-msg {
    background: rgba(255, 71, 87, 0.1);
    color: var(--brand-primary);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

/* --- NAVIGATION --- */
.floating-nav {
    position: sticky;
    top: 20px;
    margin: 0 auto 30px;
    width: 95%;
    max-width: 1400px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

.nav-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.nav-links a.active {
    color: var(--brand-secondary);
    background: rgba(255, 165, 2, 0.15);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.logout-btn {
    color: var(--brand-primary);
    background: rgba(255, 71, 87, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: 0.3s;
}

.logout-btn:hover {
    background: var(--brand-primary);
    color: white;
}

/* --- MAIN LAYOUT --- */
.main-content {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

/* --- DASHBOARD --- */
.dash-header {
    margin-bottom: 30px;
}

.dash-header h1 {
    font-size: 32px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.dash-header p {
    color: var(--text-muted);
}

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

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.stat-details h3 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-details p {
    font-size: 24px;
    font-weight: 800;
    margin-top: 5px;
}

.quick-actions {
    padding: 30px;
}

.quick-actions h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.mt-2 {
    margin-top: 20px;
}

.mt-3 {
    margin-top: 30px;
}

.mb-2 {
    margin-bottom: 20px;
}

/* --- SPLIT LAYOUT (Categories, Items, Checkout) --- */
.split-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    align-items: start;
}

/* .flex-reverse { Optional if we want form on left or right } */
@media(max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

.form-panel {
    padding: 30px;
    position: sticky;
    top: 110px;
}

.form-panel h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

.data-panel {
    padding: 30px;
}

.data-panel h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

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

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.data-table td {
    font-weight: 500;
}

/* -- ITEMS GRID -- */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.item-card {
    overflow: hidden;
    position: relative;
    transition: 0.3s;
    background: #fff;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.item-img {
    height: 100px;
    width: 100%;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #cbd5e1;
    background: #f8fafc;
}

.item-info {
    padding: 12px;
}

.item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 700;
    color: #1e202d;
}

.category-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 165, 2, 0.15);
    color: #d98d00;
    margin-bottom: 10px;
    font-weight: 600;
}

.price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 800;
    color: var(--brand-success);
    font-size: 15px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 71, 87, 0.1);
    color: var(--brand-primary);
    transition: 0.2s;
}

.btn-icon:hover {
    background: var(--brand-primary);
    color: #fff;
}

/* --- POS ORDER SCREEN --- */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    height: calc(100vh - 120px);
}

.menu-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    padding-right: 5px;
}

.menu-side::-webkit-scrollbar {
    width: 6px;
}

.menu-side::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.menu-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    margin-bottom: 5px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 5px 15px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.search-box:focus-within {
    background: white;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

.search-box .iconify {
    font-size: 20px;
    color: var(--text-muted);
}

.search-box input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.cat-btn {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid transparent;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.03);
}

.cat-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.cat-btn.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.item-card-pos {
    cursor: pointer;
    user-select: none;
}

.item-card-pos:active {
    transform: scale(0.95);
}

.pos-img {
    height: 140px;
    background: #fff;
    position: relative;
    padding: 10px;
}

.pos-img img {
    border-radius: 10px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-card-pos:hover .pos-img img {
    transform: scale(1.08);
}

.pos-info {
    padding: 8px;
    text-align: center;
}

.pos-info h4 {
    font-size: 13px;
    margin-bottom: 3px;
}

.price-badge {
    display: inline-block;
    font-size: 16px;
    color: white;
    font-weight: 800;
    margin-top: 5px;
    padding: 4px 14px;
    background: var(--brand-secondary);
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(255, 165, 2, 0.3);
}

.add-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 71, 87, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    backdrop-filter: blur(2px);
}

.item-card-pos:hover .add-overlay {
    opacity: 1;
}

.add-overlay .iconify {
    font-size: 40px;
    color: white;
    transform: scale(0.5);
    transition: 0.3s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.item-card-pos:hover .add-overlay .iconify {
    transform: scale(1);
}

.no-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f2f6 0%, #dfe4ea 100%);
    color: #a4b0be;
    font-size: 40px;
    border-radius: 10px;
}


.ticket-side {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ticket-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.clear-btn {
    background: rgba(255, 71, 87, 0.1);
    border: none;
    color: var(--brand-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.2s;
}

.clear-btn:hover {
    background: var(--brand-primary);
    color: white;
}

.ticket-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.ticket-items::-webkit-scrollbar {
    width: 6px;
}

.ticket-items::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.empty-cart {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-style: italic;
    font-weight: 500;
}

.ticket-item {
    background: transparent;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.item-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 30px;
}

.btn-round {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    color: white;
    background: var(--brand-primary);
    cursor: pointer;
    font-weight: 800;
    font-size: 18px;
    transition: all 0.2s ease;
}

.btn-round:hover {
    transform: scale(1.1);
    background: #ff6b81;
}

.btn-round:active {
    transform: scale(0.9);
}

.qty {
    width: 24px;
    text-align: center;
    font-weight: 800;
    color: var(--text-primary);
}

.item-price {
    font-weight: 800;
    color: var(--brand-success);
}


.ticket-footer {
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 0 20px 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.total-price {
    font-size: 26px;
    font-weight: 900;
    color: #d98d00;
}

.send-kitchen-btn {
    font-size: 18px;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 15px rgba(255, 71, 87, 0.3);
}

/* --- CHECKOUT SCREEN --- */
.open-orders {
    padding: 20px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-chip {
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid transparent;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.order-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.order-chip.active {
    border-color: var(--brand-primary);
    background: rgba(255, 71, 87, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

.order-id {
    font-weight: 800;
    color: #d98d00;
    font-size: 16px;
}

.order-time {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.order-total {
    font-weight: 800;
    color: var(--text-primary);
}

.checkout-calculator {
    padding: 30px;
}

.checkout-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.change-display {
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--text-primary);
}

.change-price {
    font-size: 28px;
    color: #d98d00;
    font-weight: 900;
}