:root {
    --qhse-bg-main: #f1f5f9; 
    --qhse-card-bg: #ffffff; 
    --qhse-border: #cbd5e1;
    --qhse-text-main: #0f172a; 
    --qhse-text-muted: #475569; 
    --qhse-primary: #1d4ed8;
    --qhse-success: #16a34a;
    --qhse-radius: 8px; 
    --qhse-shadow: 0 4px 6px -1px rgba(0,0,0,0.08);
}

#qhse-lift-app, .qhse-workspace {
    background: var(--qhse-bg-main); 
    border: 1px solid var(--qhse-border);
    border-radius: var(--qhse-radius); 
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--qhse-text-main); 
    box-sizing: border-box; 
    box-shadow: var(--qhse-shadow);
}

#qhse-lift-app * { 
    box-sizing: border-box; 
}

.qhse-app-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid #e2e8f0; 
    margin-bottom: 16px; 
    padding-bottom: 10px; 
}

.qhse-brand h2 { 
    margin: 4px 0 0 0; 
    font-size: 20px; 
    font-weight: 800; 
}

.qhse-badge { 
    background: #dbeafe; 
    color: var(--qhse-primary); 
    font-size: 10px; 
    font-weight: 800; 
    padding: 4px 8px; 
    border-radius: 4px; 
    letter-spacing: 0.5px; 
}

.qhse-category-badge { 
    font-size: 14px; 
    font-weight: 900; 
    padding: 6px 12px; 
    border-radius: 6px; 
    color: #fff; 
    letter-spacing: 1px;
}

.qhse-mode-selector-bar { 
    display: flex; 
    gap: 15px; 
    background: #fff; 
    padding: 12px 16px; 
    border-radius: 6px; 
    margin-bottom: 20px; 
    border: 1px solid var(--qhse-border); 
    align-items: center; 
    flex-wrap: wrap;
}

.qhse-mode-pill { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    font-size: 11px; 
    font-weight: 700; 
    color: #334155;
}

.qhse-mode-pill select, .qhse-mode-pill input { 
    padding: 6px 10px; 
    border-radius: 4px; 
    border: 1px solid var(--qhse-border); 
    font-size: 12px; 
    font-weight: 600; 
    background: #f8fafc;
}

.qhse-layout-grid { 
    display: grid; 
    grid-template-columns: 1fr 380px; 
    gap: 20px; 
}

@media (max-width: 1024px) { 
    .qhse-layout-grid { 
        grid-template-columns: 1fr; 
    } 
}

.qhse-main-column { 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
}

.qhse-side-column { 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
    position: sticky;
    top: 20px; /* Adjusts the padding from the top of the screen */
    align-self: start; /* Prevents the column from stretching to grid height */
    z-index: 10; /* Ensures it stays above other elements while scrolling */
}
.qhse-card { 
    background: var(--qhse-card-bg); 
    border: 1px solid var(--qhse-border); 
    border-radius: var(--qhse-radius); 
    padding: 16px; 
}

.qhse-card-zone-header { 
    background: #fff; 
    border-top: 4px solid var(--qhse-primary); 
    padding: 12px; 
    margin-bottom: -5px;
}

.qhse-card-zone-header h3 { 
    margin: 0; 
    font-size: 14px; 
    text-transform: uppercase; 
}

.qhse-card-meta { 
    background: #fff; 
    border-top: 4px solid #475569; 
}

.qhse-form-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 6px; 
}

.qhse-form-vertical { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.qhse-field label { 
    display: block; 
    font-size: 9px; 
    font-weight: 800; 
    color: var(--qhse-text-muted); 
    margin-bottom: 2px; 
    text-transform: uppercase; 
}

.qhse-field input, .qhse-field select, .qhse-field textarea { 
    width: 100%; 
    padding: 4px 6px; 
    border: 1px solid var(--qhse-border); 
    border-radius: 4px; 
    font-size: 11px; 
}

.qhse-zone-card { 
    background: #fff; 
    border: 1px solid var(--qhse-border); 
    border-radius: 6px; 
    padding: 10px; 
    border-left: 4px solid var(--qhse-success); 
    box-shadow: none;
}
.qhse-zone-card h4 { 
    margin: 0 0 10px 0; 
    color: #1e293b; 
    font-size: 13px; 
    font-weight: 800;
}

.qhse-sim-box { 
    padding: 12px; 
    background: #f8fafc; 
    border: 1px dashed #94a3b8; 
    border-radius: 6px; 
}

.qhse-sim-title { 
    font-size: 11px; 
    font-weight: 800; 
    color: #4338ca; 
    display: block; 
    margin-bottom: 10px; 
    text-transform: uppercase; 
}

.qhse-action-bar { 
    display: flex; 
    flex-direction: column; 
}

.qhse-btn-action-primary { 
    background-color: #1d4ed8; 
    color: #fff; 
    padding: 12px; 
    font-weight: 800; 
    border-radius: 6px; 
    border: none; 
    cursor: pointer; 
    width: 100%; 
    font-size: 14px; 
    transition: 0.2s; 
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.3); 
    text-align: center;
}

.qhse-btn-action-primary:hover { 
    background-color: #1e40af; 
    transform: translateY(-1px); 
}

.qhse-btn-action-secondary { 
    background-color: #f1f5f9; 
    color: #1e293b; 
    padding: 12px; 
    font-weight: 800; 
    border-radius: 6px; 
    border: 1px solid #cbd5e1; 
    cursor: pointer; 
    width: 100%; 
    font-size: 14px; 
    transition: 0.2s;
}

.qhse-btn-action-secondary:hover { 
    background-color: #e2e8f0; 
}

.qhse-dashboard-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
    border-radius: 8px; 
    overflow: hidden; 
    font-size: 13px; 
}

.qhse-dashboard-table thead { 
    background: #1e293b; 
    color: #fff; 
    text-align: left; 
}

.qhse-dashboard-table th, .qhse-dashboard-table td { 
    padding: 12px 15px; 
    border-bottom: 1px solid #e2e8f0; 
}

.qhse-dashboard-table tbody tr:hover { 
    background-color: #f8fafc; 
}

.qhse-status-badge { 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 11px; 
    font-weight: bold; 
}

.badge-active { 
    background: #dcfce7; 
    color: #166534; 
}

.badge-draft { 
    background: #f1f5f9; 
    color: #475569; 
}

.qhse-action-link { 
    margin-right: 10px; 
    text-decoration: none; 
    color: #1d4ed8; 
    font-weight: bold; 
    font-size: 12px; 
}

#qhse-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99999;
    pointer-events: none;
}

.qhse-toast {
    background: #ffffff;
    color: #1e293b;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    border-left: 5px solid #cbd5e1;
    pointer-events: auto;
}

.qhse-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.qhse-toast-success { border-left-color: #16a34a; }
.qhse-toast-error { border-left-color: #dc2626; }

/* Select2 Dropdown Integration Overrides */
.select2-container--default .select2-selection--single {
    background-color: #e0f2fe !important;
    border: 1px solid #bae6fd !important;
    border-radius: 4px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: normal !important;
    padding-left: 6px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 26px !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    font-size: 12px !important;
}

.select2-results__option {
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 8px 10px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #1d4ed8 !important;
}