* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475467;
    --accent-blue: #007AFF;
    --accent-green: #34C759;
    --accent-red: #FF3B30;
    --accent-orange: #FF9500;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #c7d2fe 50%, #fde68a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 15px;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.4);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #f8fafc;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.revenue-summary {
    display: flex;
    gap: 15px;
    font-size: 15px;
    font-weight: 600;
    flex-wrap: wrap;
}

.revenue-summary span {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 14px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(248, 250, 252, 0.25);
    transform: translateY(-1px);
}

.logout-btn:active {
    transform: translateY(0);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    padding: 25px;
}

section {
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Food Items Section */
.food-items-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.food-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.food-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.food-item:active {
    transform: translateY(-1px) scale(0.98);
}

.item-image {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.food-item:hover .item-image img {
    transform: scale(1.1);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.item-name {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.item-price {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
}

.item-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.quantity-input {
    width: 65px;
    padding: 10px;
    border: 2px solid rgba(148, 163, 184, 0.5);
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    background: rgba(248, 250, 252, 0.9);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.quantity-input::placeholder {
    color: var(--text-secondary);
}

.add-btn {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0051D5 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    letter-spacing: -0.2px;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0080FF 0%, #0066CC 100%);
}

.add-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}

/* Current Bill Section */
.bill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(248, 250, 252, 0.9);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    font-weight: 600;
    color: var(--text-primary);
}

.bill-items {
    background: rgba(248, 250, 252, 0.95);
    border-radius: 20px;
    padding: 20px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.empty-bill {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-style: italic;
    font-size: 16px;
}

.bill-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.bill-table thead {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bill-table th {
    padding: 12px;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid rgba(148, 163, 184, 0.4);
}

.bill-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-secondary);
}

.bill-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.15);
}

.remove-btn {
    background: var(--accent-red);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #FF1A0D;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.bill-total {
    background: rgba(248, 250, 252, 0.95);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.bill-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Transaction History Section */
.transaction-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.transactions-list {
    max-height: 500px;
    overflow-y: auto;
}

.empty-transactions {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-style: italic;
    font-size: 16px;
}

.transactions-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transaction-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.35);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
}

.transaction-number {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 700;
}

.transaction-date {
    color: var(--text-secondary);
    font-size: 13px;
}

.transaction-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-green);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Buttons */
button {
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0051D5 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    letter-spacing: -0.2px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0080FF 0%, #0066CC 100%);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #28A745 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
    letter-spacing: -0.2px;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
    background: linear-gradient(135deg, #40D96F 0%, #2EB85C 100%);
}

.btn-success:active:not(:disabled) {
    transform: translateY(0);
}

.btn-success:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 14px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: var(--shadow-sm);
    letter-spacing: -0.2px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-md);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #CC2E24 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
    letter-spacing: -0.2px;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
    background: linear-gradient(135deg, #FF4D40 0%, #E62E1F 100%);
}

.btn-danger:active {
    transform: translateY(0);
}

.btn-view {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-view:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .transactions-section {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 20px;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        border-radius: 0;
    }

    header h1 {
        font-size: 26px;
    }

    .revenue-summary {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .revenue-summary span {
        text-align: center;
        width: 100%;
    }

    section {
        padding: 20px;
        border-radius: 20px;
    }

    section h2 {
        font-size: 20px;
    }

    .food-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
    }

    .item-image {
        width: 100%;
        height: 150px;
        border-radius: 15px;
    }

    .item-controls {
        width: 100%;
        justify-content: space-between;
    }

    .quantity-input {
        flex: 1;
        max-width: 100px;
    }

    .add-btn {
        flex: 1;
    }

    .bill-items {
        max-height: 300px;
    }

    .transactions-list {
        max-height: 300px;
    }

    .transaction-item {
        padding: 15px;
    }

    .transaction-header {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 22px;
    }

    .revenue-summary {
        font-size: 13px;
    }

    .revenue-summary span {
        padding: 8px 15px;
    }

    section {
        padding: 15px;
    }

    .item-name {
        font-size: 16px;
    }

    .item-price {
        font-size: 14px;
    }

    .quantity-input {
        width: 50px;
        padding: 8px;
        font-size: 14px;
    }

    .add-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .bill-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .total-row {
        font-size: 18px;
    }

    .btn-primary,
    .btn-success,
    .btn-secondary,
    .btn-danger {
        padding: 12px 20px;
        font-size: 15px;
    }
}
