﻿/* CSS Variables for a consistent color palette */
:root {
    --primary-color: #CC942D;
    --primary-dark: #A37926;
    --secondary-color: #5C6BC0; /* Example for a new button color */
    --light-bg: #f9f4ea;
    --text-dark: #333333;
    --text-light: #ffffff;
    --card-bg: #ffffff;
    --subtle-card-bg: #fcf9f5;
    --border-color: #e0e0e0;
    --input-border: #ccc;
}

body {
    background-color: var(--light-bg);
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}
/* Header Container */
.app-header {
    background-color: var(--primary-color); /* Uses the primary color from your theme */
    color: var(--text-light); /* Uses the light text color for contrast */
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Ensures the header stays at the top of the viewport on all pages */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0.5rem;
}

/* Flex container for logo and text */
.app-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Styling for the logo link */
.app-header-logo-link {
    display: flex; /* Makes the anchor tag a flex container */
    align-items: center;
    cursor: pointer;
}

/* Styling for the logo image */
.app-header-logo {
    height: 80px; /* Smaller, more appropriate size for a mobile header */
    width: 80px;
    border-radius: 50%; /* Gives the logo a circular shape */
    background-color: white; /* Optional: a subtle background for the logo */
    background-color: transparent;
    object-fit: contain;
}

/* Styling for the header text */
.app-header-text {
    font-size: 1.25rem; /* A good size for mobile headers */
    font-weight: bold;
    margin: 0;
    line-height: 1; /* Ensures text aligns properly with the logo */
}
.page-sub-header {
    position: relative;
    width: 100%;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
}
.page-sub-title {
    margin: 0;
    padding: 0;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
    box-sizing: border-box;
}

.header-back-button:hover {
    background-color: var(--primary-dark);
}

.header-back-button:active {
    transform: scale(0.94);
}
/* Main container for the app menu */
.app-menu-container {
    padding: 0.8rem 0.9rem;
    max-width: 1500px; /* Constrain width for a clean look on large screens */
    margin: auto;
}
.page-container {
    padding: 5px;
    max-width: 1200px;
    margin: auto;
}

/* Main card that holds the menu items */
.main-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem 1rem;
    margin-top: 1rem;
    position: relative;
}

/* Consistent title styling */
.page-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 1.5rem;
}
/* Executive App Menus User profile*/
/* User Profile Section */
.profile-section {
    text-align: center;
    position: relative;
    margin-top: -36px; /* Pulls the profile section up to overlap the top */
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--card-bg); /* White border to separate from background */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.profile-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0;
}
/* Button styling  for Executive App Load Data*/
.load-data-button {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.load-data-button:hover {
    background-color: var(--primary-dark);
}

.load-data-button i {
    margin-right: 0.5rem;
}
/* Back button as part of the page header */
/* Circular back button */
/* Back button */
.header-back-button {
    position: absolute;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    margin: 12px -4px;
    border: none;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
/*.header-back-button {
    background-color: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    padding: 0.5rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    cursor: pointer;
}*/

/* Grid for menu items */
.menu-grid {
    display: grid;
     grid-template-columns: 1fr 1fr; 
    gap: 1.5rem;
    text-align: center;
}

/* Styling for each individual menu item card */
.menu-item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background-color: var(--light-bg);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

    /* Interactive state for menu items */
    .menu-item-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    }

    /* Anchor link styling inside the card */
    .menu-item-card a {
        text-decoration: none;
        color: var(--text-dark);
    }

.menu-item-icon {
    width: 100px;
    height: 100px;
    object-fit: fill;
    margin-bottom: 0.5rem;
}

.menu-item-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
}

/* The horizontal rule line */
.menu-separator {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 1.5rem 0;
}
/*for stock for item group stock status*/
/* New, robust layout for the search group. This uses CSS Grid to define two distinct columns.
The first column holds the label and input, and the second holds the button. */

.stock-search-group {
    display: grid;
    grid-template-columns: 1fr auto; /* One flexible column and one auto-sized column for the button */
    gap: 0.5rem;
    align-items: end; /* Vertically aligns the button with the bottom of the input */
    margin-bottom: 1rem;
}

/* Container for the label and input */
.stock-input-field {
    display: flex;
    flex-direction: column; /* This forces the label to be above the input */
    gap: 0.25rem;
}

/* Standard styling for the label */
.stock-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-dark);
}

/* Standard styling for the input */
.stock-input {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background-color: #fafafa;
}

/* Standard styling for the button */
.stock-button {
    background-color: var(--primary-color);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

.stock-button:hover {
    background-color: var(--primary-dark);
}

.stock-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 6px;
}
.card-display {
    text-align: center;
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 1rem;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.autocomplete-dropdown {
    /* position: absolute; */
    /* top: 100%; */
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

    .autocomplete-dropdown strong {
        color: #d32f2f;
    }

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
}

    .autocomplete-item:hover {
        background-color: #f1f1f1;
    }
.validation-message {
    color: red;
    margin-top: 5px;
    font-size: 14px;
}
/* Card image and rate display area */
.card-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 6px;
}

.card-rate-text {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin-top: 1rem;
}
.receipt-list-container {
    padding: 1rem;
    max-width: 500px;
    margin: auto;
}

.summary-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    /* margin-bottom: 0.5rem; */
    position: relative;
}
/* receipt card layout */
.receipt-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: auto;
    height: calc(100vh - 340px); /* Adjust height for mobile viewport */
}
.receipt-card {
    /* background-color: var(--card-bg); */
    background-color: var(--light-bg);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
    .receipt-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }

.receipt-card-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.25rem;
    margin-bottom: 0.5rem;
    width: 100%; /* Ensure full width */
    flex-wrap: nowrap; /* Prevent wrapping */
}
.receipt-number-text {
    font-size: 1.1rem;
    /* font-weight: bold; */
    color: var(--text-muted);
}

.receipt-number-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.receipt-date-text {
    font-size: 1rem;
    color: var(--text-muted);
}

.receipt-date-value {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.receipt-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.receipt-amount-label {
    font-size: 1.2rem;
    /* font-weight: 500; */
    font-weight: bold;
    color: var(--text-muted);
}

.receipt-amount-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.receipt-description-label {
    font-size: 1.1rem;
    /* font-weight: bold; */
    color: var(--text-muted);
}

.receipt-description-text {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-dark);
}
.detail-button {
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: var(--button-shadow);
}

    .detail-button:hover {
        background-color: var(--primary-dark);
    }

.total-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem;
    background-color: var(--primary-color);
    color: var(--text-light);
    font-weight: bold;
    border-radius: 8px;
    /* margin-top: 0.5rem; */
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
}
.section-divider {
    border: 0;
    border-top: 2px solid rgba(142, 103, 31, 0.20);
    margin: 1rem 0;
}
.transaction-menu-arrow {
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 8px;
    font-size: 14px;
    color: #aaaaaa;
}