/* TopNav Styles */
.topnav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: var(--topnav-bg);
    flex-direction: row-reverse;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: left 0.3s ease, width 0.3s ease, background-color 0.3s ease;
    z-index: 900;
}
/**/
:root{
  --bg-color: white;
  --box-bg: #ccc;
  --box-header-bg: #333;
  --th-bg: #EEF0F2;
  --td-bg: #302929;
  --act-btn-bg: #000;
  --act-btn-hv-bg: #ccc;
  --popup-btn-bg: #ccc;
  --title-cl: #333;
  --title-cl-shadow: #ccc;
  --table-title-cl: #ccc;
  --table-title-cl-shadow: #000;
  --th-text: #6b7280;
  --td-text: #fff;
}
/* LIGHT mode variables */
.dark-theme {
  --bg-color: #f5e9d8;
  --box-bg: #FFFEF7;   
  --box-header-bg: #2c3e50;
  --th-bg: #7F8C8D;
  --td-bg: #34495e;
  --act-btn-bg: #182a3d;
  --act-btn-hv-bg: #7F8C8D;
  --popup-btn-bg: #ccc;
  --title-cl: #333;
  --title-cl-shadow: #838383;
  --table-title-cl: #ccc;
  --table-title-cl-shadow: #000;
  --th-text: #000;
  --td-text: #fff;
}

.notification {
  position: fixed;
  top: 50%;
  left: 40%;
  padding: 15px 25px;
  background-color: red;
  color: white;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  display: none;
}

.main-content{
  width: 100vw;
}

/* Menu Dropdown Styles */
.menu {
    position: fixed;
    left: 20px;
    margin-right: 20px;
}

.menudropdown {
    position: absolute;
    top: 55px;
    left: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px #333;
    width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000 !important;
    overflow: hidden;
    color: var(--text-color);
}

.menudropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ccc;
    box-shadow: 0 2px 5px black;    
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-icon:hover {
    background-color: var(--accent-dark);
}

/* Profile Dropdown Styles */
.profile {
    position: relative;
    margin-left: 20px;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--popup-btn-bg);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px black;    

}

.profile-icon:hover {
    background-color: var(--accent-dark);
}

.dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px #333;
    width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000 !important;
    overflow: hidden;
    color: var(--text-color);
}

.dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.username {
    padding: 15px;
    border-bottom: 1px solid #302929;
    text-align: center;
}

.username h2 {
    font-size: 16px;
    color:black;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    color: black;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #EEF0F2;
}

.dropdown-item img {
    margin-left: 10px;
    filter: invert(var(--icon-invert));
}
/* End of TopNav Styles */

body {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease;  
    flex-direction: column;
    width: 98vw;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th {
  background-color: var(--th-bg);
  text-align: left;
  font-weight: 500;
  color: var(--th-text);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  top: 0;
  width: 20%;
}

.sortButtons{
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 16px;
  font-weight: bold;
}

td {
  width: 10%;
  padding: 0.75rem 1rem;
  background-color: var(--td-bg);
  color: var(--td-text);
  border-top: 1px solid #e5e7eb;
}

.tonerRows{
  width: 10%;
  padding: 0.75rem 1rem;
  background-color: var(--td-bg);
  color: var(--td-text);
  border-top: 1px solid #e5e7eb;
}

footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}


/*Input Popup for adding/getting rid of items*/
.popup {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  min-width: 300px;
  box-shadow: -.25rem .25rem black;
}

.popup-content-input{
  padding: 20px;
  border-radius: 10px;
  min-width: 300px;
  width: 60%;
  background-color: #ffff;
  box-shadow: -.25rem .25rem black;
  margin-top: 1.5rem; 
  margin-right: auto; 
  margin-left: auto; 
}

.close-popup {
  --bg: #000;
  --hover-bg: #ccc;
  --hover-text: #000;
  color: #fff;
  cursor: pointer;
  border: 1px solid var(--bg);
  border-radius: 4px;
  background: var(--bg);
  transition: 0.2s;
  float: right;
}

.close-popup:hover {
  color: var(--hover-text);
  transform: translate(0.25rem, -0.25rem);
  background: var(--hover-bg);
  box-shadow: -0.25rem 0.25rem var(--bg);
}

.close-popup:active {
  transform: translate(0);
  box-shadow: none;
}

body.modal-open{
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  background-color: var(--box-header-bg); /* Optional: ensure visibility */
  color: #ccc;
  padding: 10px;
  border-radius: 10px;
  box-shadow: -.25rem .25rem black;
  border-bottom: 1px solid var(--border-color);
}

.form-inputs{
  --bg: var(--table-title-cl-shadow);
  box-shadow: -0.25rem 0.25rem var(--bg);
  border-radius: 5px;
  border: 2px solid var(--bg);
  padding: 1px 10px;
  margin-bottom: 20px;
  font-weight: 600;
}

/* From Uiverse.io by satyamchaudharydev */ 
/* inspired form gumroad website */
.action-btn {
  --bg: var(--act-btn-bg);
  --hover-bg: var(--act-btn-hv-bg);
  --hover-text: var(--act-btn-bg);
  color: #fff;
  cursor: pointer;
  border: 1px solid var(--bg);
  border-radius: 4px;
  background: var(--bg);
  transition: 0.2s;
  margin-left: 10px;
}

.action-btn:hover {
  color: var(--hover-text);
  transform: translate(0.25rem, -0.25rem);
  background: var(--hover-bg);
  box-shadow: -0.25rem 0.25rem var(--bg);
}

.action-btn:active {
  transform: translate(0);
  box-shadow: none;
}


.title{
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-weight: bold; 
  font-size: 48px;
  text-shadow: -.15rem .15rem var(--title-cl-shadow);
  display: flex;
  justify-content: center;      
  align-items: center;
  color:#333;
}   

/* Box Layout Styles */
.box-container {
    flex-wrap: wrap;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    margin-right: 25px;
    margin-left: 10px;
}

.box-left-column,
.box-middle-column,
.box-right-column {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 10px;
}

.admin-left-column,
.admin-middle-left-column,
.admin-middle-right-column,
.admin-right-column {
    flex: 1;
    min-width: 200px;
    max-width: 25%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 10px;
}

.bottom-box-container {
    flex-wrap: nowrap;
    display: flex;
    gap: 20px;
    margin-right: 25px;
    margin-left: 10px;
    margin-bottom: 10px;
}

.tonerBottom-left,
.tonerBottom-right{
  display: flex;
  flex-direction: column;
  width: 50%;
  border-radius: 10px;
  box-shadow: 0 2px 5px #333;
  background-color: var(--box-bg);
  padding: 10px;
}

.tonerBottom{
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 5px #333;
  background-color: var(--box-bg);
  padding: 10px;
}

.box {
    background-color: var(--box-bg);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
    padding: 20px;
    height: 100%;
    transition: background-color 0.3s ease;
}

.box-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    padding: 5px;
    border-radius: 10px;
    box-shadow: -.25rem .25rem var(--table-title-cl-shadow);
    background-color: var(--box-header-bg);
    border-bottom: 1px solid var(--border-color);
}

.box-header h2 {
    font-size: 25px;
    font-weight: bold;
    color: var(--table-title-cl);
    text-shadow: -.15rem .15rem var(--table-title-cl-shadow);
    margin: 0;
    position: sticky;
}

.top-box,
.bottom-box {
    box-shadow: 0 2px 5px #333;
}

.tablewrapper {
  border: 1px solid #ccc;
}
.tablewrapper-toner{
  border: 1px solid #ccc;
  overflow: auto;
  height: 500px;
}
.tablewrapper-admin{
  border: 1px solid #ccc;
  overflow: auto;
  height: 550px;
}
.tablewrapper-chart {
  width: 300px;
  height: 300px;
}
.tablewrapper-bar {
  width: 300px;
  height: 700px;
}

.full-height-box {
    min-height: 420px;
    /* Approximately the height of the two stacked boxes + gap */
}

.printSticker{
  width: 420px;
  padding: 10px 20px;            
  font-size: 16px;              
  background-color: #302929;     
  color: white;                  
  border: none;                 
  border-radius: 4px;            
  cursor: pointer;  
}
/* Button container inside the box */
.button-container {
  display: flex;
  flex-direction: column;      
  align-items: center;          
  gap: 10px;                     
  width: 100%;                  
}
.button-container button {
  width: 100%;              
  padding: 10px 20px;            
  font-size: 16px;              
  background-color: #302929;     
  color: white;                  
  border: none;                 
  border-radius: 4px;            
  cursor: pointer;               
}
.button-container button:hover {
  background-color: #302929;    
}

@media(min-width: 651px) and (max-width: 1280px){
  .box-container{
    flex-direction: column;
  }
  .box-left-column,
  .box-middle-column,
  .box-right-column {
    width: 100%;
  }
  
  .box-container {
    margin-right: 20px;
    margin-left: 10px;
}
  .tonerBottom-left,
  .tonerBottom-right{
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 5px #333;
    background-color: var(--box-bg);
    padding: 10px;
  }

  .bottom-box-container{
    flex-wrap: wrap;
    display: flex;
    gap: 20px;
    margin-right: 25px;
    margin-left: 10px;
  }
}


/* Styles for screens smaller than 620px */
@media(min-width: 431px) and (max-width: 650px) {
  body {
    height: 100%;
    padding: 1rem;
    justify-content: center; /* Center content on smaller screens */
  }

  .box-container{
      flex-direction: column;
    }
    .box-left-column,
    .box-middle-column,
    .box-right-column {
      width: 100%;
    }

  .box-container {
    margin-right: 20px;
    margin-left: 10px;
}

.title{
  font-size: 24px;
}   

.main-content{
  margin-left: 15px;
  width: 100%;
}

.tonerBottom-left,
.tonerBottom-right{
  display: none;
}
}


/* Styles for screens smaller than 430px */
@media (max-width: 430px) {
  body {
    height: 100%;
    justify-content: center; /* Center content on smaller screens */
  }
.box-container{
  width: 100vw;
  flex-direction: column;
  margin: 0;
}

.title{
  font-size: 24px;
}   

.main-content{
  width: 100vw;
}

.tonerBottom-left,
.tonerBottom-right{
  display: none;
}
}

@media print {
  /* Hide everything except the element you want to print */
  body * {
      visibility: hidden;
  }
  #content-to-print, #content-to-print * {
      visibility: visible;
  }
}



/* Modal styles */
.modal {
  display: none;  /* Hidden by default */
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);  /* Semi-transparent background */
}

/* Modal Content */
.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;  /* Can adjust the width */
  max-width: 500px;  /* Maximum width */
  text-align: center;
}

/* Close button */
.close {
  color: white;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(#333);
}

input:checked+.toggle-slider:before {
    transform: translateX(24px);
}