* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Define harmonious color palette using CSS variables */
:root {
  --primary-color: #4a90e2; /* Blue shade */
  --secondary-color: #50e3c2; /* Teal shade */
  --background-color: #f5f7fa; /* Light gray */
  --text-color: #4a4a4a; /* Dark gray */
  --white-color: #ffffff; /* Pure white */
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  /* font-family: Tahoma, Geneva, Verdana, sans-serif; */
  font-family: "Poppins", Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
}
.page-content-wrapper { /* Add a div around everything inside body */
  height: 100%;
  overflow-y: auto; /* This div handles the main page scroll */
  overflow-x: hidden;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Make sure body takes full height */
  margin: 0;
}
#mainWrapper{
  position: relative;
  width: 100vw;
  top: 9px;
}
.wrapper-selected{
  position: relative;
  top: 0px;
  height: 100vh;
}
/* Base body styles */
.main {
  z-index: 2;
  background-color: white;
  /* display: none; */
  height: 100vh;
  width: 100vw;
  display: flex;
  /* overflow: hidden; */
}
.bgopacity {
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  inset: 0;
  z-index: 2;
  visibility: hidden;
  display: none;
}
.bgopacityEnabled {
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  inset: 0;
  z-index: 4;
  visibility: visible;
  display: block;
}
#loadingSymbol {
  position: absolute;
  top: 50%;
  z-index: 5;
}
/* #loadingSymbolActive {
  position: absolute;
  top: 50%;
  z-index: 10;
} */
/* Clearing floats */
/* .cf:before,
.cf:after {
  content: " ";
  display: table;
}

.cf:after {
  clear: both;
}

.cf {
  *zoom: 1;
} */

.menu-wrap {
  position: fixed;
  top: 0px;
  left: 0;
  height: 50px;
  width: 100%;
  background: #34495e;
  z-index: 20;
}
.menu-items {
  position: relative;
  margin-left: 160px;
}
.logo {
  /* background: url(images/logo.png); */
  width: 100px;
  height: 50px;
  z-index: 30;
  float: left;
  position: relative;
  padding-left: 10px;
}
.logo img {
  height: 40px;
  z-index: 30;
  position: relative;
  padding-top: 5px;
  top: 2px;
}

/* Mini reset, no margins, paddings or bullets */
.menu,
.submenu {
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 20;
  /* height: 50px; */
}

/* Main level */
.menu {
  position: fixed;
  width: 1200px;
  /* height: 50px; */
  z-index: 20;
  top: 0;
}

.menu-item {
  background: #34495e;
  float: left;
  position: relative;
  width: 120px;
  height: 50px;
  z-index: 20;
  color: white;
  display: block;
  color: #fff;
  text-decoration: none;
  font-family: Arial, Helvetica;
  font-size: 12px;
  text-align: center;
  z-index: 20;
  padding: 18px 2px;
  cursor: pointer;
}
/* .menu-item {
  background: #34495e;
  float: left;
  position: relative;
  width: 120px;
  height: 50px;
  z-index: 20;
  color: white;
  display: block;
  color: #fff;
  text-decoration: none;
  font-family: Arial, Helvetica;
  font-size: 12px;
  text-align: center;
  z-index: 20;
  padding: 18px 2px;
  cursor: pointer;
}*/
.menu-item-selected {
  background: #46627d;
  float: left;
  position: relative;
  width: 120px;
  height: 50px;
  z-index: 20;
  color: white;
  display: block;
  color: #fff;
  text-decoration: none;
  font-family: Arial, Helvetica;
  font-size: 12px;
  text-align: center;
  z-index: 20;
  padding: 18px 2px;
  cursor: pointer;
}
.menu a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-family: Arial, Helvetica;
  font-size: 12px;
  text-align: center;
  z-index: 20;
  /* padding: 10px; */
}

.menu li:hover {
  background: #46627d;
  z-index: 20;
  color: white;
}

.menu > li:hover > a {
  z-index: 20;
  color: white;
}

/* Dropdown */
.submenu {
  position: fixed;
  width: 120px;
  top: 50px;
  /* transform: skewX(-25deg); */
  /* transform-origin: left top; */
  z-index: 20;
}

.submenu li {
  background-color: #34495e;
  position: relative;
  overflow: hidden;
  z-index: 20;
}

.submenu > li > a {
  z-index: 20;
  padding: 1em 1em;
  text-align: left;
}
.submenu > li:hover > a {
  padding: 1em 2em;
  z-index: 20;
  color: white;
}

.submenu > li::after {
  content: "";
  position: absolute;
  top: -50px;
  height: 100%;
  width: 100%;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  z-index: 20;
}

/* Show dropdown */
.submenu,
.submenu li {
  opacity: 0;
  visibility: hidden;
  z-index: 20;
  width: fit-content;
  min-width: 120px;
}

.submenu li {
  transition: 0.2s ease transform;
  z-index: 20;
}

.menu > li:hover .submenu,
.menu > li:hover .submenu li {
  opacity: 1;
  visibility: visible;
  z-index: 20;
  color: white;
}

.page-title {
  position: absolute;
  margin-top: 68px;
  left: 15px;
  font-size: 25px;
}

.viewrow {
  cursor: pointer;
}

.colHeader {
  width: 200px;
  display: flex;
  text-align: right;
}
.table-bordered.card {
  border: 0 !important;
}
.card {
  width: 800px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.card thead {
  display: none;
}
.card tbody tr {
  float: left;
  width: 25em;
  margin: 0.5em;
  border: 1px solid #bfbfbf;
  border-radius: 0.5em;
  background-color: transparent !important;
  box-shadow: 0.25rem 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
}
.card tbody tr td {
  display: block;
  border: 0;
}

p {
  text-align: left;
  /* color: limegreen; */
  font-size: 14px;
  font-weight: bold;
  /* text-shadow: 1px 1px 2px #000; */
  margin-top: 10px !important;
  margin-bottom: 0px !important;
  /* border-top: 1px solid; */
  /* margin-top: 8px; */
  /* padding-top: 6px; */
  padding-bottom: 7px;
  color: white;
}
.footer{
  height: 40px;
  width: 100%;
  background: #343957;
  padding: 5px;
  bottom: 0px;
  position: absolute;
}
/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

/* Popup Container */
.popup-container {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#user-form-overlay {
    align-items: center;
    padding: 2rem 0;
}

#user-form-overlay .popup-container {
    width: min(540px, 92vw);
    max-height: 90vh;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.45);
    overflow: hidden;
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 35%, #fdfdfd 100%);
}

#user-form-overlay .popup-title-bar {
    padding: 18px 24px;
    border-bottom: none;
    background: linear-gradient(135deg, #1f2a63, #4058d6);
    color: #fff;
}

#user-form-overlay .popup-title-bar h4 {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: 0.05rem;
}

#user-form-overlay .productClose i {
    color: #fff;
}

#user-form-overlay form {
    padding: 1.5rem 1.75rem 1rem;
    background: transparent;
    gap: 0.75rem;
}

#user-form-overlay form input,
#user-form-overlay form select,
#user-form-overlay form textarea {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    background: #fff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

#user-form-overlay form input:focus,
#user-form-overlay form select:focus,
#user-form-overlay form textarea:focus {
    border-color: #4058d6;
    box-shadow: 0 0 0 3px rgba(64, 88, 214, 0.18);
    outline: none;
}

#user-form-overlay .popup-add-btn {
    border-radius: 999px;
    padding: 0.5rem 1.4rem;
    background: radial-gradient(circle, #5b7ef6 0%, #4058d6 100%);
    border: none;
    color: #fff;
    box-shadow: 0 10px 20px rgba(64, 88, 214, 0.35);
    transition: transform 0.2s ease;
}

#user-form-overlay .popup-add-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

#user-form-overlay label {
    color: #252f4a;
}

#user-form-overlay form small {
    color: #5b6174;
}

#user-form-overlay form p {
    margin: 0;
}

#role-form-overlay {
    align-items: center;
    padding: 2rem 0;
}

#role-form-overlay .popup-container {
    width: min(540px, 92vw);
    max-height: 90vh;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.45);
    overflow: hidden;
    background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 40%, #fbfbff 100%);
}

#role-form-overlay .popup-title-bar {
    padding: 18px 24px;
    border-bottom: none;
    background: linear-gradient(135deg, #1f2a63, #4058d6);
    color: #fff;
}

#role-form-overlay .popup-title-bar h4 {
    margin: 0;
    font-size: 1.25rem;
}

#role-form-overlay form {
    padding: 1.5rem 1.75rem 1rem;
    background: transparent;
    gap: 0.75rem;
}

#role-form-overlay form textarea {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    min-height: 68px;
    background: #fff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

#role-form-overlay .permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.4rem;
}

#role-form-overlay .permission-grid div {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#role-form-overlay .permission-grid label {
    margin: 0;
    font-weight: 500;
}

.popup-action-buttons button {
    margin-right: 0.35rem;
}

.popup-action-buttons button:last-child {
    margin-right: 0;
}

/* Title Bar */
.popup-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #dee2e6;
    background-color: #343956;
    color: white;
}
.popup-title-bar h3 {
    margin: 0;
    font-size: 1.25rem;
}
.popup-close-btn {
    background: #fff;
    border: none;
    color: #dc3545;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}
.popup-close-btn:hover {
    background: #dc3545;
    color: #fff;
    box-shadow: 0 8px 18px rgba(220, 53, 69, 0.35);
}
/* Content Area */
.popup-content {
    padding: 20px;
    overflow-y: auto;
}

/* Controls above the table */
.popup-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.popup-right-controls {
    display: flex;
    gap: 10px;
}
.popup-add-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* Table */
.popup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.popup-table th, .popup-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.popup-table thead {
    background-color: #f2f2f2;
}

/* Footer */
.popup-footer {
    margin-top: 15px;
    font-size: 0.8em;
    color: #6c757d;
}

/* Add Warehouse Form */
.form-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 15px;
    align-items: center;
}
.popup-form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Google Map Search Input */
.map-search-input {
    margin: 10px;
    padding: 5px;
    width: 300px;
    font-size: 14px;
    border: 1px solid #ccc;
}

/* Planogram Templates Status Styling */
.status-compliant {
    color: #28a745;
    font-weight: bold;
}

.status-non-compliant {
    color: #dc3545;
    font-weight: bold;
}
