body {
    color: #777;
}

.pure-img-responsive {
    max-width: 100%;
    height: auto;
}

.pure-menu-link{
    padding: 0.5em 0px;
}

/*
Add transition to containers so they can push in and out.
*/
#layout,
#menu,
.menu-link {
    -webkit-transition: all 0.2s ease-out;
    -moz-transition: all 0.2s ease-out;
    -ms-transition: all 0.2s ease-out;
    -o-transition: all 0.2s ease-out;
    transition: all 0.2s ease-out;
}

/*
This is the parent `<div>` that contains the menu and the content area.
*/
#layout {
    position: relative;
    left: 0;
    padding-left: 0;
}
    #layout.active #menu {
        left: 200px;
        width: 200px;
    }

    #layout.active .menu-link {
        left: 200px;
    }
/*
The content `<div>` is where all your content goes.
*/
.content {
    padding: 0 2em;
    margin-bottom: 50px;
    line-height: 1.6em;
}

.header {
     margin: 0;
     color: #333;
     text-align: center;
     padding: 2.5em 2em 0;
     border-bottom: 1px solid #eee;
 }
    .header h1 {
        margin: 0.2em 0;
        font-size: 3em;
        font-weight: 300;
    }
     .header h2 {
        font-weight: 300;
        color: #ccc;
        padding: 0;
        margin-top: 0;
    }

.content-subhead {
    margin: 50px 0 20px 0;
    font-weight: 300;
    color: #888;
}



/*
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
appears on the left side of the page.
*/

#menu {
    margin-left: -200px; /* "#menu" width */
    width: 200px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000; /* so the menu or its navicon stays above all content */
    background: #f2eaea;
    overflow-y: auto;
    box-shadow: 3px -4px 5px rgba(0,0,0,0.2);
}
    /*
    All anchors inside the menu should be styled like this.
    */
    #menu a {
        color: #000;
        border: none;
        padding: 0.6em 0 0.6em 0.6em;
    }

    /*
    Remove all background/borders, since we are applying them to #menu.
    */
     #menu .pure-menu,
     #menu .pure-menu ul {
        border: none;
        background: transparent;
    }

    /*
    Add that light border to separate items into groups.
    */
    #menu .pure-menu ul,
    #menu .pure-menu .menu-item-divided {
        border-top: 1px solid #eee;
    }
        /*
        Change color of the anchor links on hover/focus.
        */
        #menu .pure-menu li a:hover,
        #menu .pure-menu li a:focus {
            color: darkgrey;
        }

    /*
    This styles the selected menu item `<li>`.
    */
    #menu .pure-menu-selected,
    #menu .pure-menu-heading {
        background: #1E90FF;
    }
        /*
        This styles a link within a selected menu item `<li>`.
        */
        #menu .pure-menu-selected a {
            color: #fff;
        }

    /*
    This styles the menu heading.
    */
    #menu .pure-menu-heading {
        font-size: 110%;
        color: #fff;
        margin: 0;
    }

    .pure-menu{
        margin-bottom: 20px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        padding-top: 1em;
        background-color: #ffff;
        z-index: 99;
    }

/* -- Dynamic Button For Responsive Menu -------------------------------------*/

/*
The button to open/close the Menu is custom-made and not part of Pure. Here's
how it works:
*/

/*
`.menu-link` represents the responsive menu toggle that shows/hides on
small screens.
*/
.menu-link {
    position: fixed;
    display: block; /* show this only on small screens */
    top: 0;
    left: 0; /* "#menu width" */
    background: #000;
    background: rgba(0,0,0,0.7);
    font-size: 10px; /* change this value to increase/decrease button size */
    z-index: 10;
    width: 2em;
    height: auto;
    padding: 2.1em 1.6em;
}

    .menu-link:hover,
    .menu-link:focus {
        background: #000;
    }

    .menu-link span {
        position: relative;
        display: block;
    }

    .menu-link span,
    .menu-link span:before,
    .menu-link span:after {
        background-color: #fff;
        pointer-events: none;
        width: 100%;
        height: 0.2em;
    }

        .menu-link span:before,
        .menu-link span:after {
            position: absolute;
            margin-top: -0.6em;
            content: " ";
        }

        .menu-link span:after {
            margin-top: 0.6em;
        }


/* -- Responsive Styles (Media Queries) ------------------------------------- */

/*
Hides the menu at `48em`, but modify this based on your app's needs.
*/
@media (min-width: 48em) {

    .header,
    .content {
        padding-left: 2em;
        padding-right: 2em;
    }

    #layout {
        padding-left: 250px; /* left col width "#menu" */
        left: 0;
    }
    #menu {
        left: 200px;
    }

    .menu-link {
        position: fixed;
        left: 200px;
        display: none;
    }

    #layout.active .menu-link {
        left: 200px;
    }
}

@media (max-width: 48em) {
    /* Only apply this when the window is small. Otherwise, the following
    case results in extra padding on the left:
        * Make the window small.
        * Tap the menu to trigger the active state.
        * Make the window large again.
    */
    #layout.active {
        position: relative;
        left: 200px;
    }
}

.editing{
    display: none;
}

.pure-table{
    overflow-x: auto;
    width: 80%;
    margin-left: 15px;
    margin-top: 15px;
    margin-bottom: 30px;
}

.button-success,
.button-error,
.button-warning,
.button-secondary,
.button-cancel,
.pure-button-primary {
    color: white;
    border-radius: 4px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.pure-button-primary{
    background-color: #1E90FF!important;
}
.button-success {
    background: rgb(28, 184, 65);
    /* this is a green */
}

.button-error {
    background: rgb(202, 60, 60);
    /* this is a maroon */
}

.button-warning {
    background: rgb(223, 117, 20);
    /* this is an orange */
}

.button-secondary {
    background: rgb(66, 184, 221);
    /* this is a light blue */
}

.button-cancel{
    background: rgb(68, 68, 68);
    box-shadow: 0 0 10px rgba(53, 53, 53, 0.278);
}

.button-option{
    background: unset;
    font-weight: bold;
    border-radius: 4px;
    border: 1px solid #1E90FF;
    text-shadow: unset;
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
}

.button-option:disabled{
    background: unset;
    color: darkgray;
    border-radius: 4px;
    border: 1px solid darkgray;
    text-shadow: unset;
    font-size: 9px;
    font-weight: bold;
    padding: 10px 15px;
    cursor: not-allowed;
}


.error-table{
    color: #fd7e14;
    font-weight: bold;
    font-family: sans-serif;
    margin-left: 5px;
  }

  .total-cells{
    font-weight: bold;
    font-family: sans-serif;
    margin-left: 5px;
    background-color: #e9ecef;
    color: #000;
  }

  .text-right{
    text-align: right;
  }

  /* Below 768px */

    @media (max-width: 768px) {
        .pure-table{
            width: 100%;
            margin-left: 0px;
            margin-top: 15px;
            margin-bottom: 30px;
        }
    }


    .title-main{
        margin-left: 20px;
    }

    .text-success{
        color: #28a745;
    }

    .text-danger{
        color: #dc3545;
    }

    .text-warning{
        color: #ffc107;
    }

    .text-info{
        color: #17a2b8;
    }

    .text-primary{
        color: #000080;
    }

    .text-secondary{
        color: #6c757d;
    }

    .text-dark{
        color: #343a40;
    }

    .text-light{
        color: #f8f9fa;
    }

    .text-muted{
        color: #6c757d;
    }

    .text-white{
        color: #fff;
    }

    .text-black-50{
        color: rgba(0,0,0,.5);
    }

    .text-white-50{
        color: rgba(255,255,255,.5);
    }

    .text-400{
        font-weight: 400;
    }

    .text-500{
        font-weight: 500;
    }

    .text-600{
        font-weight: 600;
    }

    .text-700{
        font-weight: 700;
    }

    .text-800{
        font-weight: 800;
    }

    .text-900{
        font-weight: 900;
    }

    .float-left{
        float: left;
        margin-left: 15px;
    }

    .float-right{
        float: right;
    }

    .float-none{
        float: none;
    }

    .clearfix::after{
        content: "";
        clear: both;
        display: table;
    }

    .d-none{
        display: none!important;
    }

    .d-inline{
        display: inline;
    }

    .tr-unset{
        background-color: #fff;
        border: none;
    }

    .text-center{
        text-align: center;
    }

    .fade-me-out.htmx-swapping {
        opacity: 0;
        transition: opacity 1s ease-out;
      }

      .alertify-notifier {
        color: #fff;
    }

    .mb-15 {
        margin-bottom: 15px!important;
    }

    .tr-border-bottom{
        border-bottom: 2px solid #000!important;
    }

    .tr-border-top{
        border-top: 2px solid #000!important;
    }

    .pure-button-sm{
        font-size: 12px;
        padding: 5px 10px;
    }

    .margin-top-10{
        margin-top: 10px!important;
    }

    .margin-top-15{
        margin-top: 15px!important;
    }


    .border-primary{
        border: 1px solid #000080!important;
    }

    .button-xsmall {
        font-size: 70%;
    }

    .button-small {
        font-size: 85%;
    }

    .button-large {
        font-size: 110%;
    }

    .button-xlarge {
        font-size: 125%;
    }

    .pure-table thead{
        background-color: rgb(107 114 128/0.3);
        color: rgb(107 114 128/1);
    }

    .width-200{
        width: 200px!important;
    }


.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; 
}

.center-div{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; 
}

.center-div > .content{
    display: block;
    justify-content: unset;
    align-items: unset;
    min-height: unset;
}

.center-horizon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-a{
    color: #fff;
    text-decoration: none;
}

.login-title{
    color: #000;
}

.width-100{
    width: 100%;
}

.unset-color{
    color: unset!important;
}

  .tab {
    padding: 5px;
    cursor: pointer;
    height: 20px;
    margin-right:5px;
    border: 1px solid #1E90FF;
    border-radius: 4px;
    background-font-weight: bold;
    color: #fff;
    text-align: center;
  }
  
  .tab-content {
    display: none;
  }
  
  .tab-content.active {
    display: block;
  }

  .iframe{
        width: 98vw;
        height: 85vh;
        border: none;
  }


  #twoFactor::-webkit-outer-spin-button,
#twoFactor::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
#twoFactor[type=number] {
  -moz-appearance: textfield;
}

.clear-a{
    color: #11a2f0;
    text-decoration: none;
}

.margin-left-10{
    margin-left: 10px!important;
}

.margin-left-20{
    margin-left: 20px!important;
}

.margin-left-30{
    margin-left: 30px!important;
}

.menu-links{
    color: #000080;
    text-decoration: none;
    margin-right: 10px;
    font-size: 20px;
    font-weight: 600;
    border: 1px solid #000080;
    padding: 5px 10px;
    border-radius: 5px;
}

/* media */

.log-out{
    margin-right: 100px;
}

.mr-10{
    margin-right: 10px;
}

.ml-10{
    margin-left: 10px;
}

@media (max-width: 768px) {
    .log-out{
        margin-right: 20px;
    }

    .menu-links{
        margin-right: 5px;
        font-size: 15px;
    }

}

.status-table{
    width: 200px!important;
}


/* Styles for the loading container */
.loading-container {
    margin-left: 10px;
    display: inline-block;
}

/* Styles for the spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #333; /* Change the color of the spinner here */
    border-radius: 50%;
    width: 10px;
    height: 10px;
    animation: spin 1s linear infinite;
}

/* Keyframes for the spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#login-form{
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    background-color: #ffffffeb;
    border-radius: 5px;
}


.login-list{
    list-style: none;
    color: #000;
}
.pure-table-center{
    margin: 0 auto;
}

.pure-menu-link{
    cursor: pointer;
}

.table-overflow{
    width: 100%;
    overflow-x: auto;
}

.margin-0{
    margin: 0!important;
}

.pure-menu{
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none; /* For Safari */
    -ms-user-select: none; /* For old IE/Edge */
}

#loading {
    display: none;
    transition: opacity 0.5s;
    font-size: 20px;
    font-weight: bold;
    font-weight: bold;
    position: fixed;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    background-color: #f8f9fc;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);

}

.htmx-request > .search-result:focus {
    outline: none;
    border-bottom: 1px solid #000;
}

input[type='file'] {
    background-color: #f8f9fc;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 5px;
    color: #495057;
}

#output{
    width: min-content;
}


.pending{
    color: #2d01f1!important;
    font-weight: bold;
}

.completed , .success, .sent{
    color: #28a745!important;
    font-weight: bold;
}

.failed{
    color: #dc3545!important;
    font-weight: bold;
}

.counter{
    font-weight: bold;
    color: #fff;
    background-font-weight: bold;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 45px;
    font-size: 10px;
    float: right;
    cursor: pointer;
}

a{
    cursor: pointer;
}

td, th, .cursor{
    cursor: pointer;
}

.pure-table{
    border-radius: 5px;
}

.link-home{
    margin-left: 40px;
    margin-top: -54px;
    font-size: 32px;
}

.pure-menu-list{
    width: 98%;
}

.card-image{
    padding: 5px;
    text-decoration: none;
    /* remove underline */
    color: #272727;
}

.card:hover{
    border: 1px solid #272727;
    border-radius: 5px;
}

.card{
    margin-top:15px;
    padding: 5px;
}

.card-image img{
    margin: 0 auto;
    display: block;
    border-radius: 5px;
}

.card-image h2{
    text-align: center;
    color: #272727;
}

.row{
    padding: 15px;
}

body{
    background-color: #99999917;
    max-width: 100%;
}

.img-center{
    display: block;
    margin: 0 auto;
}

.clearfix{
    clear: both;
    width: 100%;
}

.app-name{
    color:#000;
    text-decoration: none;
    font-size: 32px;
}

.login-page{
    background-image: url(../ico/background.jpg?ver=2);
    background-size: cover;
    background-repeat: no-repeat;
}

.no-padding{
    padding: 0!important;
}

.no-margin{
    margin: 0!important;
}

.pure-menu-image{
    color: transparent!important;
}

input[type="search"]{
    width: 80%;
    font-size: 1rem;
}

.search-results{
    max-height: 300px;
    overflow-y: scroll;
    overflow-x: hidden;
    position: fixed;
    z-index: 999;
    margin: 0 auto;
    padding:10px;
    align-items: center;
    justify-content: center;
    background-color: #e1e1e1;
    border-radius: 5px;
    box-shadow: 0 0 10px rgb(0, 0, 0);
    margin-top: 15px;
    width: 80%;
    
}

.search-result{
    border-bottom: 1px solid #000;
    padding: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* search-results scrollbar */
::-webkit-scrollbar {
    width: 6px;
  }

  ::-webkit-scrollbar-track {
    background: lightgrey;
  }

  ::-webkit-scrollbar-thumb {
    background-color: darkgray;
    border-radius: 6px;
  }

  /* For Firefox */
  /* Note: Firefox supports scrollbar customization in version 64 and above */
  /* You might need to use the -moz- prefix for older versions */
  /* For the latest version, this may not be necessary */
  * {
    scrollbar-width: thin;
    scrollbar-color: darkgray lightgrey;
  } 


::-moz-scrollbar-button:decrement,
::-moz-scrollbar-button:increment,
::-webkit-scrollbar-button:decrement,
::-webkit-scrollbar-button:increment {
    display: none !important;
}


::-moz-scrollbar-button, ::-webkit-scrollbar-button {
    display:none !important;
  }

  .search-result:focus {
    border: 2px solid #000
}

tr:focus {
    border: 2px solid #000
}

.cart-odd{
    background-color: #e1e7f7;
}

.sticky{
    position: fixed;
    z-index: 999;
    width: 100%;
}

.top-zero{
    top: 0;
}

.cart-top{
    background-color: #a3b6dd;
    margin-top: -20px;
    color: #000;
}

.cart-bottom{
    bottom: 0;
    background-color: #a3b6dd;
    color: #000;
}

.table-cart{
    margin-top: 170px;
    margin-bottom: 300px;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.text-right{
    text-align: right;
}

#preview{
    height: 110px;
    z-index: -99;
    background-color: transparent;
    padding: 0px; 
    color: transparent;
}
.qty{
    width: 100px!important;

}

.qty::-webkit-inner-spin-button,
.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove number input arrows in Firefox */
.qty {
    -moz-appearance: textfield;
}

#product_name , #description{
    font-size: 0.8rem;
}

.cart-select{
    width:80%;
    max-width: 200px;
}

.kbd{
    font-size: 0.8rem;
}
kbd{
    background-color: #00000080;
    color: #fff;
    padding: 2px 5px;
    border-radius: 5px;
    outline: 2px solid #000;
    margin-left: 3px;
    margin-right: 3px;
}


/* less then sm */

@media screen and (max-width: 1024px) {
.kbd-join, kbd{
    display: none;
   }
}

.no-text{
    color: transparent!important;
    font-size: 0!important;
    display: none;
}


.htmx-indicator{
    opacity:0;
    transition: opacity 500ms ease-in;
}
.htmx-request .htmx-indicator{
    opacity:1;
}
.htmx-request.htmx-indicator{
    opacity:1;
}

.small-text{
    font-size: 0.8rem;
}

/* make horizotal scroll */
#list{
    width: 100%;
    overflow-x: scroll;
}

#list::-webkit-scrollbar {
    width: 0px;
  }

  /* For Firefox */
  * {
    scrollbar-width: none;
  } 

  /* For Chrome */
  *::-webkit-scrollbar {
    display: none;
  }

#list table{
    width: 98%;
}


/* make horizotal scroll */
.list{
    width: 100%;
    overflow-x: scroll;
}

.list::-webkit-scrollbar {
    width: 0px;
  }

  /* For Firefox */
  * {
    scrollbar-width: none;
  } 

  /* For Chrome */
  *::-webkit-scrollbar {
    display: none;
  }

.list table{
    width: 98%;
}

.number-xs{
    width: 100px;
}

.scrollable-table{
    max-height: 400px;
    overflow-y: scroll;
}

/* scroll bar to table */
.scrollable-table::-webkit-scrollbar {
    width: 6px;
  }
  
  .scrollable-table::-webkit-scrollbar-track {
    background: lightgrey;
  }
  
  .scrollable-table::-webkit-scrollbar-thumb {
    background-color: darkgray;
    border-radius: 6px;
  }
  
  /* For Firefox */
  .scrollable-table {
    scrollbar-width: thin;
    scrollbar-color: darkgray lightgrey;
  } 

  /* For Chrome */
  .scrollable-table::-webkit-scrollbar {
    display: none;
  }

  .progress-bar {
  width: 100px;
  background-color: #eee;
  border-radius: 8px;
  overflow: hidden;
  height: 20px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.5);;
}

.progress {
  height: 100%;
  background-color: rgba(30, 144, 255, 0.3); /* Light blue */
  width: 0%;
  transition: width 0.3s ease-in-out;
}

.w-10 { width: 10%; }
.w-20 { width: 20%; }
.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-80 { width: 80%; }
.w-90 { width: 90%; }
.w-100 { width: 100%; }

/* Dropdown Menu Styles */
.main-nav-dropdown {
    position: relative;
}

.main-nav-dropdown .pure-menu-link {
    display: flex;
    align-items: center;
}

.menu-icon {
    font-size: 1.8em;
    color:#272727;
}

.menu-text {
    font-weight: 500;
}

.main-nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    min-width: 260px;
    max-height: min(80vh, 600px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    /* Smooth scrolling */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Custom scrollbar for webkit browsers */
.main-nav-menu::-webkit-scrollbar {
    width: 6px;
}

.main-nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.main-nav-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.main-nav-menu::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.main-nav-menu .pure-menu-item {
    border-bottom: none;
}

.main-nav-menu .pure-menu-link {
    display: flex;
    align-items: center;
    padding-top: 0.75em;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 0.9em;
    line-height: 1.3;
}

.main-nav-menu .pure-menu-link:hover {
    background-color: #f8f9fa;
    font-weight: bold;
}

.menu-icon-small {
    width: 14px;
    height: 14px;
    margin-right: 0.6em;
    object-fit: contain;
}

.menu-section-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
}

.menu-section-title {
    display: block;
    padding: 0.4em 0.75em;
    font-weight: 700;
    font-size: 1em;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .pure-menu-list {
        position: relative;
    }
    
    .main-nav-dropdown .menu-text {
        display: none;
    }
    
    .menu-icon {
        margin-right: 0;
        font-size: 1.4em;
    }
    
    .main-nav-menu {
        position: fixed;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        min-width: 320px;
        width: min(90vw, 400px);
        max-width: calc(100vw - 20px);
        max-height: min(85vh, calc(100vh - 70px));
        border-radius: 8px;
        margin: 0 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    }
    
    .main-nav-menu .pure-menu-link {
        padding: 0.75em;
        font-size: 1em;
    }
    
    .menu-icon-small {
        width: 18px;
        height: 18px;
        margin-right: 0.8em;
    }
    
    .menu-section-title {
        padding: 0.6em 0.75em;
        font-size: 0.9em;
    }
    
    /* Ensure dropdown has proper border on mobile */
    .main-nav-menu {
        border: 1px solid #ddd;
        border-radius: 8px;
    }
}

/* Tablet specific styles */
@media (max-width: 768px) and (min-width: 481px) {
    .main-nav-menu {
        min-width: 350px;
        width: min(85vw, 450px);
        max-height: min(80vh, calc(100vh - 70px));
    }
    
    .main-nav-menu .pure-menu-link {
        padding: 0.8em;
        font-size: 1.05em;
    }
    
    .menu-icon-small {
        width: 20px;
        height: 20px;
        margin-right: 0.9em;
    }
}

@media (max-width: 480px) {
    .main-nav-menu .pure-menu-link {
        padding: 0.6em;
        font-size: 0.95em;
    }
    
    .menu-icon-small {
        width: 16px;
        height: 16px;
        margin-right: 0.6em;
    }
    
    .menu-section-title {
        padding: 0.5em 0.6em;
        font-size: 0.85em;
    }
    
    /* Adjust dropdown size for landscape orientation on mobile */
    .main-nav-menu {
        min-width: 280px;
        width: min(80vw, 350px);
        max-height: min(85vh, calc(100vh - 60px));
    }
}

/* Landscape mobile adjustments */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .main-nav-menu {
        position: fixed;
        top: 50px;
        max-height: min(90vh, calc(100vh - 50px));
        width: min(70vw, 300px);
    }
    
    .main-nav-menu .pure-menu-link {
        padding: 0.4em 0.6em;
        font-size: 0.9em;
    }
    
    .menu-icon-small {
        width: 14px;
        height: 14px;
        margin-right: 0.5em;
    }
    
    .menu-section-title {
        padding: 0.3em 0.6em;
        font-size: 0.8em;
    }
}

/* Fix for dropdown positioning on smaller screens */
@media (max-width: 1024px) and (min-width: 769px) {
    .main-nav-menu {
        min-width: 240px;
        max-height: min(75vh, 500px);
    }
}

/* Additional height-based adjustments */
@media screen and (min-height: 900px) {
    .main-nav-menu {
        max-height: min(70vh, 700px);
    }
}

@media screen and (max-height: 600px) and (orientation: portrait) {
    .main-nav-menu {
        max-height: min(75vh, calc(100vh - 60px));
    }
}

/* Additional positioning fixes */
.main-nav-dropdown {
    position: relative;
}

/* Ensure dropdown stays within viewport bounds */
.main-nav-menu {
    /* Add scroll behavior for better UX */
    scroll-behavior: smooth;
}

/* Prevent dropdown from going off right edge */
@media (min-width: 769px) {
    .main-nav-dropdown:last-child .main-nav-menu,
    .float-right .main-nav-menu {
        right: 0;
        left: auto;
    }
}

/* Compact dropdown items */
.main-nav-menu .pure-menu-item:last-child .pure-menu-link {
    border-bottom: none;
}

/* Ensure dropdown works on touch devices */
@media (hover: none) and (pointer: coarse) {
    .pure-menu-has-children:hover .pure-menu-children {
        display: none;
    }
    
    .pure-menu-has-children.menu-active .pure-menu-children {
        display: block;
    }
}

/* Active state for dropdown toggle */
.main-nav-dropdown.menu-active .pure-menu-link {
    background-color: #f0f0f0;
}

/* Ensure dropdown children are hidden by default */
.pure-menu-has-children .pure-menu-children {
    display: none;
    padding: 5px;
    margin-left: -30px;
}

/* Show dropdown children on hover (desktop) */
.pure-menu-has-children:hover .pure-menu-children,
.pure-menu-has-children.menu-active .pure-menu-children {
    display: block;
}

/* Dashboard Styles */
.dashboard-welcome {
    text-align: center;
    padding: 2em 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-bottom: 2em;
    border-radius: 8px;
}

.dashboard-welcome h1 {
    color: #333;
    margin-bottom: 0.5em;
    font-size: 2.5em;
    font-weight: 300;
}

.dashboard-welcome p {
    color: #666;
    font-size: 1.2em;
    margin: 0;
}

.dashboard-stats {
    margin-bottom: 3em;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1em;
    display: flex;
    align-items: center;
    gap: 1em;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    margin: 0 0 0.5em 0;
    color: #333;
    font-size: 1.5em;
    font-weight: 500;
}

.stat-content p {
    margin: 0 0 0.75em 0;
    color: #666;
    font-size: 0.95em;
}

.stat-link {
    font-weight: bold;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.stat-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.dashboard-quick-actions {
    margin-top: 3em;
}

.dashboard-quick-actions h3 {
    color: #333;
    margin-bottom: 1.5em;
    font-size: 1.75em;
    font-weight: 500;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5em;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    margin-bottom: 1em;
    font-weight: 500;
    font-size: 1.1em;
}

.quick-action-btn:hover {
    border-font-weight: bold;
    background: #f8f9ff;
    font-weight: bold;
    transform: translateY(-1px);
}

.quick-action-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Responsive adjustments for dashboard */
@media (max-width: 768px) {
    .dashboard-welcome h1 {
        font-size: 2em;
    }
    
    .dashboard-welcome p {
        font-size: 1em;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75em;
    }
    
    .stat-icon-img {
        width: 40px;
        height: 40px;
    }
    
    .stat-content h3 {
        font-size: 1.25em;
    }
    
    .quick-action-btn {
        flex-direction: column;
        gap: 0.5em;
        padding: 1.25em;
        font-size: 1em;
    }
    
    .quick-action-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .dashboard-welcome {
        padding: 1.5em 1em;
        margin-bottom: 1.5em;
    }
    
    .dashboard-welcome h1 {
        font-size: 1.75em;
    }
    
    .stat-card {
        padding: 1.25em;
    }
    
    .stat-content h3 {
        font-size: 1.1em;
    }
    
    .quick-action-btn {
        padding: 1em;
        font-size: 0.95em;
    }
}

/* Badge styles for logs */
.badge {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: white;
}

.badge-info { background-color: #17a2b8; }
.badge-success { background-color: #28a745; }
.badge-warning { background-color: #ffc107; color: #212529; }
.badge-danger { background-color: #dc3545; }
.badge-secondary { background-color: #6c757d; }

/* Log table styles */
.log-uri {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.log-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.log-modal-header {
    padding: 15px 20px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-modal-header h2 {
    margin: 0;
}

.log-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.log-modal-footer {
    padding: 15px 20px;
    background-color: #f1f1f1;
    border-top: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.json-container {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.json-pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.d-none{
    display: none!important;
}