@charset "utf-8";
/* CSS Document */

/* Root Variables */
:root {
    /* Light Mode */
--body-color: #F5F1EB;
--sidebar-color: #EAE6DF;
--primary-color: #D8D4CD;
--primary-color-light: #1A1A1A;
--toggle-color: #666;
--text-color: #1A1A1A;
--border-color: #C8C3BB;
	            /* ====== Transition ====== */
--tran-03: all 0.2s ease;
--tran-04: all 0.3s ease;
--tran-05: all 0.3s ease;
}
/* Dark Mode */
body.dark {
--body-color: #0D1927;
--sidebar-color: #536372;
--primary-color: #7D838E;
--primary-color-light: #F2EFF0;
--toggle-color: #D9D6D4;
--text-color: #F2EFF0;
--border-color: #7D838E;
}
/* Global Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
body {
    min-height: 100vh;
    background-color: var(--body-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}
/* Selection Highlight */
::selection {
    background-color: var(--primary-color);
    color: #fff;
}
/* Sidebar */
	
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    padding: 10px 14px;
    background: var(--sidebar-color);
    box-shadow: 1px 0 0 var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent unwanted scrollbars */
}
.sidebar.close {
    width: 88px;
}
.sidebar li.search-box {
    border-radius: 25px;
    background-color: var(--primary-color);
    cursor: pointer;
    transition: var(--tran-05);
    width: calc(100% + 20px); /* 28px accounts for 14px on both sides */
    margin-left: -10px;
    margin-right: -10px;
}
.sidebar li.search-box input {
    height: 100%;
    width: 100%;
    outline: none;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-color);
    border-radius: 25px;
    font-size: 17px;
    font-weight: 500;
    transition: var(--tran-05);
}
	
/* Prevent background scrolling when sidebar is open */
body.no-scroll {
  overflow: hidden !important;
  /* Optional, for iOS touch-lock: */
  -webkit-overflow-scrolling: auto !important;
}

@media (max-height: 700px) {
.sidebar {
    padding-bottom: 10px;
}
}

@media (max-width: 768px) {
.form-actions {
    gap: 10px;
}
@media only screen and (max-width: 768px) {
  /* Reduce padding for main content areas */
  .home, .dashboard-content {
padding: 10px !important;
padding-top: 90px;
}
.search-box {
position: fixed;
top: 0;
left: 0;
width: calc(100% - 40px); /* 100% width minus 20px margin on each side */
margin: 0 20px;
padding: 10px 10px;
z-index: 1010;
display: flex;
align-items: center;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.sidebar li.search-box {
width: calc(100% - 40px);  /* Adjusts width to account for 20px margin on each side */
margin: 0 20px;
}

/* Search input active state */
#search-input:focus {
    outline: 2px solid var(--primary-color-light);
    outline-offset: 2px;
}

#search-input:not(:placeholder-shown) {
    background-color: var(--body-color);
    font-weight: 500;
}

  /* Adjust key item spacing for mobile */
  .key-item {
padding: 5px !important;
margin: 5px 0 !important;
  margin-bottom: 20px;
  border: 2px dashed #1a73e8;
  border-radius: 8px;
  background-color: var(--sidebar-color);
  margin-right: 22px;
  min-width: 90px;
}
}

  /* Configure the sidebar for mobile devices */
  nav.sidebar {
top: 0;
left: 0;
width: 100%;
height: 50px; /* Collapsed state height */
transition: height 0.3s ease;
z-index: 1000;
}

  /* Ensure main content occupies full width with room for the mobile menu */
.home {
position: relative !important;
left: 0 !important;
width: 100% !important;
padding-top: 60px !important;
}

  /* Override any left/width adjustments when sidebar is collapsed */
  .sidebar.close ~ .home {
left: 0 !important;
width: 100% !important;
}

  /* In the expanded state, allow the sidebar to scroll vertically */
  nav.sidebar.expanded {
overflow-y: auto;
height: 100vh !important;
}

  /* Hide the main menu items when the sidebar is collapsed */
  nav.sidebar .menu-links {
display: none;
}

  /* When expanded, fix the header height and enable scrolling for menu items */
  nav.sidebar.expanded header {
height: 50px;
flex-shrink: 0;
}
nav.sidebar.expanded .menu-bar {
display: block;
overflow-y: auto;
max-height: calc(100vh - 50px);
-webkit-overflow-scrolling: touch;
}

  /* Standardise header styling for mobile */
  nav.sidebar header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 10px;
}

  /* Style the toggle (chevron) appropriately without desktop transforms */
  nav.sidebar .toggle {
font-size: 28px;
transform: none;
}
nav.sidebar.expanded .menu-links {
display: block;
}
}
.form-actions > div {
    padding: 8px;
}
.button-text {
    display: none;
}
.form-actions i {
    font-size: 24px;
}
.menu {
    flex: 1;
}
/* Sidebar Items */
.sidebar li {
    height: 50px;
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: 10px;
}
.sidebar .icon, .sidebar .text {
    color: var(--text-color);
    transition: all 0.3s ease;
}
.sidebar .icon {
    min-width: 60px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar .text {
    font-size: 17px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
}
.sidebar.close .text {
    opacity: 0;
}
.sidebar.close .admin-star {
    opacity: 1 !important;
    visibility: visible !important;
}
/* Sidebar Header */
.sidebar header {
    padding: 10px 10px !important;
    margin-bottom: 0 !important;
}
.sidebar header .image-text {
    justify-content: flex-start;
    margin-left: 0;
    padding-left: 0;
}
.sidebar header .logo-text {
    display: flex;
    flex-direction: column;
}
.sidebar header .image img {
    width: 40px;
    border-radius: 6px;
}
.sidebar .toggle {
    position: absolute;
    top: 20px; /* Adjust as needed */
    right: -10px; /* Adjust as needed */
    height: 35px;
    width: 35px;
    background: var(--toggle-color);
    color: var(--sidebar-color) !important;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) rotate(180deg); /* Combined transform */
}
body, html {
    margin: 0 !important;
    padding: 0 !important;/* overflow: hidden !important; */
}
body.dark .sidebar header .toggle {
    color: var(--text-color);
}
.sidebar.close .toggle {
    transform: rotate(0deg);
    right: -15px;
}
/* Sidebar Menu */
.sidebar .menu-bar {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.menu-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;/* Removed fixed height and overflow-y settings */
}
.menu-bar::-webkit-scrollbar {
display: none;
}
.bottom-content {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 10px;
}
.sidebar li a {
    height: 100%;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.sidebar li a:hover {
    background-color: var(--primary-color);
    color: var(--sidebar-color);
}
/* Sidebar Toggle Mode */
.sidebar .mode {
    background-color: var(--primary-color-light);
    position: relative;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.sidebar .mode .sun-moon i {
    position: absolute;
    color: var(--text-color);
}
/* Toggle Switch */
.toggle-switch {
    position: absolute;
    right: 0;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}
.switch {
    position: relative;
    height: 22px;
    width: 40px;
    border-radius: 25px;
    background-color: var(--toggle-color);
    transition: all 0.3s ease;
}
.switch::before {
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background-color: var(--sidebar-color);
    transition: all 0.3s ease;
}
.sidebar.close .mode .text {
    opacity: 0 !important;
}
.mode .text {
    color: var(--body-color) !important;
    opacity: 1 !important;
    font-size: 17px !important;
    transition: var(--tran-03); /* Add transition to match other items */
    padding: 12px;
}
.loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #3498db;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.mode {
    background-color: var(--primary-color-light);
    position: relative;
    border-radius: 6px;
    transition: all 0.3s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mode-text {
    color: var(--text-color) !important;
    font-size: 17px;
}
/* Home Section */
.home {
    position: relative;
    top: 0;
    left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    transition: var(--tran-05);
    box-sizing: border-box;
    padding: 20px;
    overflow: auto;
}
.home .text {
    font-size: 30px;
    font-weight: 500;
    color: var(--text-color);
    padding: 12px 60px;
}
.sidebar.close ~ .home {
    left: 88px;
    width: calc(100% - 88px);
}
/* Dashboard Content */
.dashboard-content {
    padding: 0px;
}
.logout-item a {
    display: flex !important;
    width: 100%;
    height: 100%;
    align-items: center;
}
/* Add Key Form Styling */
.key-item.add-mode {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px dashed var(--primary-color);
}
.add-key-input {
    border: 1px solid var(--toggle-color);
    border-radius: 4px;
    padding: 5px;
    margin: 5px 0;
    background: transparent;
    color: var(--text-color);
    width: 80%;
}
.key-status-container {
    margin: 10px 0;
}
.key-status-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.key-status-entry select {
  min-width: 110px;
}
.key-status {
    padding: 5px;
    border-radius: 4px;
    background: var(--sidebar-color);
    color: var(--text-color);
    border: 1px solid var(--toggle-color);
}
.bx-plus {
    cursor: pointer;
    color: var(--text-color);
}
.bx-minus {
    cursor: pointer;
    color: var(--text-color);
}
.form-actions {
    position: relative;
    margin-top: 15px;
    display: flex;
    gap: 15px;
    justify-content: flex-start; /* Changed from default */
}
.form-actions > div {
    background-color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 6px;
    gap: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.approve-btn {
    color: green;
    border: 1px solid rgba(0, 255, 0, 0.3);
}
.cancel-btn {
    color: red;
    border: 1px solid rgba(255, 0, 0, 0.3);
}
.form-actions > div:hover {
    background-color: var(--primary-color);
    border-color: var(--text-color);
}
.form-actions i {
    font-size: 20px;
}
.button-text {
    color: var(--text-color);
    font-weight: 500;
}
/* END Add Key Form Styling */

.edit-note-icon, .save-note-icon, .cancel-note-icon {
    cursor: pointer;
    font-size: 1.6em;
    margin-left: 8px;
    line-height: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: var(--text-color); /* Add this line to enforce a color */
}
.notes-input {
    max-width: 150px;
    margin: 0;
    padding: 2px 4px; /* or adjust as needed (e.g., 3px 6px) */
    line-height: 1.2;
    font-size: 1em;
    height: 28px;
}
.transaction-table td {
    vertical-align: middle;
}
.notes-display, .notes-edit {
    display: flex;
    align-items: center;
    gap: 8px;
}
/* QR Printing section */

#qr-reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
#qr-reader {
    width: 100% !important;
    aspect-ratio: 1 / 1; /* ensures correct height */
    overflow: hidden;
    border-radius: 5px;
    position: relative;
}
#qr-reader__dashboard_section_csr {
    padding: 10px;
}
#qr-reader__dashboard_section_csr button {
    font-size: 14px !important;
    padding: 8px 12px !important;
}
.scan-error {
    text-align: center;
    margin-top: 20px;
}
#scanner-modal {
    display: none; /* Hidden by default (JavaScript controls this) */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}
.scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--body-color);
    padding: 15px;
    border-radius: 8px;
    /* Ensure internal content is also centred vertically */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

@media (max-width: 480px) {
.scanner-container {
    width: 95%;
    padding: 10px;
}
#qr-reader {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
}
}
.scanner-close-btn {
    position: relative;
    z-index: 1010;
    margin-top: 10px;
    padding: 8px 15px;
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}
.key-set-header {
    background: var(--sidebar-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.key-set-header .key-number {
    font-size: 3em;
    margin-bottom: 15px;
}
.qr-key-set .key-item {
    pointer-events: none;
    background: var(--sidebar-color);
    padding: 15px;
    margin-bottom: 15px;
}
.qr-key-set .key-number {
    font-size: 4.5em;
    margin-right: 20px;
}
.qr-key-set .key-details {
    text-align: left;
    font-size: 1em;
    line-height: 1.6;
}
.qr-key-set strong {
    color: var(--text-color);
    font-weight: 600;
}
.qr-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}
.qr-pair {
  display: flex;
  gap: 0;
}
.qr-pair .qr-card {
  margin: 0;
}
.qr-card {
  background: var(--sidebar-color);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.qr-card .key-item {
    pointer-events: none;
    background: var(--primary-color-light);
    padding: 15px;
    margin-bottom: 15px;
}
.qr-card .key-number {
    font-size: 3em;
    margin-right: 20px;
}
.qr-card .key-details {
    text-align: left;
    font-size: 1em;
}
.qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
	flex-direction: column;
	width: 100% !important;
	height: 100% !important;
}


.qr-code canvas {
    width: 100% !important;
    height: auto !important;
}
.qr-code-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 180px;    /* match your QRCode() width */
  height: 180px;   /* match your QRCode() height */
  margin-bottom: 8px;
}
.print-button {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    margin-top: 10px;
}
.nav-btn {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
}
.qr-key-info {
    font-size: 0.8em;
    margin-bottom: 10px;
}
.qr-card .key-id {
    font-size: 1.2em;
    margin: 10px 0;
    font-weight: 600;
}

@media print {
  @page { margin: 0; }

  body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 1) Keep a 0.5cm gap BETWEEN each pair, but zero internal gaps */
  .qr-container {
    /* grid still wraps each .qr-pair with its own gap */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.4cm, 1fr));
    gap: 0.5cm;      /* space between different keys */
    padding: 0.5cm;  /* outer padding */
  }

  /* 2) Make each pair a flex‐box with no internal gap */
  .qr-pair {
    display: flex;
    gap: 0;          /* zero space between the two matching cards */
  }

  /* 3) Reset card padding/margin so they butt right up */
  .qr-pair .qr-card {
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  /* 4) Print‐card styling (if you still need it) */
  .print-container,
  .qr-pair .qr-card {
    width: 2.4cm;
    height: 3.4cm;
    box-sizing: border-box;
    border: 0.2cm dashed #000;
    position: relative;
    overflow: hidden;
  }

  .print-container .print-key,
  .qr-pair .qr-card .key-id {
    height: 1.0cm;
    line-height: 1.0cm;
    text-align: center;
    font-weight: bold;
    font-size: 0.8cm;
  }

  .print-container .qr-code,
  .qr-pair .qr-card .qr-code-container {
    position: absolute;
    bottom: 0.2cm;
    left: 0.2cm;
    width: calc(100% - 0.4cm);
    height: calc(100% - 1.0cm - 0.4cm);
    overflow: hidden;
  }

  .print-container .qr-code img,
  .qr-pair .qr-card .qr-code-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0; padding: 0;
  }
}

/* Hide print containers that shouldn't be visible on screen */
.print-container {
  display: none !important;
}

/* Only show them inside the range output area */
#range-output.range-output .print-container {
  display: block !important;
  width: 2.4cm;
  height: 3.4cm;
  box-sizing: border-box;
  border: 0.05cm dashed #888;
  position: relative;
  overflow: hidden;
}

/* QR Range Generator Styles */
.qr-range-generator {
  background: var(--sidebar-color);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.qr-range-generator h3 {
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: 15px;
}

.qr-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-group label {
  color: var(--text-color);
  font-size: 14px;
}

.control-group input[type="text"] {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--body-color);
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  transition: var(--tran-02);
}

.control-group input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color);
}

.hint-text {
  font-size: 12px;
  color: var(--text-color);
  opacity: 0.7;
  font-style: italic;
}

.control-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.range-output {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5cm;
  margin-top: 20px;
  padding: 20px;
  background: var(--body-color);
  border-radius: 8px;
  min-height: 100px;
}

.range-output:empty::before {
  content: 'Generated tags will appear here';
  color: var(--text-color);
  opacity: 0.5;
  font-style: italic;
  display: block;
  width: 100%;
  text-align: center;
}

/* Range preview (screen): match the print layout inset */
.range-output .print-container {
  position: relative;
  overflow: hidden;
}

.range-output .print-container .qr-code {
  position: absolute;
  bottom: 0.2cm;
  left: 0.2cm;
  width: calc(100% - 0.4cm) !important;
  height: calc(100% - 1.0cm - 0.4cm) !important;
  display: block !important; /* override global flex */
  margin: 0 !important;
}

.range-output .print-container .qr-code canvas,
.range-output .print-container .qr-code img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.range-output .print-container .qr-code > *:not(:first-child) {
  display: none !important;
}


.divider-section {
  margin: 30px 0 20px 0;
  padding: 15px;
  background: var(--sidebar-color);
  border-radius: 8px;
  text-align: center;
}

.divider-section h3 {
  color: var(--text-color);
  margin: 0;
}

/* Print-specific styles for range output (screen preview only) */
.print-pair,
.print-container {
  display: none !important;
}

/* Only show them inside the range output area */
#range-output.range-output .print-pair {
  display: flex !important;
  gap: 0 !important;
  page-break-inside: avoid;
  break-inside: avoid;
}

#range-output.range-output .print-container {
  display: block !important;
  width: 2.4cm;
  height: 3.4cm;
  box-sizing: border-box;
  border: 0.05cm dashed #888;
  position: relative;
  overflow: hidden;
}

#range-output.range-output .print-key {
  height: 1.0cm;
  line-height: 1.0cm;
  text-align: center; /* use 'center', not 'centre' */
  font-weight: 700;
  font-size: 0.72cm;
  color: #000;
}

body.dark .qr-range-generator {
  background: var(--sidebar-color);
}

body.dark .control-group input[type="text"] {
  background: var(--body-color);
  color: var(--text-color);
  border-color: var(--border-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .qr-range-generator {
    padding: 15px;
  }
  
  .control-actions {
    flex-direction: column;
  }
  
  .control-actions button {
    width: 100%;
  }
}


/* END QR Printing section */


	
/* Add smooth transition to key items */
.key-item, .qr-card .key-item {
    transition: transform 0.2s ease;
}
/* Apply the bump effect on hover */
.key-item:hover, .qr-card .key-item:hover {
    transform: translateY(-3px);
}
/* Login */
	
/* iOS loading state */
body.ios-loading {
    pointer-events: none;
    -webkit-overflow-scrolling: touch;
}
body.ios-loading * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
/* iOS input fix */
input {
    -webkit-user-select: auto !important;
    user-select: auto !important;
}
/* Force hardware acceleration */
.container {
/* transform: translateZ(0);  */
}
/* Add touch highlight effect */
.login-form button:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}
/* Ensure clickable area */
.login-form button::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
}
.login-form {
    max-width: 300px;
    margin: 100px auto;
    padding: 20px;
    background: var(--sidebar-color);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.login-form input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.login-form button {
    -webkit-appearance: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    touch-action: manipulation;
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
input, button {
    min-height: 44px; /* Minimum touch target size for iOS */
}
.name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-star {
    font-size: 1.5em; /* Adjust clearly if needed */
    margin-left: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}
.sidebar .image {
    min-width: 40px; /* ensure icon always visible */
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-color);
    opacity: 0.8;
}
.error {
    color: red;
    padding: 20px;
    text-align: center;
}
/* Nested Accordion Styles */
.key-set-details .history-item {
    margin-left: 20px;
    border-left: 2px solid var(--primary-color);
}
.key-set-details .history-header {
    font-size: 0.9em;
    padding-left: 10px;
}
.key-history-details .transaction {
    font-size: 0.85em;
    padding: 8px;
    margin: 3px 0;
}
/* Table styling for transaction history */
.transaction-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-size: 0.85em; /* Slightly smaller font */
}
.transaction-table td, .transaction-table th {
    border: 1px solid #ccc;
    padding: 4px; /* Less padding for a more compact look */
    text-align: left;
    vertical-align: middle;
}
/* Optional row striping */
.transaction-table tr:nth-child(even) {
    background-color: var(--body-color);
}
/* Colour classes for the Transaction column */
.action-create {
    color: blue;
}

.action-checkout {
    color: red;
}
.action-return {
    color: green;
}
/* Styling for the Manage Accounts view */
#accounts-list {
    margin: 0px;
    padding: 0px;
}
#accounts-list h3 {
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 600;
    color: var(--text-color);
}
	
.history-header .title {
  font-weight: 600;
}
.history-header .available-count {
  font-weight: 400;
  font-size: 0.9em;
}
/* 3) Smaller status dots in the history headers */
.history-header .green-dot,
.history-header .red-dot,
.history-header .missing-dot {
  height: 8px;
  width: 8px;
  margin-right: 6px;
}
.action-button {
  color: var(--text-color);
  background-color: var(--primary-color);
  border: none;
  padding: 6px 12px;
  margin: 4px 6px 4px 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85em;
  display: inline-block;
  text-shadow: 0 1px 1px rgba(0,0,0,0.05);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.add-user-button {
  margin-bottom: 20px;
  font-size: 1em;
}

#user-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.account-card {
    background: var(--sidebar-color);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
    width: 300px;
    position: relative;
    transition: transform 0.2s ease;
}
.account-card:hover {
    transform: translateY(-3px);
}
.account-card .account-details {
    margin-bottom: 15px;
    font-size: 0.9em;
    line-height: 1.5;
}
.account-card .account-actions {
    text-align: right;
}
	
	/* Form styling for editing/adding users */

.edit-user-form label, .add-user-form label {
    font-size: 0.85em;
    color: var(--text-color);
}
.edit-user-form input, .add-user-form input, .edit-user-form select, .add-user-form select {
    width: calc(100% - 10px);
    padding: 5px;
    margin-top: 5px;
    margin-bottom: 10px;
    border: 1px solid var(--toggle-color);
    border-radius: 4px;
    background: transparent;
    color: var(--text-color);
}
	
/* Key Edit */
.blue-edit {
  color: #1a73e8;
  font-size: 1.5em;
  margin-bottom: 5px;
  display: block;
}

.key-item.edit-mode:hover {
  background-color: var(--primary-color-light);
  color: var(--text-color);
}
	
#edit-key-list .edit-note-icon {
  color: #1a73e8 !important;
  padding: 0;
  margin: 0;
  font-size: 1.5em;
  list-style: none;
}

#edit-key-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

#edit-key-list li.key-item {
  margin-bottom: 1px;
}
	
#edit-key-list .key-item {
  margin-bottom: 8px !important; /* reduce space between blocks */
  background: var(--sidebar-color) !important; /* match Remove Key */
  border: 2px dashed #1a73e8 !important; /* reapply dashed border */
  color: var(--text-color) !important;
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
}
.edit-key-icon {
  pointer-events: auto !important;
  z-index: 10 !important;
  position: relative !important;
}

/* Key List */
#key-list {
    list-style: none;
    padding: 0;
}
.key-number {
    font-size: 4.5em;
    font-weight: 600;
    min-width: 90px;
    margin-right: 22px;
}
.remove-icon {
    display: none;
    color: red;
    margin-right: 10px;
    cursor: pointer;
    font-size: 1.5em;
    transition: all 0.3s ease;
}
body.remove-mode .remove-icon {
    display: inline-flex;
}
body.remove-mode .key-item {
    cursor: pointer;
    border: 2px dashed red;
}
.nav-link.active a {
    background-color: var(--primary-color);
    color: var(--sidebar-color) !important;
}
.history-item {
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 7px;
    padding: 7px;
    background: var(--sidebar-color);
}
.history-header {
	justify-content: space-between;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    padding: 7px;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.history-header:hover {
    background-color: var(--primary-color);
}
.transaction {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin: 5px 0;
    background: var(--body-color);
    border-radius: 4px;
    font-size: 0.9em;
}
.bx-chevron-down, .bx-chevron-up {
    transition: transform 0.3s ease;
}
.history-details {
    margin-top: 10px;
    padding-left: 20px;
}
/* Key Item */
.key-item {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    cursor: pointer;
    background: var(--primary-color);
    color: var(--primary-color-light);
    border-radius: 5px;
}
	
.key-subset {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.indicator {
    display: flex;
    align-items: center;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    font-size: 12px;
}
.green-dot, .red-dot, .missing-dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}
.green-dot {
    background-color: green;
}
.red-dot {
    background-color: red;
}
.missing-dot {
    background-color: orange;
}
/* Tenant status indicator - blue dot */
.tenant-dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    background-color: #1a73e8; /* Blue color for tenant status */
}

/* Smaller tenant dots in history headers */
.history-header .tenant-dot {
    height: 8px;
    width: 8px;
    margin-right: 6px;
}

/* Transaction table styling for tenant actions */
.action-tenant {
    color: #1a73e8; /* Blue color to match the dot */
    font-weight: 500;
}

/* Optional: Add a subtle background highlight for tenant rows in tables */
.transaction-table tr.tenant-row {
    background-color: rgba(26, 115, 232, 0.05);
}

/* Indicator styling for tenant status */
.indicator .tenant-dot {
    background-color: #1a73e8;
}

/* Dark mode adjustments for tenant indicator */
body.dark .tenant-dot {
    background-color: #4a9eff; /* Lighter blue for dark mode */
}

body.dark .action-tenant {
    color: #4a9eff;
}

/* Checkout modal styling updates */
#checkout-for {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--body-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
}

/* Tenant-specific note input styling */
#other-note-container {
    margin-top: 10px;
}

#other-note {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--body-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
}

#other-note::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s, fadeOut 0.3s 2.5s forwards;
    display: none;
}
.notification.success {
    background: #4CAF50;
}
.notification.error {
    background: #f44336;
}

/* ====== REPORTS SECTION STYLES ====== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.report-card {
    background: var(--sidebar-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.report-card.full-width {
    grid-column: 1 / -1;
}

.report-card h4 {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 1.1em;
}

.chart-container {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    max-height: 100%;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-item {
    display: grid;
    grid-template-columns: 100px 1fr 150px 100px;
    gap: 15px;
    padding: 12px;
    background: var(--body-color);
    border-radius: 6px;
    align-items: center;
}

.transaction-key {
    font-weight: 600;
    color: var(--text-color);
}

.transaction-user {
    color: var(--text-color);
}

.transaction-date {
    color: var(--text-color);
    font-size: 0.9em;
}

.transaction-action {
    text-align: right;
    font-weight: 500;
}

@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .transaction-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .transaction-action {
        text-align: left;
    }
}

@keyframes slideIn {
from {
top: -50px;
}
to {
top: 20px;
}
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}