:root {
    /* Color Palette */
    --primary-blue: #4285F4;
    --secondary-blue: #D6E3F9;
    --dark-text: #1F2937;
    --light-text: #6B7280;
    --white: #ffffff;
    --light-gray: #F9FAFB;
    --border-color: #E5E7EB;
    --red-alert: #EF4444;
    --green-success: #10B981;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}

/* Base Styles and Layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    display: flex;
    width: 100%;
    max-width: 1600px; 
    height: 100vh;
    overflow: hidden;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: 12px;
}

/* General Button/Input Reset */
button {
    cursor: pointer;
    border: none;
    background: none;
}
input, textarea, select {
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9em;
    color: var(--dark-text);
}

/* --- Left Sidebar (Navigation) --- */
.sidebar {
    width: 250px;
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

/* User Profile Section */
.user-profile {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    position: relative;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary-blue);
    color: var(--primary-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 10px;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    color: var(--dark-text);
}

.user-role {
    font-size: 0.8em;
    color: var(--light-text);
}

.close-btn {
    position: absolute;
    right: 0;
    top: 5px;
    font-size: 1.5em;
    color: var(--light-text);
    display: none; /* Hidden on desktop, shown on mobile via media query/JS */
}

/* Navigation Links */
.main-nav {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--light-text);
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.95em;
    font-weight: 500;
}

.nav-item .icon {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    background-color: var(--light-text); 
    border-radius: 4px;
    opacity: 0.5;
    /* In a real scenario, this would be an SVG or icon font */
}

.nav-item:hover:not(.active) {
    background-color: var(--light-gray);
    color: var(--dark-text);
}

.nav-item.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

.nav-item.active .icon {
    background-color: var(--white);
    opacity: 1;
}

/* Log Out Section */
.log-out {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.log-out-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: var(--red-alert);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
}

/* --- Main Content Area --- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--light-gray);
    overflow: hidden; /* Contains children scrolls */
}

/* Header/Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-time {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    color: var(--light-text);
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.date {
    margin-right: 10px;
    font-weight: 500;
    color: var(--dark-text);
}

.order-status {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
}
.order-status.open {
    color: var(--primary-blue);
    background-color: var(--secondary-blue);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}
.order-status.open .status-dot {
    background-color: var(--primary-blue);
}


.menu-toggle-btn {
    display: none; /* Hidden on desktop */
    font-size: 1.5em;
    color: var(--dark-text);
}

.icon-btn {
    font-size: 1.2em;
    color: var(--light-text);
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.icon-btn:hover {
    background-color: var(--border-color);
}

/* POS Body Layout */
.pos-body {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

/* Menu and Product Panel (Left/Center Section) */
.menu-panel {
    flex: 3;
    max-width: calc(100% - 350px); /* Ensures order panel space on large screens */
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 15px;
}

/* Menu Categories */
.menu-categories {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    flex-shrink: 0; /* Prevents shrinking */
    /* Custom scrollbar appearance (non-standard) */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.menu-categories::-webkit-scrollbar {
    height: 6px;
}
.menu-categories::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.category {
    flex-shrink: 0;
    min-width: 100px;
    padding: 10px 15px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--light-text);
}

.category.active {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.category small {
    display: block;
    font-size: 0.75em;
    color: inherit;
    opacity: 0.8;
}

/* Product Selection */
.product-selection {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Fixes potential flex issues in IE/Edge */
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    background-color: var(--white);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    font-size: 0.9em;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px; /* Space for scrollbar */
}

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.1s, box-shadow 0.1s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.product-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-blue);
    font-size: 0.7em;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.product-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 5px;
}

.product-name {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--dark-text);
    line-height: 1.2;
}

.product-price {
    font-size: 1em;
    font-weight: 700;
    color: var(--primary-blue);
    margin-top: 3px;
}

/* Active Orders Queue */
.active-orders-queue {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.track-order-btn {
    flex-shrink: 0;
    padding: 10px 15px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-item {
    flex-shrink: 0;
    background-color: var(--white);
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-width: 140px;
    transition: background-color 0.2s;
}

.order-item.active {
    border-color: var(--primary-blue);
    background-color: var(--secondary-blue);
}

.customer-name {
    font-weight: 600;
    color: var(--dark-text);
}

.order-details {
    font-size: 0.8em;
    color: var(--light-text);
    margin-bottom: 5px;
}

.order-time {
    font-size: 0.75em;
    color: var(--light-text);
}

.status {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--green-success);
    margin-top: 5px;
}

/* --- Order Summary Panel (Right Sidebar) --- */
.order-summary-panel {
    flex: 1;
    min-width: 350px; 
    max-width: 400px;
    background-color: var(--white);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
}

/* Order Header */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.order-title {
    display: flex;
    flex-direction: column;
}

.order-header .customer-name {
    font-size: 1.1em;
    font-weight: 700;
}

.order-header .order-number {
    font-size: 0.8em;
    color: var(--light-text);
}

.edit-btn {
    color: var(--light-text);
    font-size: 1em;
    padding: 5px;
}

/* Table and Type Selectors */
.order-table-type {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.select-field {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.9em;
    background-color: var(--light-gray);
    appearance: none; /* Hide default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236B7280%22%20d%3D%22M287%2069.9l-143.5%20143.6L0%2069.9z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px;
}

.add-item-btn {
    width: 40px;
    height: 40px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    font-size: 1.5em;
    line-height: 1;
}

/* Order Items List */
.order-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 15px;
}

.order-item-detail {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dotted var(--border-color);
    gap: 10px;
}

.order-item-detail:last-child {
    border-bottom: none;
}

.order-item-detail img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.order-item-detail .item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0; /* Allows name/price to compress */
}

.order-item-detail .item-name {
    font-weight: 600;
    color: var(--dark-text);
}

.order-item-detail .item-price {
    font-size: 0.85em;
    color: var(--light-text);
}

.item-quantity-control {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
}

.item-quantity-control button {
    background-color: var(--white);
    border: 1px solid transparent; /* Keep size consistent */
    border-radius: 6px;
    width: 28px;
    height: 28px;
    font-size: 1.1em;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    padding: 0;
}

.item-qty {
    font-weight: 600;
    padding: 0 8px;
    font-size: 0.9em;
}

/* Order Footer (Totals and Actions) */
.order-footer {
    flex-shrink: 0;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.totals-table {
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95em;
    padding: 5px 0;
    color: var(--dark-text);
}

.amount-display {
    font-weight: 500;
}

.discount-row {
    color: var(--red-alert);
}

.grand-total {
    font-weight: 700;
    font-size: 1.2em;
    padding-top: 8px;
    margin-top: 5px;
    border-top: 1px solid var(--border-color);
}

.total-amount {
    color: var(--primary-blue);
}

.promo-voucher {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.promo-voucher input {
    flex-grow: 1;
    background-color: var(--light-gray);
}

.gris-btn {
    background-color: var(--green-success);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
}

.place-order-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    transition: background-color 0.2s;
}

.place-order-btn:hover {
    background-color: #3b74d9;
}

/* --- Product Detail Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex; 
}

.modal-content {
    background-color: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 750px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.modal-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--dark-text);
}

.close-modal-btn {
    font-size: 1.8em;
    color: var(--light-text);
}

.detail-menu {
    display: flex;
    gap: 30px;
}

.detail-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 40%;
}

.detail-img {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 15px;
}

.detail-tag {
    background-color: var(--secondary-blue);
    color: var(--primary-blue);
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8em;
    margin-bottom: 10px;
}

.detail-price {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-blue);
}

.detail-right {
    flex: 2;
}

.detail-name {
    font-size: 1.8em;
    color: var(--dark-text);
    margin-bottom: 10px;
}

.detail-description {
    color: var(--light-text);
    margin-bottom: 20px;
    line-height: 1.5;
}

.notes-input {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    margin-bottom: 20px;
}

.detail-quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-qty-input {
    width: 60px;
    text-align: center;
    padding: 8px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.detail-quantity-control button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.5em;
    background-color: var(--light-gray);
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 700;
}


/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
    .order-summary-panel {
        min-width: 300px;
        max-width: 350px;
    }
    .menu-panel {
        max-width: calc(100% - 300px);
    }
}

@media (max-width: 900px) {
    /* Main Layout */
    .app-container {
        border-radius: 0;
        height: 100%;
        min-height: 100vh;
    }
    .pos-body {
        flex-direction: column; 
    }
    .menu-panel {
        max-width: 100%; /* Take full width */
        padding-bottom: 0;
    }

    /* Sidebar Mobile State */
    .sidebar {
        position: fixed;
        left: -250px; 
        z-index: 1000;
        height: 100vh;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
        transition: left 0.3s ease-in-out;
    }
    .sidebar.active {
        left: 0; 
    }
    .menu-toggle-btn {
        display: block; /* Show menu button */
    }
    .user-profile .close-btn {
        display: block; /* Show close button */
    }

    /* Order Summary Mobile State (Stacked at the bottom) */
    .order-summary-panel {
        min-width: 100%;
        max-width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding: 15px 20px;
    }
    .order-items-list {
        max-height: 30vh; /* Limit height to save screen space */
    }

    /* Modal Mobile Adjustments */
    .modal-content {
        max-width: 95%;
    }
    .detail-menu {
        flex-direction: column;
    }
    .detail-left {
        max-width: 100%;
        order: 1; /* Move price/tag below image */
        flex-direction: row;
        justify-content: space-between;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border-color);
    }
    .detail-img {
        max-width: 100%;
        height: auto;
        margin-bottom: 15px;
        order: 0;
    }
    .detail-right {
        order: 2;
    }
    .detail-tag, .detail-price {
        margin: 0;
    }
    .detail-price {
        font-size: 1.2em;
    }
}

@media (max-width: 600px) {
    .date-time {
        display: none; /* Hide date/time on smaller phones */
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        padding-right: 0;
    }
    .order-item {
        min-width: 120px;
    }
}


/* --- Activity Page Specific Styles --- */
.activity-page .topbar {
    /* Adjustments for the Activity page header */
    padding: 15px 30px;
}

.activity-page .page-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-text);
    margin-left: 15px; /* Space from the menu toggle button */
}

/* Activity Body Layout */
.activity-body {
    padding: 20px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Filters and Controls */
.activity-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 15px;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--light-text);
    border: 1px solid var(--border-color);
    background-color: var(--white);
    transition: all 0.2s;
}

.filter-btn:hover:not(.active) {
    background-color: var(--light-gray);
    color: var(--dark-text);
}

.filter-btn.active {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.actions {
    display: flex;
    gap: 10px;
}

.search-input {
    width: 250px;
    padding: 10px 15px;
    background-color: var(--white);
}

.add-table-btn {
    padding: 10px 15px;
    background-color: var(--green-success);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
}
.add-table-btn:hover {
    background-color: #0c9f6d;
}

/* Table Grid View */
.table-grid {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 15px; /* For scrollbar spacing */
    
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding-bottom: 20px;
}

.table-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.table-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Status specific borders and highlights */
.table-status-open {
    border-color: var(--primary-blue);
}
.table-status-occupied {
    border-color: var(--red-alert);
}
.table-status-reserved {
    border-color: orange;
}

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

.table-number {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-text);
}

.table-status {
    font-size: 0.85em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Color coding for status tags */
.table-status-open .table-status {
    background-color: var(--secondary-blue);
    color: var(--primary-blue);
}
.table-status-occupied .table-status {
    background-color: #FEE2E2; /* Light Red */
    color: var(--red-alert);
}
.table-status-available .table-status {
    background-color: #D1FAE5; /* Light Green */
    color: var(--green-success);
}
.table-status-reserved .table-status {
    background-color: #FFEDD5; /* Light Orange */
    color: orange;
}

.order-info {
    margin-bottom: 15px;
    flex-grow: 1;
}

.customer-name {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 3px;
}

.order-time {
    display: block;
    font-size: 0.85em;
    color: var(--light-text);
}

.order-summary {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.total-price {
    font-weight: 700;
    color: var(--primary-blue);
}

.action-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
    /* Default styling, will be overridden by status-specific styles below */
}

/* Available/New Order Button */
.table-status-available .new-order {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* Open/Occupied/Reserved Button */
.table-status-open .view-order,
.table-status-occupied .view-order,
.table-status-reserved .confirm-reserve {
    background-color: var(--light-gray);
    color: var(--dark-text);
    border: 1px solid var(--border-color);
}
.table-status-open .view-order:hover,
.table-status-occupied .view-order:hover,
.table-status-reserved .confirm-reserve:hover {
    background-color: var(--border-color);
}

/* --- Responsive Adjustments for Activity Page --- */
@media (max-width: 900px) {
    .activity-page .topbar {
        padding: 10px 15px;
    }
    .activity-page .page-title {
        font-size: 1.3em;
    }
    .activity-body {
        padding: 15px;
    }
    .activity-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .filters {
        order: 2; /* Move filters below search/actions for better flow */
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .filter-btn {
        flex-shrink: 0;
    }
    .actions {
        order: 1;
        width: 100%;
        margin-bottom: 10px;
    }
    .search-input {
        flex-grow: 1;
        width: auto;
    }
    .table-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding-right: 0;
    }
    .date-time {
        display: none; /* Hide date/time to save space in the header */
    }
}
@media (max-width: 600px) {
    .table-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}


/* --- Report Page Specific Styles --- */
.report-page .topbar {
    padding: 15px 30px;
    /* Reuse general topbar styles */
}

.report-page .page-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-text);
    margin-left: 15px; 
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range-selector .select-field {
    width: 150px;
    padding: 8px 15px;
    background-color: var(--white);
    /* Reuse select-field styling from POS page, ensuring appearance: none is set */
}

/* Report Body Layout */
.report-body {
    padding: 20px 30px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 1. Key Metric Cards */
.metric-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.metric-card {
    background-color: var(--white);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.metric-icon {
    font-size: 2em;
    padding: 10px;
    background-color: var(--light-gray);
    border-radius: 8px;
    flex-shrink: 0;
}

.metric-info {
    flex-grow: 1;
}

.metric-title {
    display: block;
    font-size: 0.9em;
    color: var(--light-text);
    margin-bottom: 3px;
}

.metric-value {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-text);
}

.metric-change {
    font-size: 0.85em;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    flex-shrink: 0;
}

.metric-change.positive {
    color: var(--green-success);
    background-color: #D1FAE5; /* Light Green */
}

.metric-change.negative {
    color: var(--red-alert);
    background-color: #FEE2E2; /* Light Red */
}

/* 2. Charts Section */
.charts-section {
    display: flex;
    gap: 25px;
    flex-wrap: wrap; /* Allows stacking on small screens */
}

.chart-box {
    background-color: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.sales-chart {
    flex: 3;
    min-width: 450px;
}

.top-items-chart {
    flex: 2;
    min-width: 300px;
}

.chart-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 15px;
}

.chart-placeholder {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--light-gray);
    border-radius: 8px;
    color: var(--light-text);
    font-size: 0.9em;
}

/* 3. Detailed Transactions Table */
.detailed-report-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 15px;
}

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    min-width: 700px; /* Ensure table is readable on smaller screens */
}

.transaction-table thead {
    background-color: var(--light-gray);
    font-size: 0.9em;
    color: var(--dark-text);
    text-align: left;
    font-weight: 600;
}

.transaction-table th,
.transaction-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.transaction-table tbody tr:last-child td {
    border-bottom: none;
}

.transaction-table tbody tr:hover {
    background-color: #f5f5f5;
}

.transaction-table td[data-label] {
    font-size: 0.9em;
    color: var(--light-text);
}

.transaction-table td:nth-child(5) {
    font-weight: 700;
    color: var(--primary-blue);
}

.status-complete {
    font-weight: 600;
    color: var(--green-success);
}

/* Mobile Table Adjustments (Making it stack/card-like) */
@media (max-width: 768px) {
    .transaction-table {
        min-width: 100%; /* Allows it to shrink/scroll */
        display: block;
        width: 100%;
    }
    .transaction-table thead {
        display: none; /* Hide header */
    }
    .transaction-table tbody,
    .transaction-table tr,
    .transaction-table td {
        display: block;
        width: 100%;
        text-align: right;
    }
    .transaction-table tr {
        margin-bottom: 10px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 10px;
    }
    .transaction-table td {
        padding: 5px 0;
        border: none;
        text-align: right;
        position: relative;
    }
    .transaction-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--dark-text);
    }
}

/* --- Responsive Adjustments for Report Page --- */
@media (max-width: 1000px) {
    .charts-section {
        flex-direction: column;
    }
    .sales-chart,
    .top-items-chart {
        min-width: 100%;
        flex: auto;
    }
}

@media (max-width: 600px) {
    .report-body {
        padding: 15px;
        gap: 15px;
    }
    .report-page .topbar {
        padding: 10px 15px;
    }
    .report-page .page-title {
        font-size: 1.3em;
    }
    .metric-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .metric-icon {
        margin-bottom: 5px;
    }
    .metric-info {
        width: 100%;
    }
    .metric-change {
        margin-top: 10px;
        align-self: flex-end;
    }
}

/* --- Inventory Page Specific Styles --- */
.inventory-page .topbar {
    padding: 15px 30px;
}

.inventory-page .page-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-text);
    margin-left: 15px; 
}

/* Inventory Body Layout */
.inventory-body {
    padding: 20px 30px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 1. Key Metric Cards (Reusing Report styles) */
/* The metric-cards-grid and metric-card styles are reused from the Report page, 
   but we ensure the content looks clean for inventory specific icons. */

.metric-card .metric-icon {
    /* Specific styling for inventory icons if needed, or rely on base style */
    font-size: 2em;
    padding: 10px;
    background-color: var(--secondary-blue); /* Different background for differentiation */
    color: var(--primary-blue);
    border-radius: 8px;
    flex-shrink: 0;
}

/* 2. Controls and Filters */
.inventory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.inventory-controls .filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.inventory-controls .select-field {
    width: 180px;
    padding: 8px 15px;
    background-color: var(--white);
}

.inventory-controls .actions {
    display: flex;
    gap: 10px;
}

.inventory-controls .search-input {
    width: 250px;
    padding: 10px 15px;
    background-color: var(--white);
}

.add-item-btn {
    padding: 10px 15px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
}

.receive-goods-btn {
    padding: 10px 15px;
    background-color: var(--green-success);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
}

/* 3. Detailed Inventory Table (Reusing and adapting Report table structure) */
.detailed-inventory-section {
    flex-grow: 1;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    min-width: 900px; /* Wider minimum width for more columns */
}

.inventory-table thead {
    background-color: var(--light-gray);
    font-size: 0.9em;
    color: var(--dark-text);
    text-align: left;
    font-weight: 600;
}

.inventory-table th,
.inventory-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.inventory-table td {
    font-size: 0.9em;
    color: var(--dark-text);
}

.inventory-table td[data-label] {
    color: var(--dark-text);
}

.inventory-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Stock Status Styling */
.status-in-stock {
    font-weight: 600;
    color: var(--green-success);
}
.status-low-stock {
    font-weight: 600;
    color: orange;
}
.status-out-of-stock {
    font-weight: 600;
    color: var(--red-alert);
}

/* Action Button in Table */
.action-edit {
    padding: 5px 10px;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--dark-text);
}
.action-edit:hover {
    background-color: var(--border-color);
}

/* --- Responsive Adjustments for Inventory Page --- */

@media (max-width: 1200px) {
    .inventory-controls .actions {
        /* Stack the buttons on slightly smaller screens */
        gap: 5px;
        flex-direction: column;
        align-items: stretch;
    }
    .inventory-controls .actions button,
    .inventory-controls .search-input {
        width: 100%;
    }
    .inventory-controls .filters {
        /* Ensure filters take full width above actions */
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 900px) {
    .inventory-body {
        padding: 15px;
    }
    .inventory-page .topbar {
        padding: 10px 15px;
    }
    .inventory-page .page-title {
        font-size: 1.3em;
    }
    .metric-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Mobile Table Adjustments (Making it stack/card-like) */
@media (max-width: 768px) {
    .inventory-table {
        min-width: 100%; 
        display: block;
        width: 100%;
    }
    .inventory-table thead {
        display: none; 
    }
    .inventory-table tbody,
    .inventory-table tr,
    .inventory-table td {
        display: block;
        width: 100%;
        text-align: right;
    }
    .inventory-table tr {
        margin-bottom: 10px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 10px;
    }
    .inventory-table td {
        padding: 5px 0;
        border: none;
        text-align: right;
        position: relative;
    }
    .inventory-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--dark-text);
    }
}

/* --- Teams Page Specific Styles --- */

.teams-page .topbar {
    padding: 15px 30px;
    /* Reuse general topbar styles */
}

.teams-page .page-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-text);
    margin-left: 15px; 
}

/* Teams Body Layout */
.teams-body {
    padding: 20px 30px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 1. Key Summary Cards (Reusing Metric Grid) */

.teams-body .metric-card .metric-icon {
    /* Different background for Teams icons */
    font-size: 2em;
    padding: 10px;
    background-color: #E0F2F1; /* Light Cyan/Teal */
    color: #00897B; /* Teal/Dark Cyan */
    border-radius: 8px;
    flex-shrink: 0;
}

/* 2. Controls and Filters */
.teams-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.teams-controls .filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.teams-controls .select-field {
    width: 180px;
    padding: 8px 15px;
    background-color: var(--white);
}

.teams-controls .actions {
    display: flex;
    gap: 10px;
}

.teams-controls .search-input {
    width: 250px;
    padding: 10px 15px;
    background-color: var(--white);
}

.add-employee-btn {
    padding: 10px 15px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
}

/* 3. Detailed Employee Table (Reusing and adapting Inventory table structure) */
.detailed-teams-section {
    flex-grow: 1;
}

.teams-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    min-width: 800px; /* Ensure table is readable */
}

.teams-table thead {
    background-color: var(--light-gray);
    font-size: 0.9em;
    color: var(--dark-text);
    text-align: left;
    font-weight: 600;
}

.teams-table th,
.teams-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.teams-table td {
    font-size: 0.9em;
    color: var(--dark-text);
}

.teams-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Employee Status Styling */
.status-active {
    font-weight: 600;
    color: var(--green-success);
}
.status-inactive {
    font-weight: 600;
    color: var(--red-alert);
}

/* Action Button in Table */
.action-edit {
    padding: 5px 10px;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--dark-text);
}
.action-edit:hover {
    background-color: var(--border-color);
}


/* --- Responsive Adjustments for Teams Page --- */

@media (max-width: 1000px) {
    .teams-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .teams-controls .filters {
        width: 100%;
        margin-bottom: 5px;
        justify-content: space-between;
    }
    .teams-controls .actions {
        width: 100%;
        gap: 10px;
    }
    .teams-controls .search-input {
        flex-grow: 1;
    }
}

@media (max-width: 600px) {
    .teams-body {
        padding: 15px;
    }
    .teams-page .topbar {
        padding: 10px 15px;
    }
    .metric-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .teams-controls .filters {
        /* Stack filters on smallest screens if necessary */
        flex-direction: column; 
    }
}

/* Mobile Table Adjustments (Making it stack/card-like) */
@media (max-width: 768px) {
    .teams-table {
        min-width: 100%; 
        display: block;
        width: 100%;
    }
    .teams-table thead {
        display: none; 
    }
    .teams-table tbody,
    .teams-table tr,
    .teams-table td {
        display: block;
        width: 100%;
        text-align: right;
    }
    .teams-table tr {
        margin-bottom: 10px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 10px;
    }
    .teams-table td {
        padding: 5px 0;
        border: none;
        text-align: right;
        position: relative;
    }
    .teams-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--dark-text);
    }
}


/* --- Settings Page Specific Styles --- */

.settings-page .topbar {
    padding: 15px 30px;
}

.settings-page .page-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-text);
    margin-left: 15px; 
}

/* Settings Body Layout */
.settings-body {
    padding: 20px 30px;
    flex-grow: 1;
    overflow: hidden; /* Contains children */
    
    display: flex;
    gap: 25px;
}

/* 1. Settings Sub-Navigation (Left Column) */
.settings-nav {
    flex: 0 0 220px; /* Fixed width */
    background-color: var(--white);
    padding: 15px 0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: fit-content; /* Only take up space needed by content */
}

.setting-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 500;
    color: var(--dark-text);
    transition: background-color 0.2s, color 0.2s;
}

.setting-nav-item i {
    font-size: 1.2em;
    margin-right: 10px;
    color: var(--light-text);
}

.setting-nav-item:hover {
    background-color: var(--light-gray);
}

.setting-nav-item.active {
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
}

.setting-nav-item.active i {
    color: var(--white);
}

/* 2. Settings Content Area (Right Column) */
.settings-content-area {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 15px; /* Space for scrollbar */
    max-width: calc(100% - 245px); /* Max width considering fixed left nav + gap */
}

.setting-section {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    /* Hidden by default, shown by JS */
    display: none; 
}
.setting-section.active {
    display: block;
}

.setting-section h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* Form Styling */
.setting-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 5px;
    font-size: 0.95em;
}

.setting-form input[type="text"],
.setting-form select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--light-gray);
    font-size: 1em;
}

/* Toggle Switch Group */
.toggle-group {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    grid-column: 1 / -1; /* Span across both columns */
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
}

/* The actual switch component */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--light-text);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-blue);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 28px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Item List Styling (e.g., Taxes, Devices) */
.setting-item-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.setting-item h4 {
    font-size: 1.1em;
    font-weight: 600;
    flex-grow: 1;
}

.setting-value {
    font-weight: 700;
    margin-right: 20px;
    color: var(--primary-blue);
}

.setting-value.status-connected {
    color: var(--green-success);
}
.setting-value.status-error {
    color: var(--red-alert);
}

.add-tax-btn, .add-device-btn {
    align-self: flex-start;
    padding: 10px 15px;
    background-color: var(--green-success);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    margin-top: 10px;
}

/* --- Responsive Adjustments for Settings Page --- */

@media (max-width: 900px) {
    .settings-body {
        flex-direction: column; /* Stack nav and content */
        padding: 15px;
        gap: 15px;
    }
    .settings-nav {
        flex: auto;
        width: 100%;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: none; /* Remove box shadow when stacked */
    }
    .setting-nav-item {
        flex-shrink: 0;
        padding: 10px 15px;
    }
    .settings-content-area {
        max-width: 100%;
        padding-right: 0;
        overflow-y: visible;
    }
    .setting-section {
        padding: 20px;
    }
    .setting-form {
        grid-template-columns: 1fr; /* Single column layout for forms */
    }
    .toggle-group {
        grid-column: 1 / 1; 
    }
    .setting-item {
        flex-wrap: wrap;
        gap: 5px;
    }
    .setting-item h4,
    .setting-value,
    .action-edit {
        flex-basis: 100%; /* Make elements stack inside the item */
        text-align: left;
    }
    .setting-value {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* --- Root Variables (assuming these are defined in a global file) ---
:root {
    --primary-blue: #007bff;
    --secondary-blue: #e0f0ff;
    --dark-text: #333;
    --light-text: #777;
    --border-color: #ddd;
    --white: #fff;
    --light-gray: #f9f9f9;
    --green-success: #28a745;
    --red-alert: #dc3545;
}
*/

/* --- General Full-Screen Container --- */
.shift-management-container {
    background-color: var(--light-gray);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
}

/* --- Header --- */
.shift-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shift-title {
    margin: 0;
    font-size: 1.8em;
}

.user-display {
    text-align: right;
    font-size: 0.9em;
}

.shift-user-name {
    display: block;
    font-weight: 600;
}
.shift-date {
    display: block;
    opacity: 0.8;
}

/* --- Main Content Layout --- */
.shift-content {
    flex-grow: 1;
    padding: 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.time-clock-section,
.cash-management-section,
.shift-history-section {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

/* Time Clock Styles */
.time-clock-section {
    grid-column: 1 / 2; /* Main column */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.clock-display {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 8px;
    width: 80%;
}

#current-time {
    font-size: 3em;
    font-weight: 700;
    color: var(--dark-text);
    display: block;
}

.punch-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.punch-btn {
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
    flex-grow: 1;
}

.clock-in-btn, .end-break-btn {
    background-color: var(--green-success);
    color: var(--white);
}
.clock-in-btn:hover, .end-break-btn:hover {
    background-color: #218838;
}

.clock-out-btn, .start-break-btn {
    background-color: var(--red-alert);
    color: var(--white);
}
.clock-out-btn:hover, .start-break-btn:hover {
    background-color: #c82333;
}

.punch-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--light-text);
}

.shift-status-message {
    padding: 10px;
    border-radius: 6px;
    background-color: var(--secondary-blue);
    color: var(--primary-blue);
    font-weight: 600;
}

/* Cash Management Styles */
.cash-management-section {
    grid-column: 2 / 3; /* Second column */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cash-summary-card {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: var(--light-gray);
}

.cash-metric {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    justify-content: space-between;
}
.cash-metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 0.9em;
    color: var(--light-text);
}

.metric-value {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-blue);
}

.cash-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.primary-action {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
}
.secondary-action {
    background-color: var(--white);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
}

/* Shift History Styles */
.shift-history-section {
    grid-column: 1 / 3; /* Spans both columns beneath the other sections */
}

.history-list {
    margin-top: 15px;
    font-size: 0.95em;
    max-height: 150px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted var(--border-color);
}
.history-item:last-child {
    border-bottom: none;
}

/* --- Footer --- */
.shift-footer {
    padding: 15px 40px;
    text-align: right;
    border-top: 1px solid var(--border-color);
    background-color: var(--white);
}

.back-to-pos-btn {
    padding: 10px 20px;
    background-color: var(--light-text);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .shift-header {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
    }
    .user-display {
        text-align: center;
        margin-top: 5px;
    }
    .shift-content {
        grid-template-columns: 1fr; /* Stack all sections */
        padding: 20px;
        gap: 20px;
    }
    .time-clock-section,
    .cash-management-section,
    .shift-history-section {
        grid-column: 1 / 2;
    }
    .punch-buttons {
        flex-wrap: wrap;
        width: 100%;
    }
    .punch-btn {
        flex-basis: calc(50% - 7.5px); /* Two buttons per row */
    }
    .clock-display {
        width: 100%;
    }
    .shift-footer {
        text-align: center;
    }
}


/* --- Customer Page Specific Styles --- */

.customer-page .topbar {
    padding: 15px 30px;
}

.customer-page .page-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-text);
    margin-left: 15px; 
}

/* Customer Body Layout */
.customer-body {
    padding: 20px 30px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 1. Key Metric Cards (Reusing Metric Grid) */

.customer-page .metric-card .metric-icon {
    /* Different background for Customer icons */
    font-size: 2em;
    padding: 10px;
    background-color: #E6E6FA; /* Light Lavender */
    color: #6A5ACD; /* Slate Blue/Purple */
    border-radius: 8px;
    flex-shrink: 0;
}

/* 2. Controls and Filters (Similar to Inventory/Teams) */
.customer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.customer-controls .filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.customer-controls .select-field {
    width: 180px;
    padding: 8px 15px;
    background-color: var(--white);
}

.customer-controls .actions {
    display: flex;
    gap: 10px;
}

.customer-controls .search-input {
    width: 250px;
    padding: 10px 15px;
    background-color: var(--white);
}

.add-customer-btn {
    padding: 10px 15px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
}

/* 3. Detailed Customer Table (Reusing Table Structure) */
.detailed-customer-section {
    flex-grow: 1;
}

.customer-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    min-width: 850px; 
}

.customer-table thead {
    background-color: var(--light-gray);
    font-size: 0.9em;
    color: var(--dark-text);
    text-align: left;
    font-weight: 600;
}

.customer-table th,
.customer-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.customer-table td {
    font-size: 0.9em;
    color: var(--dark-text);
}

.customer-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Tier/Points Styling */
.customer-table td[data-label="Tier"] {
    font-weight: 600;
    color: #6A5ACD; /* Purple for Loyalty */
}

.customer-table td[data-label="Points"] {
    font-weight: 700;
    color: var(--green-success);
}

.customer-table td[data-label="Total Spent"] {
    font-weight: 700;
}

/* Action Button in Table */
.action-view {
    padding: 5px 10px;
    background-color: var(--secondary-blue);
    border: 1px solid var(--primary-blue);
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--primary-blue);
}
.action-view:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* --- Responsive Adjustments for Customer Page --- */

@media (max-width: 1000px) {
    .customer-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .customer-controls .filters {
        width: 100%;
        margin-bottom: 5px;
        justify-content: space-between;
    }
    .customer-controls .actions {
        width: 100%;
        gap: 10px;
    }
    .customer-controls .search-input {
        flex-grow: 1;
    }
}

@media (max-width: 600px) {
    .customer-body {
        padding: 15px;
    }
    .customer-page .topbar {
        padding: 10px 15px;
    }
    .metric-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .customer-controls .filters {
        flex-direction: column; 
    }
}

/* Mobile Table Adjustments (Making it stack/card-like) */
@media (max-width: 768px) {
    .customer-table {
        min-width: 100%; 
        display: block;
        width: 100%;
    }
    .customer-table thead {
        display: none; 
    }
    .customer-table tbody,
    .customer-table tr,
    .customer-table td {
        display: block;
        width: 100%;
        text-align: right;
    }
    .customer-table tr {
        margin-bottom: 10px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 10px;
    }
    .customer-table td {
        padding: 5px 0;
        border: none;
        text-align: right;
        position: relative;
    }
    .customer-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--dark-text);
    }
}