body{
    margin: 0;
    font-family: 'Cabinet Grotesk', sans-serif;
    background-color: #F7F2EB;
    color: #3A3A3A;
    font-weight: 300;
}
*,
*:before,
*:after {
-webkit-box-sizing: revert;
    -moz-box-sizing: revert;
        box-sizing: revert;
}

.error-container{
    color: red;
}
.block{
    border: solid 1px black;
    margin: 10px;
    padding: 10px;
}
.info{
    font-size: 14px;
    font-style: italic;
}

.container {
    margin: auto;
    width: 100%;
    max-width: 600px;
}
.modal-contents{
    text-align: left;
}
.modal-header{
    text-align: right;
    display: block;
}
.button-panel{
    text-align: center;
    display: flex;
}
.button-panel > button {
    margin-right: 10px;
}
button{
    margin-top: 5px;
}
th, td {
    border: 1px solid;
    padding: 10px;

}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.benefit{
    width: 400px;
}

.category-mapping-data{
    height: 400px;
    overflow-y: scroll;
}

.category-mapping{
    display: flex;
    width: 700px;
}

.category-mapping > div {
    margin: 10px;
    padding: 10px;
    max-width: 500px;
    overflow: auto;
}
.category-container{
    text-align: left;
    margin-bottom: 50px;
}
.benefit{
    height: 210px;
}
.staged-for-removal{
  color: lightgray;
}
.categories-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Dynamic grid with fixed square size */
    gap: 10px; /* Space between squares */
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    background-color: #F7F2EB;
}
.edit-mapping-btn{
  margin: 10px;
  width: 80px;
}
.benefits-container{
overflow-y: scroll;
max-height: 300px;
}
.unmapped-benefits-view{
margin-bottom: 40px; 
}

.product-mapping-view{
    text-align: left;
    margin: 5px;
}
.product-table-container{
    overflow-y: scroll;
    max-height: 300px;
    height: 300px;
    width: 700px;
    }
td{
    max-width: 150px;
    word-wrap: break-word;
}
.modal-body{
    overflow-y: scroll;
    max-height: 350px;  
    height: 350px;
    width: 500px;
}

@media only screen and (max-width: 500px) {
    .modal-body {
        width: 320px;
    }
}

.order-management-benefit{
    border-bottom: solid 1px gray;
    margin-bottom: 20px;
}

.order-management-benefit:last-child{
    border-bottom: 0px
}

.order-management-benefit>h4{
    background-color: pink;
}
.center{
    margin-left: auto;
    margin-right: auto;
}

.product-img-container{
    background-repeat:  no-repeat;
    background-size: contain;
    background-position: center;
    width: 100px;
    height: 100px;
}

.product-mapping-view  .product{
    display: grid;
    grid-template-columns: 120px auto;
    border-bottom: solid 1px gray;
}

.product-mapping-view .product-details{
    width: 300px;
}

.arrow {
    border: solid black;
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 3px;
  }
.up {
transform: rotate(-135deg);
-webkit-transform: rotate(-135deg);
}

.down {
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
.expand-icon{
position: absolute;
right: 20px;
top: 20px;
}

.section-bar{
    position: relative;
    background-color: lightgray;
    padding: 10px;
    margin-bottom: 3px;
}

.product-mapping-view.unmapped{
    border: solid 2px #e8806d;
}

.product-mapping-view .unmapped-msg{
    padding: 10px;
}

.unmapped-tag{
    text-transform: uppercase;
    background-color:#e8806d;
    padding: 3px;
    margin-bottom: 5px;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    width: fit-content;
    margin-left: 10px;
}

.hidden{
    display: none;
}
.padded{
    padding: 10px;
}

td.submitted{
    background-color: lightyellow;
}

td.failed{
    background-color: #e8806d;
}

td.no-show{
    background-color: lightgray;
}

td.cancelled{
    background-color: rgb(249, 140, 119);
}

td.complete{
    background-color: lightgreen;
}
td.confirmed{
    background-color: lightblue;
}
td.ready-for-pickup{
    background-color: cyan;
}
.manage-order-container{
    padding: 10px;
}
.manage-order-container>button{
    margin: 5px;
}


.sms{
    margin: 10px;
    margin-top: 30px;
}

.sms .sms-sender{
    font-weight: bold;
}

.sms .sms-info{
    text-transform: uppercase;
    font-size: 12px;
    padding: 2px;
}

.sms .sms-info span{
    padding: 2px;
}

.sms.outgoing .sms-info{
    text-align: right;
}

.sms .sms-body{
    background-color: #E6E6FA;
    border-radius: 5px;
    padding: 10px;
}
.sms.outgoing{
    margin-left: 30px;
}
.sms .status{
    color:#B33A3A;
    display: inline-block;
    padding: 0px 5px;
    font-weight: bold;
}

.sms.incoming .sms-body{
    background-color: #363636; 
    color: white;
}

.tool-documentation-info{
    text-align: left;
    padding: 10px;
    background-color: lightgray;
}

.tool-name-container{
    padding: 15px;
    background-color: black;
    color: white;
    position: relative;
    height: 30px;
}

.tool-copy-button-container{
    position: absolute;
    top: 0px;
    right: 0px; 
    padding: 5px;
}

.tool-command-input{
    width: 100%;
}
.tool-error{
    color: red;
}

.localized-string-editor{
    border: solid 1px black;
    text-align: left;
    width: 400px;
    padding: 20px;
    margin: 20px auto;
}

.localized-string-editor textarea{
    width: 100%;
}

.untranslated{
    background-color: #B33A3A;
    text-transform: uppercase;
    width: 100px;
    padding: 5px;
    color: white;
    font-size: 10px;
    text-align: center;
}

.final-shopping-list{
    padding: 20px;
    border: solid;
    margin-bottom: 20px;
}

.final-shopping-list input[type=checkbox]{
    width: 50px;
}
.shopping-list-item{
    border: solid 1px gray;
    padding: 10px;
    display: flex;
    border-radius: 5px;
    margin: 10px;
}
.shopping-list-item-desc{
    margin: auto;
}

.tag-option{
    padding: 10px;
    margin: 10px;
    display: inline-block;
    border-radius: 5px;
}

.tag-option.selected{
    background-color: gray;
}

.untranslated-filter-container{
    padding: 10px 0px;
    display: flex;
    justify-content: center;
}

.untranslated-filter-container .checkbox-label{
    padding-top: 5px;
    padding-left: 5px;
}


/* Category mapping banner */
.category-mapping .banner {
    margin-bottom: 10px;
    position: relative;
    height: 175px;
    width: 350px;
}

.category-mapping .banner .banner-text{
    position: absolute;
    padding: 10px;
    color: white;
    top: 70px;
    font-size: 16px;
    font-family: 'Cabinet Grotesk', sans-serif;
    font-style: normal;
    font-weight: 300;
    user-select: none;
    line-height: normal;
}

.category-mapping .banner .banner-text .title{
    font-size: 36px;
    font-family: 'Cabinet Grotesk', sans-serif;
}

.category-mapping .banner .banner-background{
    border-radius: 8px;
    filter: brightness(50%);
    background-color: #E4DFD9;
    height: 100%;
    width: 100%;
    position: absolute;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.content-editor-grid{
    display: grid;
    grid-template-columns: auto 500px;
}

.content-editor-grid>div:first-child{
    padding: 20px;
}

.content-editor-grid>div:last-child{
    width: 390px;
}

.content-editor-grid>div:last-child>div:last-child{
    background-color: #F7F2EB;
}

.content-editor-grid textarea{
    width: 100%;
    height: 500px;
    margin: 0px;
}
.content-editor-grid button{
    margin: 5px;
}

.flex{
    display: flex;
}

.resource-editor-docs h3{
    background-color: lightgray;
}

.resource-editor-docs .flex>div{
    padding: 20px;
}

.resource-editor-docs .flex>div:last-child{
    border: dashed 1px black;
}

.resource-editor-docs textarea{
    width: 100%;
    height: 300px;
    background-color: black;
    color: white;
}

.rendered-content-container{
    background-color: #F7F2EB;
    width: 390px;
    padding: 10px 0px 10px 0px;

}

.sql-dash .query-container{
    display: flex;
    border: dashed 1px gray;
    margin: 20px;
}
.sql-dash .query-container div{
    padding: 20px;
}

.sql-dash .result-container{
    overflow: scroll;
    height: 300px;
}

.sql-dash .query-editor input {
    border: 0px;
    border-bottom: solid 1px gray;
    width: 400px;
    text-align: left;
}
.sql-dash .query-container textarea{
    width: 400px;
    height: 200px;
}
.sql-dash .query-editor-button-panel{
    width: 400px;
    display: flex;
}
.sql-dash .query-editor-button-panel button{
    margin-right: 20px;
}

.loading-component{
    text-align: center;
    margin-top: 20px;
}

.benefit-mapping-view{
    text-align: left;
}

.benefit-mapping-view .section-bar{
    margin-bottom: 2px;
    text-align: center;
}

.benefit-mapping-view .expandable-section .expandable-section{
    margin-left: 10px;
    margin-right: 10px;
}

.benefit-mapping-view  .section-bar{
    background-color: darkgray;
}

.benefit-mapping-view .expandable-section .expandable-section .section-bar{
    background-color: lightgray;
}

.usda-sub-category > div{
    padding: 20px 0px;
    border-bottom: dashed 1px gray;
}

.usda-sub-category span.slug{
    font-size: 14px;
    background-color: lightgray;
    padding: 2px;
    border-radius: 2px;
}

.usda-sub-category span.divider{
    color: lightgray;
}

.sql-dash .query-container .download-btn-container{
    width: 100%;
    padding: 10px 0px;
    text-align: left;
}

.product-mapping-modal{
    padding: 20px;
    overflow: scroll;
    height: 540px;
}

.product-mapping-modal table tbody tr img{
    width: 60px;
}

.product-mapping-modal table {
    text-align: left;
    position: relative;
  }

.product-mapping-modal table  th {
    position: sticky;
    top: 0;
    background-color: white;
  }

.product-mapping-modal #table-container{
    height: 460px;
    overflow: auto;
}

.product-mapping-modal table input[type=checkbox]{
    width: 30px;
    height: 30px;
}

.product-mapping-modal .buttons-container{
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.product-mapping-modal  .disclaimer{
    color: red;
}

.product-mapping-modal  table a{
    font-size: 12px;
    text-transform: uppercase;
}

/* ================================= */
/* NEW ADMIN LAYOUT STYLES */
/* ================================= */

/* Admin Layout Container */
.admin-layout {
    display: flex;
    height: 100vh;
    background-color: #F7F2EB;
}

/* Sidebar Navigation */
.admin-sidebar {
    width: 250px;
    background: #014921;
    color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.2);
}

.admin-sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Cabinet Grotesk', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
    position: relative;
}

.admin-nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.admin-nav-item.active .admin-nav-link {
    background: rgba(255,255,255,0.15);
    color: white;
    border-right: 3px solid #AFC689;
}

.admin-nav-link i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.admin-nav-link .external-icon {
    margin-left: auto;
    font-size: 10px;
    opacity: 0.7;
}

/* Main Content Area */
.admin-main-content {
    flex: 1;
    overflow-y: auto;
    background: #FFFEFC;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

/* Dashboard Styles */
.admin-dashboard h1 {
    color: #3A3A3A;
    margin-bottom: 10px;
    text-align: left;
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 400;
}

.dashboard-welcome {
    background: rgba(175, 198, 137, 0.2);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #014921;
}

.dashboard-welcome p {
    margin: 0;
    color: #3A3A3A;
    text-align: left;
    font-size: 16px;
}

/* Dashboard Statistics */
.dashboard-stats {
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #FFFEFC;
    border: 1px solid #3A3A3A;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2em;
    color: #014921;
    min-width: 60px;
    text-align: center;
}

.stat-content h3 {
    color: #3A3A3A;
    margin: 0 0 5px 0;
    font-size: 1.8em;
    font-weight: 700;
}

.stat-content p {
    color: #3A3A3A;
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9em;
}

.stat-content small {
    color: #666;
    font-size: 0.8em;
    display: block;
    margin-top: 2px;
}

/* Failed Accounts Section */
.failed-accounts-section {
    background: rgba(244, 135, 34, 0.1);
    border: 1px solid #F48722;
    border-radius: 8px;
    padding: 20px;
    margin: 0; /* Reset margin since it's now in a column layout */
    height: fit-content;
}

.failed-accounts-section h3 {
    color: #3A3A3A;
    margin: 0 0 15px 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.failed-accounts-section h3 i {
    color: #F48722;
}

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

.failed-account-item {
    background: #FFFEFC;
    border: 1px solid #3A3A3A;
    border-radius: 6px;
    padding: 15px;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.info-icon-button {
    margin-left: auto;
    color: #014921;
    text-decoration: none;
    font-size: 16px;
}

.info-icon-button:hover {
    color: #F48722;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.link-failed {
    background: rgba(244, 135, 34, 0.2);
    color: #F48722;
}

.status-badge.pending-investigation {
    background: rgba(255, 0, 0, 0.2);
    color: #CC0000;
}

.account-error {
    color: #666;
    font-size: 0.9em;
    font-family: monospace;
    background: rgba(0,0,0,0.05);
    padding: 8px;
    border-radius: 4px;
    margin: 8px 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.account-timestamp {
    color: #666;
    font-size: 0.8em;
}

/* Dashboard Links */
.user-link {
    color: #014921;
    text-decoration: none;
    font-weight: bold;
}

.user-link:hover {
    color: #F48722;
    text-decoration: underline;
}

.status-link {
    color: #014921;
    text-decoration: none;
}

.status-link:hover {
    color: #F48722;
    text-decoration: underline;
}

/* Time Display */
.absolute-time {
    font-size: 0.75em;
    color: #666;
    font-weight: normal;
    margin-top: 2px;
}

/* Dashboard Bottom Layout - Two Column */
.dashboard-bottom-layout {
    display: flex;
    gap: 25px;
    margin-top: 20px;
    align-items: flex-start;
}

.dashboard-left-column {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.dashboard-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Quick Stats Tables */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.quick-stat-table {
    background: #FFFEFC;
    border: 1px solid #3A3A3A;
    border-radius: 8px;
    padding: 15px;
}

.quick-stat-table h4 {
    color: #3A3A3A;
    margin: 0 0 15px 0;
    font-weight: 700;
    font-family: 'Cabinet Grotesk', sans-serif;
}

.quick-stat-table table {
    width: 100%;
    border-collapse: collapse;
}

.quick-stat-table td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(58, 58, 58, 0.1);
    color: #3A3A3A;
}

.quick-stat-table td:first-child {
    text-transform: capitalize;
    font-weight: 500;
}

.quick-stat-table td:last-child {
    text-align: right;
    font-weight: 700;
}

.quick-stat-table tr:last-child td {
    border-bottom: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Responsive Dashboard Layout */
@media (max-width: 1024px) {
    .dashboard-bottom-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .dashboard-left-column,
    .dashboard-right-column {
        flex: none;
        width: 100%;
    }
    
    .dashboard-right-column {
        gap: 15px;
    }
}

.dashboard-card {
    background: #FFFEFC;
    border: 1px solid #3A3A3A;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.dashboard-card i {
    font-size: 2.5em;
    color: #014921;
    margin-bottom: 15px;
}

.dashboard-card h3 {
    color: #3A3A3A;
    margin: 10px 0;
    font-size: 1.2em;
    font-weight: 700;
}

.dashboard-card p {
    color: #3A3A3A;
    font-size: 0.9em;
    line-height: 1.4;
    margin: 0;
}

/* Login Page Styles */
.admin-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #F7F2EB;
    padding: 20px;
}

.admin-login-card {
    background: #FFFEFC;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #3A3A3A;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.admin-login-card h1 {
    color: #3A3A3A;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 400;
}

.admin-login-card form {
    text-align: left;
}

.admin-login-card label {
    display: block;
    margin-bottom: 8px;
    color: #3A3A3A;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
}

.admin-login-card input[type="password"] {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #3A3A3A;
    border-radius: 8px;
    background-color: #FFFEFC;
    font-size: 18px;
    margin-bottom: 20px;
    color: #3A3A3A;
}

.admin-login-card button {
    text-transform: uppercase;
    color: white;
    font-size: 18px;
    font-weight: 700;
    width: 100%;
    height: 59px;
    margin: auto;
    display: block;
    border: 0px;
    background-color: #014921;
    border-radius: 8px;
    letter-spacing: .10em;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.admin-login-card button:hover {
    opacity: 0.9;
}

/* Loading Styles */
.admin-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #F7F2EB;
    color: #3A3A3A;
    font-size: 18px;
    gap: 10px;
}

.admin-loading i {
    font-size: 24px;
    color: #014921;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
    }
    
    .admin-main-content {
        margin: 10px;
        padding: 15px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* SQL Interface Styles */
.sql-interface h1 {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 400;
    color: #3A3A3A;
    margin-bottom: 20px;
}

.sql-interface-layout {
    display: flex;
    gap: 25px;
    min-height: calc(100vh - 200px);
    margin-top: 20px;
}

.left-panel {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
}

.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

@media (max-width: 1200px) {
    .sql-interface-layout {
        flex-direction: column;
        min-height: auto;
    }
    
    .left-panel {
        width: 100%;
        order: 2;
        max-height: 400px;
        overflow-y: auto;
    }
    
    .main-panel {
        order: 1;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    .query-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .search-control,
    .limit-control {
        align-self: flex-start;
    }
    
    .search-control .search-input {
        width: 200px;
    }
}

.query-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: #3A3A3A;
    margin-bottom: 8px;
}

.form-group textarea {
    width: calc(100% - 24px);
    min-height: 140px;
    padding: 15px;
    border: 1px solid rgba(1, 73, 33, 0.3);
    border-radius: 10px;
    background-color: #FFFEFC;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 14px;
    color: #3A3A3A;
    resize: vertical;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    line-height: 1.5;
}

.form-group textarea:focus {
    outline: none;
    border-color: #014921;
    box-shadow: 0 2px 8px rgba(1, 73, 33, 0.2);
    transform: translateY(-1px);
}

.query-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.search-control {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.search-control label {
    font-size: 14px;
    font-weight: 600;
    color: #3A3A3A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-control .search-input {
    width: 180px;
    padding: 8px 10px;
    border: 1px solid rgba(1, 73, 33, 0.3);
    border-radius: 6px;
    background-color: #FFFEFC;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 13px;
    color: #3A3A3A;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-control .search-input:focus {
    outline: none;
    border-color: #014921;
    box-shadow: 0 2px 6px rgba(1, 73, 33, 0.2);
    transform: translateY(-1px);
}

.search-control .search-input:disabled {
    opacity: 0.6;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.search-control .search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-control .clear-search {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    padding: 2px;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.search-control .clear-search:hover {
    background: rgba(1, 73, 33, 0.1);
    color: #014921;
}

.limit-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.limit-input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid rgba(1, 73, 33, 0.3);
    border-radius: 6px;
    background-color: #FFFEFC;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 13px;
    color: #3A3A3A;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.limit-input:focus {
    outline: none;
    border-color: #014921;
    box-shadow: 0 2px 6px rgba(1, 73, 33, 0.2);
    transform: translateY(-1px);
}

.reset-limit-btn {
    background: rgba(1, 73, 33, 0.1);
    border: 1px solid rgba(1, 73, 33, 0.3);
    color: #014921;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.reset-limit-btn:hover {
    background: rgba(1, 73, 33, 0.2);
    border-color: #014921;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(1, 73, 33, 0.2);
}

.reset-limit-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(1, 73, 33, 0.2);
}

/* User links in SQL results */
.user-link {
    color: #014921;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 3px;
    padding: 2px 4px;
    display: inline-block;
}

.user-link:hover {
    background: rgba(1, 73, 33, 0.1);
    color: #0A5A2E;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(1, 73, 33, 0.15);
}

.user-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(1, 73, 33, 0.2);
}

.limit-control label {
    font-size: 14px;
    font-weight: 600;
    color: #3A3A3A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.limit-input {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid rgba(1, 73, 33, 0.3);
    border-radius: 6px;
    background-color: #FFFEFC;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 14px;
    color: #3A3A3A;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.limit-input:focus {
    outline: none;
    border-color: #014921;
    box-shadow: 0 2px 6px rgba(1, 73, 33, 0.2);
    transform: translateY(-1px);
}

.limit-input::-webkit-outer-spin-button,
.limit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.limit-input[type=number] {
    -moz-appearance: textfield;
}

.sql-interface .btn {
    text-transform: uppercase;
    color: white;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 28px;
    border: none;
    background: linear-gradient(135deg, #014921, #0a5a2a);
    border-radius: 10px;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(1, 73, 33, 0.3);
    position: relative;
    overflow: hidden;
}

.sql-interface .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.sql-interface .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(1, 73, 33, 0.4);
}

.sql-interface .btn:hover::before {
    left: 100%;
}

.sql-interface .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(1, 73, 33, 0.3);
}

.sql-interface .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(1, 73, 33, 0.2);
}

.sql-interface .btn:disabled::before {
    display: none;
}

/* Relink button and actions column styles */
.actions-header {
    background: linear-gradient(135deg, #014921, #0a5a2a) !important;
    color: white !important;
    text-align: center !important;
    cursor: default !important;
}

.actions-cell {
    text-align: center;
    padding: 8px !important;
}

.relink-btn {
    background: linear-gradient(135deg, #d4a574, #b8956a);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.relink-btn:hover {
    background: linear-gradient(135deg, #b8956a, #a0855f);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.relink-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.error-container {
    background: rgba(244, 135, 34, 0.2);
    border: 1px solid #F48722;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #3A3A3A;
}

/* Tables List Styles */
.tables-list {
    padding: 12px;
    border: 1px solid #3A3A3A;
    border-radius: 8px;
    background: #FFFEFC;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tables-list h3 {
    color: #3A3A3A;
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 10px 0;
    border-bottom: 2px solid #014921;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tables-list h3::before {
    content: "🗂️";
    font-size: 14px;
}

.table-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.table-link {
    padding: 5px 8px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #014921;
    background: none;
    border: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    min-height: 24px;
    overflow: visible;
    flex-wrap: wrap;
}

.table-link:hover:not(:disabled) {
    background: rgba(1, 73, 33, 0.08);
    color: #0a5a2a;
}

.table-link:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.table-link .table-icon {
    font-size: 10px;
    flex-shrink: 0;
    width: 14px;
}

.table-link .table-name {
    flex: 1 1 auto;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 11px;
    text-decoration: underline;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    min-width: 100%;
}

.table-link .table-count {
    font-size: 10px;
    color: #666;
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 0;
    white-space: nowrap;
}

/* Custom scrollbar for tables list */
.tables-list::-webkit-scrollbar {
    width: 6px;
}

.tables-list::-webkit-scrollbar-track {
    background: rgba(175, 198, 137, 0.1);
    border-radius: 3px;
}

.tables-list::-webkit-scrollbar-thumb {
    background: rgba(1, 73, 33, 0.3);
    border-radius: 3px;
}

.tables-list::-webkit-scrollbar-thumb:hover {
    background: rgba(1, 73, 33, 0.5);
}







.results-container {
    margin-top: 20px;
    background: #FFFEFC;
    border: 1px solid rgba(1, 73, 33, 0.2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.results-container h3 {
    color: #014921;
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 22px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-container h3::before {
    content: "📊";
    font-size: 18px;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    text-align: left;
    border: none;
    color: #3A3A3A;
}

.results-table th {
    background: linear-gradient(135deg, #014921, #0a5a2a);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.results-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

.results-table th.sortable:hover {
    background: linear-gradient(135deg, #0a5a2a, #014921);
}

.results-table th.sorted-asc,
.results-table th.sorted-desc {
    background: linear-gradient(135deg, #0a5a2a, #136b39);
}

.sort-indicator {
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.7;
}

.results-table th.sortable:hover .sort-indicator {
    opacity: 1;
}

.results-table td {
    border-bottom: 1px solid rgba(1, 73, 33, 0.1);
    font-size: 13px;
    vertical-align: top;
}

.results-table tr:nth-child(even) {
    background-color: rgba(175, 198, 137, 0.05);
}

.results-table tr:hover {
    background-color: rgba(175, 198, 137, 0.1);
    transition: background-color 0.2s ease;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    font-size: 16px;
}



.no-results {
    text-align: center;
    padding: 40px;
    color: #3A3A3A;
    font-style: italic;
}

/* Override container styles for new layout */
.admin-layout .container {
    margin: 0;
    max-width: none;
    width: 100%;
}