/* ==========================================================
 * BASE STYLES & LAYOUT
 * ========================================================== */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
table.report-table { 
    border-collapse: collapse; /* removes double borders */
} 
table.report-table td, table.report-table th 
{ 
    padding: 4px 6px; /*
    smaller padding */ 
    line-height: 1.2; /* reduces row height */ 
}

.logo img {
  height: 50px;
  width: auto;
}

.loon {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.c,
.items {
  display: flex;
  gap: 20px;
  margin-bottom: 5px;
}

.items .item {
  font-weight: 500;
  padding: 5px 10px;
  transition: color 0.3s, border-bottom 0.3s;
  text-decoration: none;
  color: black;
  font-weight: bold;
}

.items .item:hover {
  color: #007bff;
  border-bottom: 2px solid #007bff;
}

.c .item {
  font-size: 0.9em;
  color: #555;
  font-weight: bold;
}

#loginContainer {
  position: fixed;               /* stay full-screen */
  top: -100px;
  left: 0;
  width: 100%;
  height: 100vh;                 /* full viewport height */
  
  background-image: url('main1/cus/pic.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
  display: flex;                 /* center the login box content */
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Optional: Add a translucent overlay for better text visibility */
#loginContainer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

#loginContainer * {
  position: relative;
  z-index: 1; /* keep text above overlay */
}

/* Style the login box elements */
#loginContainer input,
#loginContainer button {
  width: 250px;
  padding: 10px;
  margin: 8px 0;
  border: none;
  border-radius: 5px;
  text-align: center;
  justify-content: center;
}

#loginContainer button {
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

#loginContainer button:hover {
  background-color: #0056b3;
}


body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* Light background for the page */
    color: #333;
}

h1, h2, h3 {
    color: #2c3e50; /* Darker heading color */
}

/* Horizontal Rule Styling */
hr {
    border: 0;
    height: 1px;
    background-color: #bdc3c7;
    margin: 30px 0;
}

/* ==========================================================
 * LOGIN PAGE STYLES
 * Targeting the .login-container and #loginContainer ID
 * ========================================================== */

.login-container {
    width: 350px;
    margin: 100px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 25px;
    color: #3498db;
    font-size: 40px;
}

.login-container input[type="text"],
.login-container input[type="password"],
.brandIdInput {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; 
}

.login-container button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    width: 100%;
}

.login-container button:hover {
    background-color: #2980b9;
}

/* ==========================================================
 * DASHBOARD STYLES
 * Targeting the .dashboard class
 * ========================================================== */

.dashboard {
    max-width: 1300px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ecf0f1;
    border-radius: 8px;

}

/* Header Section */
.head {
    text-align: center;
    padding: 15px;
    background-color: #34495e;
    color: rgb(0, 0, 0);
    border-radius: 6px;
    margin-bottom: 20px;
}

.head h2 {
    color: rgb(0, 0, 0);
    margin: 0;
    font-size: 1.8em;
}

/* Graph Section */
.graph {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* Report Sections (General) */
.dashboard section {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard section h2 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Input/Filter Styling */
.dashboard label {
    margin-right: 20px;
    font-weight: bold;
    color: #7f8c8d;
}

.dashboard input[type="date"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
}

/* Apply Filter Buttons (similar to login button, but smaller) */
.dashboard button:not(.logout button) {
    background-color: #1abc9c; /* Green color for filter/action buttons */
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dashboard button:not(.logout button):hover {
    background-color: #16a085;
}

/* Report Table Containers (for better visibility) */
#category-report-table,
#subcategory-report-table,
#item-report-table,
#sales-category-report-table,
#sales-subcategory-report-table,
#sales-item-report-table,
#closing-report-table {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    min-height: 50px; /* Ensure space even when empty */
    overflow-x: auto; /* Allows horizontal scrolling for large tables */
}

/* Logout Section */
.logout {
    text-align: right;
    background-color: transparent !important; /* Override section background */
    box-shadow: none !important;
}

.logout button {
    background-color: #e74c3c; /* Red color for danger/logout action */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.logout button:hover {
    background-color: #c0392b;
}

.master-report-selector {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dropdown-menu {
    position: relative;
    display: inline-block;
}

/* The primary button */
.master-dropdown-btn {
    background-color: #3498db; /* Primary color */
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    min-width: 250px;
    text-align: left;
    transition: background-color 0.3s;
}

.master-dropdown-btn:hover {
    background-color: #2980b9;
}

/* The actual dropdown content */
.dropdown-content {
    display: none; /* Initially hidden */
    position: absolute;
    background-color: #f9f9f9;
    min-width: 300px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10; /* Ensure it floats above other content */
    border-radius: 4px;
    margin-top: 5px;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.1s;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown-content a.grpo {
    border-left: 3px solid #3498db; /* GRPO indicator */
}

.dropdown-content a.sales {
    border-left: 3px solid #1abc9c; /* Sales indicator */
}

.divider {
    height: 1px;
    background-color: #ccc;
    margin: 5px 0;
}

/* Styling for the report output containers */
.report-output-container {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
}
/* Must be added to style.css */
.dropdown-content.show {
    display: block;
}
/* ==========================================================
 * LOGOUT STYLES
 * ========================================================== */

/* The section container: pushes the content to the right */
.logout {
    text-align: right;
    padding: 10px 0; /* Add a little vertical space */
    margin-top: 30px; /* Separates it clearly from the reports above */
    
    /* Ensure the section doesn't inherit background/shadow from generic sections */
    background-color: transparent !important; 
    box-shadow: none !important;
}

/* The actual button styling */
.logout button {
    /* Color: Use red/danger color to signify ending the session */
    background-color: #e74c3c; 
    color: white;
    
    /* Size and shape */
    padding: 10px 20px;
    border: none;
    border-radius: 6px; /* Slightly rounded corners */
    
    /* Text and interactivity */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s; /* Smooth transition */
}

/* Hover state: Makes the button darker when the mouse is over it */
.logout button:hover {
    background-color: #c0392b; /* Darker red on hover */
}

/* Active state: Provides physical feedback when clicked */
.logout button:active {
    transform: translateY(1px); /* Moves the button down slightly */
}

/* Password eye button */
.password-comtainer{
    position: relative;
    width: 300px;
}
.password-toggle-icon{
    position: relative;
    right: 10px;
    top: 50%;
    transform: translate(-50%);
    cursor: pointer;
    color: #888;
}


table.report-table {
  border-collapse: collapse;
}

table.report-table td, table.report-table th {
  padding: 4px 6px;   /* smaller padding */
  line-height: 1.2;   /* reduces row height */
}
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f172a; /* Dark slate */
  z-index: 10000;
  display: none; 
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease;
}

.welcome-text {
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  font-family: sans-serif;
}

.welcome-line {
  height: 4px;
  background: #f59e0b; /* Amber gold */
  border-radius: 10px;
  /* Animation: name | duration | timing | iteration */
  animation: pulseLoading 1.5s ease-in-out infinite;
}

@keyframes pulseLoading {
  0% {
    width: 20px;
    opacity: 0.4;
  }
  50% {
    width: 250px;
    opacity: 1;
  }
  100% {
    width: 20px;
    opacity: 0.4;
  }
}

.overlay-exit {
  opacity: 0;
  pointer-events: none;
}