:root {
  --primary-blue: #0078d7;
  --medium-blue: #005a9e;
  --light-blue: #e6f3ff;
  --neu-bg: #e8ecf3;
  --neu-shadow-dark: #d1d9e6;
  --neu-shadow-light: #ffffff;
}

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--neu-bg);
}

.app-container {
  display: flex;
  /* height: 100vh; */
  overflow: hidden;
}

.main-content-wrapper {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 8px solid var(--primary-blue);
  height: calc(100vh - 0px);
  overflow-y: auto;
  padding: 2px;
}

.main-content {
flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

/* Header & Navigation Bar */
.top-header {
  background: linear-gradient(135deg, var(--primary-blue), var(--medium-blue));
  color: white;
  padding: 8px 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-icons-container {
  background: white;
  border-bottom: 2px solid #e0e0e0;
  padding: 5px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 0 15px;
}

.nav-icon-wrapper {
  position: relative;
}

.nav-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 8px;
  min-width: 64px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
  background-color: var(--primary-blue);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 120, 215, 0.2);
}

.nav-icon-item:hover {
  background-color: var(--medium-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 120, 215, 0.4);
}

.nav-icon-item i {
  font-size: 24px;
  color: white;
  margin-bottom: 4px;
}

.nav-icon-item span {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid #ddd;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1000;
  border-radius: 8px;
  min-width: 150px;
}

.nav-icon-wrapper:hover .dropdown-menu {
  display: block;
  animation: slideDown 0.3s ease;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.dropdown-menu a:hover {
  background-color: var(--light-blue);
  color: var(--primary-blue);
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

/* Input Form Section */
.form-section {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 8px;
  margin-bottom: 6px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 84px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 2px;
}

.form-group input {
  width: 84px;
  height: 35px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 15px;
  outline-color: var(--primary-blue) !important;
}

.form-group.wide input {
  width: 150px;
}

.form-group.item-name-group input {
  width: 250px;
}

/* Pagination & Search */
.pagination-controls {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-controls button {
  padding: 4px 10px;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.pagination-controls button:hover {
  background-color: var(--medium-blue);
}

.search-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-section input {
  width: 200px;
  height: 32px;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
}

/* Neumorphism Table Styles */
.table-container {
  background: var(--neu-bg);
  border-radius: 12px;
  padding: 12px;
  /* margin-top: 15px; */
  box-shadow: inset 5px 5px 10px var(--neu-shadow-dark), inset -5px -5px 10px var(--neu-shadow-light);
  overflow-x: auto;
}

table {
  width: 100%;
  border-spacing: 2px;
  font-size: 13px;
  background: transparent;
}

th {
  background: var(--primary-blue);
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 8px !important;
  text-align: center;
  border: 1px solid black;
  /* border-radius: 6px; */
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
}

td {
  padding: 4px;
  text-align: center;
  border: 1px solid black;
  background: var(--neu-bg);
  color: #333;
  /* border-radius: 6px; */
  box-shadow: 3px 3px 6px var(--neu-shadow-dark), -3px -3px 6px var(--neu-shadow-light);
  font-weight: 600;
  transition: all 0.3s ease;
}

tbody tr:hover td {
  background: #f0f4f9;
  box-shadow: inset 2px 2px 4px var(--neu-shadow-dark), inset -2px -2px 4px var(--neu-shadow-light);
}

.selected-row td {
  background: #87bbff !important;
  color: black !important;
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.3), 3px 3px 6px var(--neu-shadow-dark) !important;
}

/* Alternating row effects */
tbody tr:nth-child(even) td {
  background-color: lightcyan;
}

tbody tr:nth-child(odd) td {
  background-color: #f8f9fa;
}

/* Sidebar Buttons */
.sidebar {
  width: 100px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 2px;
  gap: 5px;
}

.sidebar-button {
  width: 100%;
  padding: 4px 8px;
  border: none;
  background: white;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 6px;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), -4px -4px 8px #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-button:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.2), -6px -6px 12px #fff;
}

.sidebar-button:active {
  transform: translateY(0);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2), inset -2px -2px 5px #fff;
}

/* Sidebar Button Icons */
.sidebar-button span {
  font-size: 12px;
}
.sidebar-button::before {
  content: "";
  font-size: 20px;
}

.sidebar-button[onclick="updateRow()"]::before {
  content: "🔄";
}
.sidebar-button[onclick="saveNewProduct()"]::before {
  content: "💾";
}
.sidebar-button[onclick="deleteRow()"]::before {
  content: "🗑️";
}
.sidebar-button[onclick="findProduct()"]::before {
  content: "🔍";
}
.sidebar-button[onclick="refreshTable()"]::before {
  content: "🔃";
}
.sidebar-button[onclick="closeForm()"]::before {
  content: "❌";
}

/* Responsive Table */
@media screen and (max-width: 767px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
  }
  td {
    border: none !important;
    position: relative;
    padding-left: 50% !important;
    text-align: right !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  td::before {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: calc(50% - 20px);
    padding-right: 10px;
    text-align: left;
    font-weight: bold;
    color: var(--primary-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-group, .form-group.wide, .form-group.item-name-group {
    min-width: 100%;
  }
  .form-group input, .form-group.wide input, .form-group.item-name-group input {
    width: 100%;
  }
}

/* Typeahead Styling */
.typeahead {
    background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="100" viewBox="0 0 24 24" width="100" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 6px center !important;
    background-size: 12px 12px !important;
    padding-right: 24px !important;
    cursor: pointer !important;
}

.typeahead:focus {
    background-color: #e6ffe6;
    border-color: #28a745;
}

.typeahead-wrapper {
    position: relative;
    display: inline-block;
}

.tt-menu {
    /* width: calc(100% + 1px);  */
    width: 250px;
    max-height: 250px; /* लिस्ट की अधिकतम ऊंचाई */
    overflow-y: auto;
    background-color: lightcyan; /* बैकग्राउंड सफेद */
    border-radius: 0px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* अच्छा गहरा शैडो */
margin-top: -6px;
    /* पोजीशनिंग */
    position: absolute;
    top: 100%; /* इनपुट के ठीक नीचे */
    left: 0;
    z-index: 9999; 
    padding: 0; /* अंदर कोई अनावश्यक पैडिंग नहीं */
  
    transition: none !important;
    /* Vertical scrollbar ko automatic dikhane ke liye */
    overflow-y: auto; 
    
    /* Horizontal scrollbar ko hide rakhein */
    overflow-x: hidden; 
        visibility: visible;

}
/* Focus hone par menu ko force visible rakho */
.typeahead:focus + .twitter-typeahead .tt-menu,
.typeahead-wrapper .typeahead:focus ~ .tt-menu {
    display: block !important;
    visibility: visible !important;
}
.tt-wrapper-150 .tt-menu {
    width: 150px !important;
}

/* When inside 250px wrapper */
.tt-wrapper-250 .tt-menu {
    width: 250px !important;
}


.tt-menu::-webkit-scrollbar {
    width: 8px;
}

.tt-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.tt-menu::-webkit-scrollbar-thumb {
    background-color: #7e7e7e;
    border-radius: 4px;
    border: 2px solid #f1f1f1;
}

.tt-menu::-webkit-scrollbar-thumb:hover {
    background-color: #7e7e7e;
}

.tt-suggestion {
     padding:5px 6px;
    cursor: pointer;
    font-size: 15px;
    color: #333; /* टेक्स्ट कलर */
    background-color:lightcyan; /* हल्का ग्रे बैकग्राउंड */
    border-bottom: 1px solid #05050554  !important;
    transition: background-color 0.2s, color 0.2s;
}

.tt-suggestion:last-child {
    border-bottom: none;
}

.tt-suggestion:hover,
.tt-suggestion.tt-cursor {
background-color: #7e7e7e ;
    color: #ffffff;
    font-weight: 700;
    border-left: 5px solid #7e7e7e ;
    padding-left: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tt-suggestion:active {
    background: #7e7e7e;
    transform: translateX(2px);
}


/* .typeahead:focus ~ .tt-menu .tt-suggestion:hover,
.typeahead:focus ~ .tt-menu .tt-suggestion.tt-cursor {
    background-color: #0078d7;
    color: #fff;
}

.typeahead-blue ~ .tt-menu .tt-suggestion {
    color: #0078d7;
    font-weight: 600;
} */
.footer-bar-container {
    display: flex;
    justify-content: space-between; /* Left and right buttons separated */
    align-items: center;
    padding: 5px;
    box-shadow: 0 0 10px 5px rgba(220, 220, 220, 0.5);
    border-radius: 2px;
    background-color: #fff;
}


.footer-buttons-bar {
    display: flex;
    justify-content: right;
    align-items: center;
    gap: 5px;
    padding: 10px;
    /* This box-shadow creates the subtle, blurred border effect */
    /* box-shadow: 0 0 10px 5px rgba(220, 220, 220, 0.5);  */
    /* border-radius: 12px; */
}

.shortcut-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3px 6px;
    background-color: #eacec0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    /* box-shadow: 2px 2px 5px rgba(0,0,0,0.1); */
    transition: all 0.2s ease;
    font-family: Arial, sans-serif;
    text-align: center;
    min-width: 100px;
    border: none;
    /* This adds a soft, subtle inner shadow to mimic the image's style */
    /* box-shadow: inset 2px 2px 4px rgba(200,200,200,0.5), 
                inset -2px -2px 4px rgba(255,255,255,0.7),
                4px 4px 8px rgba(0,0,0,0.1); */
}

.shortcut-button:hover {
    background-color: #f0f0f0;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2);
}

.shortcut-button:active {
    background-color: #ddd;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2);
}

.shortcut-key {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.shortcut-label {
    font-size: 12px;
    color: #666;
}