/* Color Palette:
   Primary Dark: #212529 (Near Black)
   Accent Blue: #007bff 
   Secondary Green: #28a745 
   Background: #f0f3f6 (Very Light Gray-Blue)
   Card/Content: #ffffff 
*/

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f3f6; /* Lighter, cleaner background */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #212529; /* Dark, high-contrast header */
    color: white;
    padding: 25px 20px;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.logo-box {
    background-color: #007bff; /* Accent color for the logo box */
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.5em;
    margin-right: 15px;
    letter-spacing: 1px;
}

header h1 {
    font-weight: 600;
    margin: 0;
    font-size: 1.8em;
    letter-spacing: 2px;
}

header p {
    margin: 0 0 0 95px; /* Align subtitle under the main title */
    font-weight: 300;
    font-size: 0.9em;
    color: #bbb;
}

main {
    display: flex;
    flex: 1;
    max-width: 1300px;
    margin: 40px auto; /* More margin */
    padding: 0 20px;
    gap: 40px; /* More space between nav and content */
}

/* --- Navigation Sidebar --- */
#main-menu {
    width: 280px;
    padding: 30px 25px; /* Increased padding */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); /* Deeper shadow */
    height: fit-content;
}

#main-menu h2 {
    color: #212529; /* Darker header for contrast */
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
    margin-top: 0;
    font-weight: 700;
    font-size: 1.3em;
}

#main-menu button {
    display: block;
    width: 100%;
    padding: 14px 18px; /* Larger buttons */
    margin-bottom: 12px;
    background-color: #e9ecef; /* Lighter inactive button */
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    text-align: left;
    transition: background-color 0.2s, color 0.2s;
}

#main-menu button:hover {
    background-color: #007bff;
    color: white;
}

.exit-button {
    background-color: #6c757d !important;
    color: white !important;
    margin-top: 25px;
}
.exit-button:hover {
    background-color: #495057 !important;
}

/* --- Content Area & Cards --- */
#content-area {
    flex-grow: 1;
    min-height: 500px;
}

.content-section {
    display: none; 
}

.content-section.active {
    display: block;
}

.card {
    padding: 35px; /* Increased card padding */
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

h3 {
    color: #212529;
    padding-bottom: 10px;
    margin-top: 0;
    font-weight: 700;
    font-size: 1.6em;
}

/* Forms */
form {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    margin-bottom: 30px; 
    max-width: 750px;
    padding: 20px;
    border: 1px dashed #ced4da; /* Subtle border */
    border-radius: 10px;
}

label {
    align-self: center;
    font-weight: 600;
    color: #555;
}

input[type="text"], 
input[type="number"] {
    padding: 14px; /* Larger input fields */
    border: 1px solid #ced4da;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

form button {
    grid-column: 2 / 3;
    padding: 15px 20px; /* Larger button */
    font-size: 17px;
}

/* Colors for specific buttons */
form button[type="submit"] { background-color: #28a745; }
form button[type="submit"]:hover { background-color: #218838; }

.update-button { background-color: #ffc107; color: #333; }
.update-button:hover { background-color: #e0a800; }
.delete-button { background-color: #dc3545; }
.delete-button:hover { background-color: #c82333; }
.search-button { background-color: #17a2b8; }
.search-button:hover { background-color: #138496; }

/* --- Tables --- */
#inventory-table th {
    background-color: #007bff;
}

#inventory-table tbody tr:hover {
    background-color: #e9f5ff;
}

/* --- Status and Results --- */
.status-message {
    padding: 15px; 
    font-size: 1.1em;
}

.value-display {
    padding: 50px 20px; /* Increased vertical padding */
}

.tip-box {
    background-color: #f7f9fc; 
    border-left: 5px solid #007bff; 
    border: 1px solid #c9dfff;
    color: #0056b3;
}

footer {
    text-align: center;
    padding: 15px;
    background-color: #212529; /* Dark footer */
    color: #bbb;
}