@import url('btool-btn-primary.css');
@import url('btool-btn-secondary.css');
@import url('btool-currency.css');

/* --- Root Variables --- */
:root {
    /* Brand (aligned with logo / marketing site) */
    --color-primary-blue: #1d6ff2;
    --color-primary-blue-hover: #1558d0;
    --color-primary-dark: #1e293b;
    --color-primary-dark-strong: #0f172a;
    --color-text-secondary: #64748b;
    --color-text-medium: #475569; /* base token; use var(--color-text-medium) elsewhere */
    --color-text-emphasis: #334155;
    --color-text-muted: #94a3b8;
    --color-neutral-border: #e2e8f0;
    --color-surface-subtle: #f8fafc;
    --color-accent-soft-bg: #eff6ff;

    --primary-blue: var(--color-primary-blue);
    --hash-bg: #f1f5f9;
    --text-muted: #cbd5e1;
    --border-color: var(--color-neutral-border);
}

/* --- Global Reset --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', sans-serif; 
}

body {
    background: #fff;
    color: var(--color-primary-dark);
    margin: 0;
}

/* --- Sidebar Navigation --- */
.sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100%;
    background: #1e293b;
    z-index: 2000;
    transition: 0.3s ease;
    padding: 20px;
}

.sidebar.active { 
    left: 0; 
}

.close-btn { 
    background: none; 
    border: none; 
    color: #fff; 
    font-size: 30px; 
    cursor: pointer; 
    float: right; 
}

.sidebar-links { 
    list-style: none; 
    margin-top: 50px; 
    clear: both; 
}

.sidebar-links li a { 
    color: #94a3b8; 
    text-decoration: none; 
    font-size: 16px; 
    display: block; 
    padding: 15px 0; 
    border-bottom: 1px solid #334155; 
}

.sidebar-links li a.active { 
    color: #fff; 
    font-weight: 600; 
}

/* --- Top Navigation --- */
.top-nav { 
    height: 65px; 
    min-height: 65px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color); 
    padding: 0 30px; 
    display: flex; 
    align-items: center; 
}

.nav-container { 
    width: 100%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/*.nav-left { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}*/

.hamburger-btn { 
    background: none; 
    border: none; 
    font-size: 24px; 
    cursor: pointer; 
}



.nav-right { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

/*.user-logo-profile { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    border: 1.5px dashed #cbd5e1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    overflow: hidden; 
    font-size: 10px; 
    color: #94a3b8;
}

.user-logo-profile img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
*/


.btn-logout { 
    background: transparent; 
    border: 1px solid var(--border-color); 
    padding: 8px 16px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 14px; 
}

/* --- Layout Structure --- */
.app-layout { 
    display: flex; 
    flex: 1; 
    overflow: hidden; 
}

/* --- Left Panel (Inputs) --- */
.left-panel { 
    width: 42%; 
    padding: 25px 30px; 
    border-right: 1px solid var(--border-color); 
    overflow-y: auto; 
}







.row { 
    display: grid; 
    gap: 15px; 
    margin-bottom: 20px; 
}


.triple { grid-template-columns: repeat(3, 1fr); }
.double { grid-template-columns: 1fr 1fr; }









.input-group label { 
    display: block; 
    font-size: 11px; 
    font-weight: 700; 
    color: var(--color-text-secondary); 
    margin-bottom: 6px; 
}

.field-wrap { 
    position: relative; 
    width: 100%; 
    display: flex; 
    align-items: center; 
}

input, select { 
    width: 100%; 
    height: 44px; 
    padding: 0 45px 0 12px; 
    border: 1.5px solid var(--border-color); 
    border-radius: 10px; 
    font-size: 14px; 
    outline: none; 
    background: #fcfdfe;
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none;
}

::placeholder { 
    color: var(--text-muted); 
    font-style: italic; 
    opacity: 1; 
}

select:invalid, select:required:invalid { 
    color: var(--text-muted); 
    font-style: italic; 
}

/* --- Icons & Custom Selects --- */
.icon-group { 
    position: absolute; 
    right: 10px; 
    top: 50%; 
    transform: translateY(-50%); 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    pointer-events: none; 
}

.chevron { 
    border: solid #94a3b8; 
    border-width: 0 2px 2px 0; 
    display: inline-block; 
    padding: 3px; 
    transform: rotate(45deg); 
}

.small-plus { 
    pointer-events: auto; 
    width: 24px; 
    height: 24px; 
    background: #cbd5e1; 
    color: white; 
    border: none; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    font-size: 16px; 
}

/* --- Amount Display Card --- */
.amount-card { 
    background: #f0f7ff; 
    border: 1px solid #dbeafe; 
    padding: 15px; 
    border-radius: 12px; 
    margin: 15px 0; 
    text-align: center; 
}

.amount-card p { 
    font-size: 12px; 
    color: var(--color-primary-blue); 
    font-weight: 500; 
}

.amount-card h2 { 
    font-size: 30px; 
    color: var(--primary-blue); 
    font-weight: 800; 
}

.footer-actions { 
    display: flex; 
    gap: 12px; 
    margin-top: 20px; 
}

.btn-clear { 
    flex: 1; 
    padding: 14px; 
    border-radius: 10px; 
    border: none; 
    background: #e2e8f0; 
    font-weight: 700; 
    cursor: pointer; 
    font-size: 14px; 
    color: var(--color-text-medium); 
}

.btn-add-main { 
    flex: 2; 
    padding: 14px; 
    border-radius: 10px; 
    border: none; 
    background: var(--primary-blue); 
    color: white; 
    font-weight: 700; 
    cursor: pointer; 
    font-size: 14px; 
}

/* --- Right Panel (Output) --- */
.right-panel { 
    width: 58%; 
    padding: 25px 30px; 
    background: #f8fafc; 
    overflow-y: auto; 
}

/*.export-row { 
    display: flex; 
    justify-content: flex-end; 
    gap: 12px; 
    margin-bottom: 20px; 
}*/

.btn-export-mono { 
    background: var(--color-text-medium); 
    color: white; 
    border: none; 
    padding: 10px 16px; 
    border-radius: 6px; 
    font-size: 13px; 
    cursor: pointer; 
    font-weight: 600; 
}

.output-container { 
    background: #fff; 
    border: 1.5px solid var(--border-color); 
    border-radius: 12px; 
    overflow: hidden; 
}

.output-header { 
    background: var(--hash-bg); 
    color: var(--color-text-medium); 
    text-align: center; 
    padding: 12px; 
    font-weight: 700; 
    font-size: 14px; 
}

/* --- Terms & Conditions Section --- */
.terms-section {
    margin-top: 0;
    padding: 14px 20px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.terms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 2px 0;
    user-select: none;
}

.terms-header:hover .terms-title {
    color: #1e293b;
}

.terms-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-medium);
    margin: 0;
}

.terms-title-icon {
    font-size: 16px;
    color: var(--color-text-secondary);
}

/* Preview + full content: one tap target opens edit modal (see app_features.js). */
.terms-body-editable {
    cursor: pointer;
    border-radius: 8px;
    padding: 6px 8px 8px;
    margin: 2px -8px 0;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.terms-body-editable:hover {
    background-color: rgba(241, 245, 249, 0.75);
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.terms-body-editable:focus {
    outline: none;
}

.terms-body-editable:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.terms-content {
    font-size: 13px;
    color: var(--color-text-medium);
    margin-top: 12px;
    padding-left: 26px;
    line-height: 1.6;
}

.terms-content .terms-empty-state {
    color: #94a3b8;
    font-weight: 400;
    font-style: italic;
}

.terms-content strong,
.terms-content b {
    font-weight: 700;
}

.terms-content em,
.terms-content i {
    font-style: italic;
}

.terms-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.terms-actions .edit-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 6px 10px;
    font-size: 15px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.terms-actions .edit-icon:hover {
    color: var(--color-primary-blue);
    background: #f1f5f9;
}

.terms-actions .edit-icon:active {
    background: #e2e8f0;
}

.terms-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--color-text-secondary);
    padding: 6px 8px;
    transition: transform 0.2s ease, color 0.15s;
}

.terms-header:hover .terms-arrow {
    color: var(--color-text-medium);
}

.terms-section.collapsed .terms-arrow i {
    transform: rotate(-90deg);
}

.terms-section.collapsed .terms-content {
    display: none !important;
}

.terms-preview {
    display: none;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: 10px;
    padding-left: 26px;
    line-height: 1.5;
    font-weight: 400;
    max-height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terms-preview.terms-preview-empty {
    color: #94a3b8;
    font-style: italic;
}

.terms-section:not(.collapsed) .terms-preview {
    display: none !important;
}

@media (max-width: 768px) {
    .terms-section {
        padding: 12px 16px 16px;
    }
    .terms-content {
        padding-left: 0;
    }
    .terms-body-editable {
        margin-left: 0;
        margin-right: 0;
        padding-left: 2px;
        padding-right: 2px;
    }
}

/* Terms Modal */
#termsModal.modal-overlay {
    z-index: 10001;
    overflow-y: auto;
    padding: 20px;
    align-items: flex-start;
}

#termsModal .modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    margin: auto;
}

#termsModal .modal-header {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#termsModal .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.terms-tabs-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.terms-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--color-text-medium);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.terms-tab:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.terms-tab.active {
    background: #fff;
    border-color: var(--color-primary-blue);
    color: #1e40af;
    font-weight: 600;
}

.terms-tab .terms-tab-label {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terms-tab .terms-tab-edit {
    font-size: 10px;
    opacity: 0.6;
}

.terms-tab:hover .terms-tab-edit {
    opacity: 1;
}

.terms-format-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.terms-toolbar-sep {
    width: 1px;
    height: 18px;
    background: #e2e8f0;
    margin: 0 4px;
}

.terms-format-btn {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: var(--color-text-medium);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.terms-format-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.terms-format-btn.active {
    background: #e2e8f0;
    color: #0f172a;
}

#termsModal .terms-rich-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    min-height: 140px;
    max-height: 50vh;
    box-sizing: border-box;
    pointer-events: auto;
    overflow-y: auto;
}

#termsModal .terms-rich-input:focus {
    outline: 2px solid var(--color-primary-blue);
    outline-offset: 0;
    border-color: var(--color-primary-blue);
}

#termsModal .terms-rich-input:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

#termsModal .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-shrink: 0;
    gap: 10px;
    justify-content: flex-end;
}

/*//////////////////////STARTS HERE THE CLINET NAME, LOCATION AND DATE ETC SECTION  ////////////////////////*/

/* --- Compact Table Styling (REVISED) --- */
.proj-info { 
    width: 100%; 
    border-collapse: collapse; 
    table-layout: fixed; 
}

.proj-info td { 
    border: 1px solid var(--border-color); 
    padding: 8px 12px; 
    font-size: 12px; 
    height: 38px; /* Slightly increased height for better spacing */
}

.cell-label { 
    width: 95px; 
    font-weight: 700; 
    background: #f8fafc; /* Professional light tint */
    color: var(--color-text-medium); 
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.02em;
}

/* FIX: Actual typed text style */
.cell-input input { 
    border: none; 
    width: 100%; 
    background: transparent; 
    color: #1e293b; /* Dark charcoal for actual data */
    font-size: 13px; 
    font-weight: 500;
    font-style: normal; /* Removes italic from typed text */
    height: 100%;
    padding: 0;
    outline: none;
}

/* FIX: Placeholder specific style */
.cell-input input::placeholder { 
    color: #cbd5e1 !important; /* Light grey for hint */
    font-style: italic; 
    font-weight: 400;
}

.cell-logo { 
    width: 130px; 
    text-align: center; 
    vertical-align: middle; 
}

.report-logo-circle { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    border: 1.5px dashed var(--border-color); /* Dashed suggests 'upload here' */
    margin: 0 auto; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 10px; 
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hide output table logo circle when logo image is present */
#reportLogoFrame:has(img) {
    border: none !important;
}


/*.user-logo-profile:hover {
    border-color: var(--primary-blue);
    background-color: #f0f7ff;
    color: var(--primary-blue);
}
*/

.boq-display-table { 
    width: 100%; 
    border-collapse: collapse; 
    table-layout: fixed; 
    border-top: 1.5px solid var(--border-color); 
}

.boq-display-table th { 
    background: #f8fafc; 
    border: 1px solid var(--border-color); 
    padding: 10px; 
    font-size: 11px; 
    text-align: left; 
    color: var(--color-text-medium); 
}

.boq-display-table td { 
    border: 1px solid var(--border-color); 
    padding: 8px 10px; 
    font-size: 12px; 
    color: #1e293b; 
}

.col-sn { width: 50px; }
.col-unit, .col-qty { width: 70px; }
.col-rate { width: 90px; }
.col-amt { width: 110px; }

.empty-state { 
    padding: 40px 20px !important; 
    text-align: center !important; 
    color: var(--empty-icon-color, #6b7280); 
    font-style: italic; 
    font-size: 13px; 
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.empty-state-icon {
    font-size: 48px;
    margin: 20px 0;
    color: var(--empty-icon-color, #6b7280);
    opacity: 0.9;
    line-height: 1;
    display: block;
}

.empty-state-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-style: normal;
}

.empty-state-hint {
    font-size: 14px;
    color: var(--empty-icon-color, #6b7280);
    font-style: italic;
}

/* Override any conflicting table cell styles for empty state */
.empty-state td,
#emptyRow td,
#boqBody .empty-state td {
    text-align: center !important;
    float: none !important;
    display: block !important;
    width: 100% !important;
    padding-top: 30px !important;
    padding-bottom: 30px !important;
    height: auto !important;
}

/* Most specific rule - target the exact ID */
#emptyRow td {
    text-align: center !important;
    padding: 30px !important;
    vertical-align: middle !important;
    height: auto !important;
}

/* More specific overrides for boq-display-table */
.boq-display-table .empty-state td,
.boq-display-table #emptyRow td,
#boqTable .empty-state td,
#boqTable #emptyRow td {
    text-align: center !important;
    float: none !important;
    display: table-cell !important;
    vertical-align: middle !important;
    padding-top: 30px !important;
    padding-bottom: 30px !important;
    height: auto !important;
}

/* Override col-desc specific rules for empty state */
.boq-display-table td.empty-state,
.boq-display-table #emptyRow td,
#boqTable td.empty-state,
#boqTable #emptyRow td {
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 30px !important;
    padding-bottom: 30px !important;
    height: auto !important;
}

/* Mobile-specific empty state fixes */
@media (max-width: 767px) {
    .empty-state,
    #emptyRow,
    #boqBody .empty-state {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        float: none !important;
        width: 100% !important;
        padding: 0 !important;
        height: auto !important;
    }
    
    .empty-state-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 16px !important;
        width: 100% !important;
    }
    
    .empty-state-icon {
        font-size: 44px !important;
        margin: 16px 0 !important;
        color: var(--empty-icon-color, #6b7280) !important;
        opacity: 0.9 !important;
        line-height: 1 !important;
        display: block !important;
        text-align: center !important;
    }
}

/*////////////////////// ENDS HERE THE CLINET NAME, LOCATION AND DATE ETC SECTION  ////////////////////////*/


/* --- Modal Styling --- */
.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    display: none; 
    align-items: center; 
    justify-content: center; 
    z-index: 3000; 
}

.modal-card { 
    background: #fff; 
    padding: 30px; 
    border-radius: 16px; 
    width: 400px; 
    text-align: center; 
    position: relative; 
}

.modal-close-x { 
    position: absolute; 
    top: 12px; 
    right: 15px; 
    background: none; 
    border: none; 
    font-size: 22px; 
    cursor: pointer; 
    color: #94a3b8; 
}

.btn-modal-submit { 
    width: 100%; 
    background: var(--primary-blue); 
    color: #fff; 
    border: none; 
    padding: 12px; 
    border-radius: 8px; 
    margin-top: 15px; 
    cursor: pointer; 
    font-size: 15px; 
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-modal-submit.loading {
    opacity: 0.9;
    cursor: wait;
    pointer-events: none;
}

.btn-modal-submit:disabled {
    opacity: 0.9;
    cursor: wait;
}



/* --- Multi-select Tag Styling --- */
.tag-display-area {
    margin-top: 10px;
    min-height: 80px;
    background: #f8fafc; /* Light grey/blue background */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

/* Hide empty tag areas – only show when items are added */
.tag-display-area:empty {
    display: none !important;
}

.chip {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-medium);
    text-transform: uppercase;
}

.chip .close-chip {
    margin-left: 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1;
}

.chip .close-chip:hover {
    color: #ef4444;
}
/* Target the placeholder (first disabled option) specifically */
select:required:invalid {
    color: #cbd5e1 !important; /* This matches your --text-muted variable */
    font-style: italic;
}

/* Ensure that once an option is picked, the text turns dark */
select option {
    color: #1e293b; /* Dark text for actual options */
    font-style: normal;
}

/* Firefox fix */
select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #cbd5e1;
}




/* --- Redesigned Library Grid --- */
.library-main {
    padding: 25px;
    background: #f8fafc;
    overflow-x: auto;
    width: 100%;
}

.library-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    min-width: max-content;
    padding-bottom: 20px;
}

/* Card Style */
.lib-card {
    width: 240px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lib-card-header {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.lib-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.lib-card-header span {
    font-size: 11px;
    color: #94a3b8;
}

/* Input Section */
.lib-card-body {
    padding: 15px;
}

.lib-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.lib-input-group input {
    height: 40px;
    border-radius: 8px;
    font-size: 13px;
    padding: 0 12px;
    flex: 1;
}

.btn-add-lib {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-add-lib:active { transform: scale(0.95); }

/* List Item Style */
.lib-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lib-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    transition: all 0.2s;
}

.lib-item:hover {
    border-color: var(--primary-blue);
    background: #f0f7ff;
}

.lib-item .delete-icon {
    color: #cbd5e1;
    cursor: pointer;
    font-size: 16px;
}

.lib-item .delete-icon:hover {
    color: #ef4444;
}

/* --- New Navigation Button Style --- */
/*.btn-nav-link {
    text-decoration: none;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-nav-link:hover {
    background: var(--primary-blue);
    color: #ffffff;
}*/





.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: var(--primary-blue) !important;
}










/* --- ABSOLUTE ALIGNMENT FOR BUTTONS --- */

/* 1. Reset the wrapper to allow absolute positioning of children */
.field-wrap {
    position: relative !important;
    display: block !important; /* Switch from flex to block for precise positioning */
    width: 100% !important;
}

/* 2. Style the dropdown box */
.choices {
    width: 100% !important;
    margin-bottom: 0 !important;
}



/* 3. Force the Button to the right edge of the field */
.icon-group {
    position: absolute !important;
    right: 5px !important; /* Distance from the right edge */
    top: 50% !important;
    transform: translateY(-50%) !important; /* Perfectly centers it vertically */
    z-index: 10 !important; /* Ensures it stays on top of the dropdown */
}

/* 4. Fix the Plus Button Look */
.small-plus {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background-color: #e2e8f0 !important; /* Light grey */
    color: var(--color-text-secondary) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    cursor: pointer !important;
}

.small-plus:hover {
    background-color: var(--primary-blue) !important;
    color: white !important;
}

/* 5. Hide the default arrow so it doesn't hit the button */
.choices[data-type*='select-one']::after {
    display: none !important;
}



/* --- ARROW RESTORATION & BUTTON RESIZE --- */

/* 1. Shrink the Plus Button */
.small-plus {
    width: 26px !important;  /* Reduced from 30px */
    height: 26px !important; /* Reduced from 30px */
    font-size: 16px !important;
}



/* 3. Adjust button position to account for its smaller size */
.icon-group {
    right: 8px !important;
}

/* 4. Ensure the Choices.js default arrow stays hidden to avoid duplicates */
.choices[data-type*='select-one']::after {
    display: none !important;
}







/* --- UI UNIFORMITY & TEXT TRIMMING --- */

/* 1. Force the top 3 fields to stay in their lane (Prevent Overlap) */
.form-row, .top-fields-container {
    display: flex !important;
    gap: 15px !important;
    width: 100% !important;
    align-items: flex-start !important;
}



/* 3. Placeholder Color Match (Matching Quantity/Rate) */
.choices__placeholder {
    color: #94a3b8 !important; /* Standard muted placeholder grey */
    opacity: 1 !important;
}

/* 4. Text Trimming (The "..." effect) */
.choices__list--single {
    padding: 0 !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important; /* Adds dots (...) if text is too long */
}

/* 5. Prevent the container from growing */
.choices__list--single .choices__item {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 20px) !important;
}

/* 6. Specific fix for the 3-column top row */
.input-group {
    flex: 1 !important; /* Ensures all 3 boxes take equal 33% width */
    min-width: 0 !important; /* Critical for ellipsis to work in Flexbox */
}





/* --- DROPDOWN & PLACEHOLDER CLEANUP --- */

/* 1. Prevent Plus Button from showing OVER the dropdown list */
/* When Choices is open, we lower the z-index of the icon group */
.choices.is-open + .icon-group,
.choices.is-focused + .icon-group {
    z-index: 1 !important;
}

/* Ensure the actual dropdown list is high enough to cover everything */
.choices__list--dropdown {
    z-index: 2000 !important;
    background-color: white !important;
}

/* 2. Strictly hide the placeholder from the dropdown list */
.choices__list--dropdown .choices__item--selectable[data-value=""],
.choices__list--dropdown .choices__placeholder {
    display: none !important;
}



.choices__placeholder {
    color: #94a3b8 !important; /* Matches Quantity/Rate placeholder color */
    opacity: 1 !important;
    margin-bottom: 0 !important;
}

/* 4. Text Trimming (Ellipsis) */
.choices__item--selectable {
    max-width: 85% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}





/* --- LIBRARY ITEM TRIMMING --- */

/* 1. Ensure the list item container stays in one line */
.library-card ul li, 
.lib-item-row { 
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    overflow: hidden !important; /* Hide anything that spills out */
}

/* 2. Trim the text and add dots (...) */
.library-card ul li span,
.lib-text-node {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important; /* Take up all space except for the X button */
    min-width: 0 !important; /* Essential for ellipsis to work in flexbox */
    text-align: left !important;
}

/* 3. Ensure the 'x' button never shrinks or disappears */
.delete-btn, 
.library-card ul li button {
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}







/* --- FINAL LIBRARY TRIMMING FIX --- */

/* 1. The List Item container (li) */
.lib-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 8px 12px !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* 2. The Item Name (span) */
.lib-item span:first-child {
    flex: 1 !important;        /* Takes up all available space */
    min-width: 0 !important;   /* Essential: allows the text to shrink */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important; /* Adds the dots ... */
    display: block !important;
}

/* 3. The Delete Icon (x) */
.delete-icon {
    flex-shrink: 0 !important; /* Protects the X from being squashed */
    cursor: pointer !important;
    font-size: 20px !important;
    color: #cbd5e1 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.2s !important;
}

/*.delete-icon:hover {
    color: #ef4444 !important; /* Turns red on hover */
}*/



/* --- CLEAR BUTTON STYLE --- */
/*.export-row {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
}*/

.btn-clear-mono {
    background: white !important;
    color: var(--color-text-secondary) !important; /* Muted grey */
    border: 1px solid #e2e8f0 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-clear-mono:hover {
    background: #fff1f2 !important; /* Very light red */
    color: #e11d48 !important;    /* Red text */
    border-color: #fda4af !important;
}




/* --- TRIPLE ROW CALCULATION STYLE --- */
.calculation-row {
    display: flex !important;
    gap: 12px !important;
    align-items: flex-end !important; /* Aligns labels and boxes perfectly */
    margin-bottom: 20px !important;
}

.calculation-row .input-group {
    flex: 1 !important; /* Gives equal width to all three columns */
    display: flex !important;
    flex-direction: column !important;
}

/* The Blue Amount Box */
.amount-box-blue {
    background-color: #f0f7ff !important; /* Light blue shade */
    border: 1px solid #bae0ff !important;
    color: #0958d9 !important; /* Professional blue text */
    height: 42px !important;   /* Match your input height */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

.calculation-row label {
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: var(--color-text-secondary) !important;
}



.btn-clear-form {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: var(--color-text-secondary) !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

/*.btn-clear-form:hover {
    background: #f1f5f9 !important;
    color: #ef4444 !important; 
    border-color: #fecaca !important;
}*/






/*.export-row {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 20px !important;
    align-items: center !important;
}
*/

/* Clear button stays its natural size */
.btn-clear-form {
    flex: 0 0 auto !important; 
    padding: 12px 24px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    color: var(--color-text-secondary) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

/* Add to BOQ button grows to fill space */
.btn-add {
    flex: 1 1 auto !important; /* This makes it take the remaining width */
    padding: 12px 24px !important;
    background: var(--color-primary-blue) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.btn-add:hover {
    background: var(--color-primary-blue-hover) !important;
}





.space-header-row td {
    background-color: #f1f5f9; /* Light grey/blue background */
    border-top: 2px solid #cbd5e1 !important;
    padding: 8px 12px !important;
    color: #1e293b;
    font-size: 0.75rem;
}

/* Indent the description slightly if it's under a space header */
#boqBody tr:not(.space-header-row) td:nth-child(2) {
    padding-left: 25px;
    line-height: 1.5;
}



/* Modern Warning Message */
.warning-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary-blue);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { top: -50px; opacity: 0; }
    to { top: 20px; opacity: 1; }
}

/* New Row Highlight */
/*.new-row-highlight {
    background-color: #fff9c4 !important; 
    transition: background-color 5s ease;
}*/

.space-header-row {
    background-color: #f8fafc;
}



/* Keep serial numbers centered, but align alphabetical bullets to the right */
.boq-data-row .col-sn {
    text-align: right !important;
    padding-right: 8px !important; /* Adds a little space so it's not touching the border */
}






/* 1. The top title row or Container Row example: KITCHEN*/
/* 1. Apply the fill color to the entire header row */
.space-header-row {
    background-color: #f1f5f9 !important; /* This is a professional light blue/grey fill */
    transition: opacity 0.25s ease;
}
.space-header-row.header-fade-out {
    opacity: 0;
}

/* 2. Ensure both cells in the header are transparent so the row color shows through */
.space-header-row .col-sn,
.space-header-row .col-desc {
    background-color: transparent !important; /* Removes any individual cell filling */
    border-bottom: 2px solid #cbd5e1; /* Optional: adds a nice border under the header */
    padding: 8px 10px;
}

/* 3. Style for the Serial Number specifically */
.space-header-row .col-sn {
    text-align: center;
    font-weight: bold;
    color: #334155;
    font-size: 12px;
}

/* 4. Style for the Space Title specifically */
.space-header-row .col-desc {
    text-align: left;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    color: #1e293b;
}

/* Target the cells inside the Space Header Row */
.space-header-row td {
    /* Use a very light grey for a subtle, thin appearance */
    border-bottom: 1px solid #e2e8f0 !important; 
    
    /* Ensure the top border doesn't clash if you have one */
    border-top: none !important; 
    
    /* Keep your existing padding and background */
    padding: 8px 10px;
    background-color: #f8fafc; /* Matches your header fill */
}

/* Optional: If you want the line to be even thinner, 
   use a hair-line color like #f1f5f9 */


   /* Vertical centering and space removal */
.boq-data-row td {
    vertical-align: middle !important; /* Forces content to center vertically */
    padding-top: 12px !important;
    padding-bottom: 12px !important; /* Keep top and bottom padding equal */
}

.col-desc {
    line-height: 1.5; /* Improves readability without adding bottom gaps */
    display: table-cell; 
}




/* Ensure specific columns are always centered */
.col-unit, .col-qty, .col-rate {
    text-align: center !important;
}

/* Ensure Amount header and data are right-aligned for currency */
.col-amt {
    text-align: right !important;
    padding-right: 15px;
}





/* Ensure the description cell has space for delete and edit icons */
.col-desc {
    position: relative;
    
}


/* Highlight row when editing */
/*.new-row-highlight {
    background-color: #fff7ed !important;
    transition: background-color 2s ease;
}*/



/* Ensure the description cell is the anchor for the icons */
.col-desc {
    position: relative !important;
    
    vertical-align: top;
}




/* Center the table header text */
#boqTable thead th {
    text-align: center;
    vertical-align: middle;
    padding: 12px 8px;
    background-color: #f1f5f9; /* Light gray to distinguish header */
    font-weight: 600;
}

/* Specifically keep 'Description' left-aligned if preferred, but center others */
#boqTable thead th.col-desc {
    text-align: left;
    padding-left: 15px;
}





















/* Force the table to follow our width rules */
.boq-display-table {
    width: 100%;
    table-layout: fixed; /* This prevents columns from resizing based on content */
    border-collapse: collapse;
}

/* Define EXACT widths for every column */
.col-sn   { width: 50px;  text-align: center; }
.col-desc { width: 45%;   text-align: left;   } /* Description gets the most space */
.col-unit { width: 80px;  text-align: center; }
.col-qty  { width: 80px;  text-align: center; }
.col-rate { width: 100px; text-align: center; }
.col-amt  { width: 140px; text-align: right;  }

/* Apply alignment and padding to BOTH headers and data cells */
.boq-display-table th, 
.boq-display-table td {
    padding: 12px 8px;
    border: 1px solid #e2e8f0;
    word-wrap: break-word; /* Prevents long text from breaking the layout */
    overflow-wrap: break-word;
}

/* Ensure data rows follow column alignment */
.boq-display-table td.col-sn,
.boq-display-table td.col-unit,
.boq-display-table td.col-qty,
.boq-display-table td.col-rate {
    text-align: center !important;
}

.boq-display-table td.col-desc {
    text-align: left !important;
    vertical-align: top;
    position: relative;
    padding-bottom: 45px !important; /* Space for edit/delete icons */
}

.boq-display-table td.col-amt {
    text-align: right !important;
    font-weight: bold;
}

/* Align the "Budgetary Estimate" header correctly */
.budgetary-header {
    text-align: center;
    font-weight: bold;
    background-color: #f8fafc;
}


/*.row-actions {
    position: absolute !important;
    bottom: 5px;
    right: 10px;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9); 
    padding: 2px;
    border-radius: 4px;
}
*/

/* ============================================================
   MASTER TABLE ALIGNMENT OVERRIDE
   ============================================================ */

/* 1. LOCK THE GRID: This is the most important part */
.boq-display-table {
    width: 100% !important;
    table-layout: fixed !important; /* Prevents long descriptions from pushing columns */
    border-collapse: collapse !important;
}

/* 2. MATCH WIDTHS: These must be identical for header and body */
.col-sn   { width: 50px !important; }
.col-desc { width: auto !important; } /* Grows to fill the middle space */
.col-unit { width: 70px !important; }
.col-qty  { width: 70px !important; }
.col-rate { width: 90px !important; }
.col-amt  { width: 120px !important; }

/* 3. UNIFY ALIGNMENT: Ensures text is centered under the labels */
.boq-display-table th, 
.boq-display-table td {
    padding: 12px 8px !important;
    border: 1px solid var(--border-color) !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

/* Center headers and numerical columns */
.boq-display-table thead th,
.boq-display-table td.col-sn,
.boq-display-table td.col-unit,
.boq-display-table td.col-qty,
.boq-display-table td.col-rate {
    text-align: center !important;
}

/* Keep Description Left */
.boq-display-table th.col-desc,
.boq-display-table td.col-desc {
    text-align: left !important;
    padding-left: 15px !important;
    vertical-align: top !important; /* Better for long text */
}

/* Keep Amount Right */
.boq-display-table th.col-amt,
.boq-display-table td.col-amt {
    text-align: right !important;
    padding-right: 15px !important;
}






/* ////////////////////////////////////FORM INNER STYLES STARTS HERE//////////////////////////////////////////////*/

/* Make Choices.js match your blue theme (for dropdown search)*/


.choices__inner {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    padding: 2px 10px !important;
}


.choices__inner {
    min-height: 42px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    padding-right: 45px !important; /* Create space so text doesn't go under the button */
    background-color: white !important;
}

/* 2. Bring back a custom Down Arrow */
/* We add it as a background image to the dropdown box */
.choices__inner {
    padding-right: 65px !important; /* Extra space for BOTH arrow and button */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 40px) center !important; /* Positions arrow to the left of the button */
    background-size: 14px !important;
}



/* 2. Vertically center the text and fix placeholder color */
.choices__inner {
    display: flex !important;
    align-items: center !important; /* Vertically centers text */
    min-height: 42px !important;
    height: 42px !important; /* Locks the height */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important; /* Prevents height expansion */
}


/* 3. keep this (Vertical Centering and Color Match for Placeholder */
.choices__inner {
    display: flex !important;
    align-items: center !important;
    min-height: 42px !important;
    padding: 0 12px !important;
}

/* ////////////////////////////////////FORM INNER STYLES ENDS HERE//////////////////////////////////////////////*/






/* 1. Space Title (e.g., DINING HALL) */
.col-desc-title {
    text-align: left !important;
    padding: 10px 15px !important; 
    font-weight: bold !important;
    background: #f8fafc !important;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}

/* 2. Description Cell - Keeps text tight and at the top */
.boq-display-table td.col-desc {
    text-align: left !important;
    vertical-align: top !important;
    padding: 12px 15px !important; 
}

/* 3. Amount Cell - Anchors icon & centers the value */
.boq-display-table td.col-amt {
    text-align: right !important;
    vertical-align: middle !important; 
    padding: 15px 15px !important; 
    position: relative !important; 
    font-weight: bold;
}

/* 4. The Text Wrapper - Prevents spillover */
.description-text {
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.5;
    font-size: 13px;
    display: block !important;
    margin: 0 !important;
}

/* 5. Action Container - Now with Hover Logic */
/*
.row-actions {
    position: absolute !important;
    bottom: 2px;
    right: 5px;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}*/

/* Reveal icon when hovering over the row */
/*
.boq-data-row:hover .row-actions {
    opacity: 1;
    visibility: visible;
}*/

/* 6. Icon Styling */
/*.delete-icon-btn {
    color: #ed8c8c;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.delete-icon-btn:hover {
    color: #d32f2f;
}
*/


/* 7. Standard Columns Alignment */
.col-sn, .col-unit, .col-qty, .col-rate {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 15px 5px !important;
}

/* 8. Mobile Responsiveness & Print Safety */
/*@media (max-width: 768px) {
    .row-actions {
        opacity: 1;
        visibility: visible;
        position: static !important; 
        text-align: right;
        margin-top: 4px;
    }
}

@media print {
    .row-actions, .no-print {
        display: none !important;
    }
}
*/






/* START: Delete Modal Styling (Structural + Visual) */

/* The Background Overlay */
#deleteModal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Darkens the background */
    display: none; /* Controlled by JS flex/none */
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Ensures it sits above everything */
    backdrop-filter: blur(2px); /* Subtle blur for premium feel */
}

/* The Modal Box itself */
.delete-modal {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header.warning {
    background-color: #fff1f2 !important;
    border-bottom: 1px solid #fecaca;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header.warning h3 {
    color: #991b1b !important;
    margin: 0;
    font-size: 1.2rem;
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.warning-icon {
    font-size: 3.5rem;
    color: #ef4444;
    margin-bottom: 15px;
    display: block;
}

.modal-body p {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.modal-footer {
    background: #f9fafb;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 10px 22px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
    padding: 10px 22px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* END: Delete Modal Styling */




/* Make the date input match your professional styling */
input[type="date"] {
    font-family: 'Inter', sans-serif;
    color: #1e293b; /* Matches your dark charcoal text */
    cursor: pointer;
    text-transform: uppercase;
}

/* Optional: Removes the default calendar icon if you want it super minimal, 
   or keep it so users know it's a clickable calendar */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}



/* START: NO TABLE TO DELETE Modal Styling */
/* --- Reusable Overlay (Matches your existing style) --- */
#confirmModal.modal-overlay, 
#infoModal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

/* --- Info Modal Specific (Blue Theme) --- */
#infoModal .modal-header {
    background-color: #f0f9ff !important; /* Forces blue over inline style */
    border-bottom: 1px solid #bae6fd !important;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#infoModal h3 {
    color: #075985 !important;
    margin: 0;
    font-size: 1.2rem;
}

#infoModal .warning-icon {
    color: #0ea5e9 !important; /* Turns the icon blue */
}

/* Specific button style for "Got it" to avoid clash with "Cancel" */
#infoModal .btn-secondary {
    background: #0ea5e9 !important;
    color: white !important;
    border: none;
}

#infoModal .btn-secondary:hover {
    background: #0284c7 !important;
}

/* END: NO TABLE TO DELETE Modal Styling */




/* --- Master Export Row Style --- */
.export-row {
    display: flex;
    justify-content: flex-end; /* Keeps buttons on the right */
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allows buttons to stack on mobile instead of breaking the page */
    width: 100%;
}

/* Base button style for Mono buttons */
.btn-export-mono, .btn-clear-mono {
    flex: 0 0 auto; /* Prevents buttons from stretching/growing */
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Excel and PDF specific (Grey theme) */
.btn-export-mono {
    background: var(--color-text-medium);
    color: white;
    border: none;
}

.btn-export-mono:hover {
    background: #334155;
}

/* Clear Table specific (White/Red theme) */
.btn-clear-mono {
    background: white;
    color: var(--color-text-secondary);
    border: 1px solid #e2e8f0;
}

.btn-clear-mono:hover {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fda4af;
}


//////* LOGO STYLE STARTS HERE*///////

/* ================================================
   LOGO UPLOAD + CROP MODAL – FINAL WORKING VERSION
   ================================================ */

/* Logo Circle in Header (with hover) */
/*.user-logo-profile {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.user-logo-profile:hover {
    border-color: var(--color-primary-blue);
    background: rgba(37, 99, 235, 0.08);
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}*/

.logo-placeholder {
    font-size: 8px !important;
    color: #94a3b8;
    text-align: center;
    line-height: 1.2;
}

.placeholder-text {
    display: block;
}

.placeholder-hover {
    display: none;
    color: var(--color-primary-blue);
    font-weight: 600;
    font-size: 10px;
    align-items: center;
    gap: 4px;
}

.user-logo-profile:hover .placeholder-text {
    display: none;
}

.user-logo-profile:hover .placeholder-hover {
    display: flex;
}

.user-logo-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Report Logo Circle */
#reportLogoFrame {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#reportLogoFrame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Crop Modal Overlay */
.logo-crop-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(4px);
}

.crop-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 460px;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    max-height: 92vh;
    overflow-y: auto;
}

.crop-modal-content h3 {
    margin: 0 0 20px;
    color: #075985;
    font-size: 1.3rem;
    text-align: center;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #ef4444;
}

.crop-container {
    width: 100%;
    height: 340px;
    background: #1f2937; /* Dark – helps see crop edges */
    border: 1px solid #4b5563;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 20px;
}

#cropImagePreview {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.crop-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-primary {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    min-width: 110px;
}

.btn-primary:hover {
    background: #0284c7;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #cbd5e1;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    min-width: 110px;
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* Cropper UI – blue handles */
.cropper-view-box,
.cropper-face {
    border-radius: 0 !important;
}
.cropper-line,
.cropper-point {
    background-color: #0ea5e9 !important;
}

//////* LOGO STYLE ENDS HERE*///////





/* 1. Force everything into a single, centered horizontal line */
/*.nav-left { 
    display: flex !important; 
    flex-direction: row !important;
    align-items: center !important; 
    flex-wrap: nowrap !important; 
    min-width: 0 !important;
}*/

/* 2. Fix Hamburger position */
.hamburger-btn {
    background: none !important;
    border: none !important;
    font-size: 20px !important; /* Slightly smaller to match nav height */
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #1e293b !important;
}

/* 3. The Logo Circle (Optimized Size) */
/*.user-logo-profile {
    width: 40px !important;    
    height: 40px !important;
    flex-shrink: 0 !important; 
    border-radius: 50% !important;
    border: 1.5px dashed #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important; 
    background: #f8fafc !important;
    position: relative !important;
}*/

/* 4. The bTool Text */
.logo-text {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--color-primary-dark) !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important; /* Crucial: stops the name from wrapping */
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
}

/* 5. Image inside the circle */
.user-logo-profile img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}



.nav-left { 
    display: flex !important; 
    align-items: center !important; /* This keeps them on the same horizontal line */
    gap: 10px !important;           /* CHANGE THIS: Space between menu, logo, and text */
    flex-wrap: nowrap !important;   /* This FORCES them to stay on one line */
}

.user-logo-profile {
    width: 45px !important;         /* CHANGE THIS: Overall size of the circle */
    height: 45px !important;        /* MUST match width to stay a circle */
    flex-shrink: 0 !important;      /* Prevents the circle from squishing */
    border-radius: 50% !important;
    overflow: hidden !important; 
    border: 1.5px dashed #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hide nav logo circle when logo image is present */
#navLogoFrame:has(img) {
    border: none !important;
}



/* 1. Target the text specifically */
.placeholder-text {
    display: block;
    font-size: 10px !important;    /* <--- EDIT THIS: Change 11px to 8px or 7px */
    font-weight: 600 !important;   /* Optional: makes it easier to read when small */
    color: #94a3b8 !important;     /* Keeps it the professional grey color */
    text-transform: uppercase;     /* Makes the small text look more like a UI label */
}

/* 2. This keeps your hover effect working */
.user-logo-profile:hover .placeholder-text {
    display: none !important;
}



//////* STARTS HERE GOOGLE LOGIN BUTTON *///////

/* Container styling for the auth section */
.auth-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Base button styling to match the "Data Library" button */
.btn-login, .btn-logout {
  padding: 8px 16px;
  font-family: 'Inter', 'Segoe UI', sans-serif; /* Matches modern UI fonts */
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  background-color: white;
  color: #333;
  border: 1px solid #d1d5db; /* Light grey border */
}

/* Specific styling for the Login with Google button */
.btn-login {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-login:hover {
  background-color: #f9fafb;
  border-color: #4285F4; /* Google Blue on hover */
  color: #4285F4;
}

/* Specific styling for the Logout button */
.btn-logout {
  color: #ef4444; /* Soft red for logout */
  border-color: #fca5a5;
}

.btn-logout:hover {
  background-color: #fef2f2;
  border-color: #ef4444;
}

//////* ENDS HERE GOOGLE LOGIN BUTTON *///////





/* --- Header Layout for "Left of Center" Button --- */
/* --- Navigation Container --- */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* --- Center Section (The "Nudge" Logic) --- */
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding-right: 435px; /* Your perfect desktop adjustment */
    transition: padding 0.3s ease; /* Makes the transition smooth when resizing */
}

/* --- Styled Data Library Button --- */
.btn-nav-link {
    text-decoration: none;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
    display: inline-block;
}

.btn-nav-link:hover {
    background: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

/* --- RESPONSIVE ADJUSTMENTS --- */

/* For Small Laptops / Tablets (Screens smaller than 1200px) */
@media (max-width: 1200px) {
    .nav-center {
        padding-right: 150px; /* Reduce nudge so it doesn't hit the logo */
    }
}

/* For Mobile Phones (Screens smaller than 768px) */
@media (max-width: 768px) {
    .nav-center {
        padding-right: 0; /* Center it perfectly for mobile */
    }

    /* Hide the username on mobile to save space for the logo and photo */
    #userName {
        display: none;
    }
    
    .btn-nav-link {
        padding: 6px 12px; /* Slightly smaller button for mobile */
        font-size: 12px;
    }
}




/* All overlays start at same base level */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Crop modal — base level */
#logoCropModal {
    z-index: 10000 !important;
}

/* Login / info modal — always highest when visible */
#infoModal {
    z-index: 10001 !important;
}

/* Optional: make sure inner content doesn't get blocked */
.delete-modal, .logo-crop-modal .crop-modal-content {
    position: relative;
    z-index: 1;
}



/* Put this at the very END of your CSS file (higher specificity wins) */

.logo-crop-modal,
#logoCropModal {
    z-index: 10010 !important;           /* Higher than infoModal */
}

#infoModal,
#confirmModal {
    z-index: 10020 !important;           /* Login/prompt stays above when needed */
}


.crop-modal-content {
    position: relative;
    z-index: 2;                           /* Small bump helps */
    pointer-events: auto !important;
}


.modal-overlay {
    /* ... existing ... */
}

.modal-inner {
    background: white;
    /* ... */
}




/* firebase syncyng Full screen loading overlay */
#loading-overlay {
    display: none; /* Controlled by JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    color: #333;
}

/* Rotating spinner animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/*///////////STARTS MODAL POPUP FOR Please login to customize your library///////////*/

/* ─── Notice / Info Modal – Final Polish & Fixes ──────────────────────── */

/* Blue info circle (missing in your current CSS) */
.info-icon-circle {
    width: 64px;
    height: 64px;
    background: var(--color-primary-blue);
    color: white;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    font-weight: bold;
}

/* Message text styling (missing or weak in current) */
.info-text {
    font-size: 1.05rem;
    line-height: 1.55;
    color: #334155;
    text-align: center;
}

/* Force white background + shadow on the modal card (this fixes the transparency issue) */
#infoModal .modal-content,
#infoModal .notice-modal {
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    min-width: 380px !important;
}

/* Light blue header tint + deep blue title (enhances your existing .modal-header) */
#infoModal .modal-header {
    background-color: #f0f9ff !important;
    border-bottom: 1px solid #bae6fd !important;
}

#infoModal h3 {
    color: #075985 !important;
    margin: 0;
    font-size: 1.2rem;
}

/* Make "Got it" button clearly blue (overrides any grey from .btn-secondary) */
#infoModal .btn-primary {
    background: var(--color-primary-blue) !important;
    color: white !important;
    border: none !important;
    padding: 10px 32px !important;
    border-radius: 8px !important;
}

#infoModal .btn-primary:hover {
    background: var(--color-primary-blue) !important;
}

/* Ensure body content is centered (small reinforcement) */
#infoModal .modal-body.text-center {
    text-align: center;
}

/*///////////ENDS MODAL POPUP FOR Please login to customize your library///////////*/


/* ─── Final Close Button Fix – Works for All Modals ──────────────────────── */
.modal-close-btn {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    background: none !important;
    border: none !important;
    width: 36px !important;                 /* Clickable area */
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2rem !important;             /* Big enough to see clearly */
    color: var(--color-text-secondary) !important;
    cursor: pointer !important;
    z-index: 100 !important;
    transition: color 0.2s ease, transform 0.1s ease !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    color: #ef4444 !important;
    transform: scale(1.15) !important;      /* Slight zoom on hover */
}

/* Explicitly style the Font Awesome icon inside */
.modal-close-btn i.fas {
    font-size: 1rem !important;
    line-height: 1 !important;
    color: inherit !important;
}

/* Prevent collapse from parent */
#infoModal .modal-header,
#logoCropModal .crop-modal-content {
    position: relative !important;
    overflow: visible !important;
}





/*///////////STARTS WARNING TOAST FOR DUPLICATE ADDITION THROUH THE + ICON///////////*/

.duplicate-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary-blue);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 9999;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    min-width: 300px;
    max-width: 90%;
    opacity: 0;
    transition: opacity 0.4s ease, top 0.4s ease;
    pointer-events: none;
}

.duplicate-toast.show {
    opacity: 1;
    top: 90px;
}

.duplicate-toast strong {
    font-weight: 600;
}
/*///////////ENDS WARNING TOAST FOR DUPLICATE ADDITION THROUH THE + ICON///////////*/




/* ///////////////Fix Ugly Delete Button (x) in datalibray page //////////////////////////// */
.btn-del-item,
.delete-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    background: rgba(239, 68, 68, 0.12) !important; /* Very light red bg */
    border-radius: 50% !important;
    color: #ef4444 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    padding: 0 !important;
    margin-left: 10px !important;
    flex-shrink: 0 !important;
}

.btn-del-item:hover,
.delete-icon:hover {
    background: #ef4444 !important;
    color: white !important;
    transform: scale(1.15) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
}

/* Make sure the parent li gives proper space */
.lib-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
}
/* ///////////////Fix Ugly Delete Button (x) in datalibray page //////////////////////////// */



/* ///////////////COMPANY NAME STYLING //////////////////////////// */
/* ─── Company Name & Edit Pencil – Size & Spacing Fix ──────────────────────── */

/* Wrapper – adds gap between logo and text */
.company-name-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;          /* ← This creates the gap you want (adjust 8px–16px) */
    margin-left: 10px !important;  /* Optional: space from left edge/hamburger */
}

/* Company name text – keep readable but not overpowering */
#companyNameDisplay {
    font-size: 20px !important;     /* Slightly smaller than before – adjust to 18px–22px */
    font-weight: 700 !important;
    margin: 0 !important;
    color: #1e293b !important;
    white-space: nowrap !important;
}

/* Pencil edit button – make it smaller & subtler */
.edit-company-btn {
    background: none !important;
    border: none !important;
    color: var(--color-text-secondary) !important;
    font-size: 14px !important;     /* ← Reduced size (was probably 16–18px) */
    cursor: pointer !important;
    padding: 4px 6px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;         /* Fixed small size */
    height: 24px !important;
}

.edit-company-btn:hover {
    color: var(--color-primary-blue) !important;
    background: rgba(37, 99, 235, 0.12) !important;
    transform: scale(1.1) !important;
}

/* Pencil icon inside button – make sure it's not too big */
.edit-company-btn i.fas.fa-pencil-alt {
    font-size: 12px !important;     /* ← Key: smaller icon (adjust 10px–14px) */
}
/* ///////////////ENDS COMPANY NAME STYLING //////////////////////////// */



/* Success modal – green theme */
#infoModal.success .modal-header {
    background-color: #f0fdf4 !important;
    border-bottom: 1px solid #bbf7d0 !important;
}
#infoModal.success h3 {
    color: #166534 !important;
}

/* Error modal – red theme */
#infoModal.error .modal-header {
    background-color: #fef2f2 !important;
    border-bottom: 1px solid #fecaca !important;
}
#infoModal.error h3 {
    color: #991b1b !important;
}


/* ─── Small Loading Toast (during company name save) ──────────────────────────────── */
.loading-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(37, 99, 235, 0.95);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.loading-toast.show {
    opacity: 1;
}



/* WhatsApp Support Button in Navbar */
.btn-whatsapp-support {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;           /* WhatsApp green */
    color: white !important;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    margin-left: 12px;             /* space from Logout button */
    transition: all 0.2s ease;
    border: none;
}

.btn-whatsapp-support:hover {
    background: #20b858;           /* darker green */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Make sure nav-right aligns everything nicely */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;                     /* space between all right-side items */
}



/* ///////////////STARTS COMPANY NAME ADDING MODAL POPUP //////////////////////////// */
/* ─── Company Name Edit Modal ────────────────────────────────────────────── */
#companyNameModal.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 140ms ease, visibility 140ms ease;
}

#companyNameModal.modal-overlay[style*="display: flex"] {
    opacity: 1;
    visibility: visible;
}

#companyNameModal .modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: none;
    transform: scale(0.98);
    transition: transform 140ms ease;
}

#companyNameModal.modal-overlay[style*="display: flex"] .modal-content {
    transform: scale(1);
}

#companyNameModal .modal-header {
    padding: 18px 20px 8px;
    background: #ffffff;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#companyNameModal .modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

#companyNameModal .close-modal {
    font-size: 22px;
    font-weight: 500;
    color: rgba(17, 24, 39, 0.6);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 120ms ease;
}

#companyNameModal .close-modal:hover {
    color: #111827;
}

#companyNameModal .modal-body {
    padding: 20px;
}

#companyNameModal .modal-body input#companyNameInput,
#companyNameModal .modal-body input#mobileNumberInput {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    outline: none;
    box-shadow: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

#companyNameModal .modal-body input#mobileNumberInput {
    margin-top: 12px !important;
}

#companyNameModal .modal-body input#companyNameInput:focus,
#companyNameModal .modal-body input#mobileNumberInput:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#companyNameModal .character-count {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

#companyNameModal .character-count.warning {
    color: #ef4444;
}

#companyNameModal .modal-footer {
    padding: 12px 20px 20px;
    border-top: none;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #ffffff;
}

#companyNameModal .modal-footer .btn-secondary {
    background: transparent;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 9px 14px;
}

#companyNameModal .modal-footer .btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

#companyNameModal .modal-footer .btn-primary {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    border-radius: 8px;
    padding: 9px 14px;
}

#companyNameModal .modal-footer .btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}
/* ///////////////ENDS COMPANY NAME ADDING MODAL POPUP //////////////////////////// */



/* ///////////////STARTS SIDE BAR SMOOTH TRANSITION STYLE //////////////////////////// */
.sidebar {
    transition: left 0.3s ease, opacity 0.3s ease; /* already have left transition */
    opacity: 0;
    pointer-events: none; /* can't click when closed */
}

.sidebar.active {
    left: 0;
    opacity: 1;
    pointer-events: auto;
}

/* Optional: dark overlay when open (very mobile-friendly) */
body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999; /* below sidebar (2000) */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

body.sidebar-open::before {
    opacity: 1;
    pointer-events: auto;
}


/* ///////////////ENDS SIDE BAR SMOOTH TRANSITION STYLE //////////////////////////// */

















/* ////////////////////////////////////////////////////////////////////////////// */
            /*STARTS THE MOBILE RESPONSIVE CODE*/
/* //////////////////////////////////////////////// //////////////////////////// */


/* Hide "Data Library" button in the top navbar on mobile screens */
@media (max-width: 900px) {
    .nav-center .btn-nav-link {
        display: none !important;
    }
}


/* ================================================
   MOBILE: Stack form above table – no flicker
   ================================================ */

@media (max-width: 900px) {

  /* Prevent body/html from locking height too early */
  html.page-boq, body.page-boq {
    height: auto !important;
    overflow-y: visible !important;
  }

  /* Main layout – stack vertically without fighting */
  body.page-boq .app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;           /* keeps full height but allows growth */
    overflow: visible;           /* no forced scroll here */
  }

  /* Form first – full width, natural flow */
  .left-panel {
    width: 100%;
    order: 1;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 15px;
  }

  /* Output second – full width, no forced background change unless needed */
  .right-panel {
    width: 100%;
    order: 2;
    padding: 20px 15px;
    /* Remove background: #ffffff if it causes reflow – let it inherit */
  }

  /* Prevent output container from jumping */
  .right-panel .output-container {
    margin-top: 0;
  }

  /* Safety: no hidden overflow during transition */
  .app-layout,
  .left-panel,
  .right-panel {
    overflow: visible !important;
  }
}



/* ================================================
   MOBILE: Hide empty chip/tag areas by default
   Show only when they have chips
   ================================================ */

@media (max-width: 900px) {

  /* Hide all tag areas when they are empty */
  .tag-display-area {
    display: none !important;
    min-height: 0 !important;         /* prevent ghost space */
    margin-top: 0 !important;
    padding: 0 !important;
  }

  /* When it has at least one child (chip), show it */
  .tag-display-area:not(:empty) {
    display: flex !important;
    margin-top: 8px !important;
    padding: 8px !important;
    min-height: auto !important;
  }

  /* Make sure the container doesn't reserve space when hidden */
  .tag-display-area:empty {
    height: 0 !important;
    overflow: hidden !important;
  }
}









/* ================================================
   MOBILE SIDEBAR USER SECTION – FINAL CLEANED VERSION (PENCIL FIXED)
   - Pencil icon visible on both desktop and mobile
   - All other mobile-only elements hidden on desktop
   ================================================ */

/* DESKTOP (≥901px): hide mobile-only elements EXCEPT pencil */
@media (min-width: 901px) {
    .sidebar-mobile-user-info,
    .sidebar-mobile-user-section,
    .sidebar-logout-wrap,
    #sidebarLoginMobileWrap,
    #userInfoMobile,
    #loginBtnMobile,
    #logoutBtnMobile,
    .company-name-wrap-mobile,
    #companyNameDisplayMobile {
        display: none !important;
    }
    /* IMPORTANT: Do NOT hide .edit-company-btn — keep pencil visible on desktop */
}

/* MOBILE (≤900px): show section, hide top-nav originals */
@media (max-width: 900px) {
    /* Hide originals from top nav on mobile */
    .company-name-wrap,
    #userInfo,
    #loginBtn,
    #logoutBtn {
        display: none !important;
    }

    /* Show mobile user/company section */
    .sidebar-mobile-user-info,
    .sidebar-mobile-user-section {
        display: block !important;
        padding: 16px 20px;
        border-bottom: 1px solid #334155;
        background: #1e293b;
        color: white;
    }

    /* Company name + pencil (visible on mobile) */
    .company-name-wrap-mobile {
        display: flex !important;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    #companyNameDisplayMobile {
        display: inline-block !important;
        margin: 0;
        color: white !important;
        font-size: 1.2rem !important;
        font-weight: 700 !important;
    }

    .company-name-wrap-mobile .edit-company-btn {
        background: none;
        border: none;
        color: #94a3b8 !important;
        font-size: 1.1rem;
        cursor: pointer;
        transition: color 0.2s;
    }

    .company-name-wrap-mobile .edit-company-btn:hover {
        color: white !important;
    }

    /* User info (photo + name) – base style, JS controls final display */
#userInfoMobile {
    display: flex;                /* ← removed !important */
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

    #userPhotoMobile {
        width: 48px !important;
        height: 48px !important;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #94a3b8;
    }

    #userNameMobile {
        font-size: 1.1rem;
        font-weight: 600;
        color: white;
    }

    /* Login & Logout wrappers – let JS control display (NO !important) */
#sidebarLoginMobileWrap,
.sidebar-logout-wrap {
    padding: 12px 20px;
    /* Removed display: block !important; → JS now controls visibility */
}

    /* Buttons styling */
    #loginBtnMobile,
    #logoutBtnMobile {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
        font-weight: 600;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s;
    }

    #loginBtnMobile {
        background: #4285f4;
        color: white;
    }
    #loginBtnMobile:hover {
        background: #3367d6;
    }

    #logoutBtnMobile {
        background: #ef4444;
        color: white;
    }
    #logoutBtnMobile:hover {
        background: #dc2626;
    }
}


/* FIX: Completely hide mobile user info section when logged out (override any !important) */
@media (max-width: 900px) {
    #userInfoMobile[style*="display: none"],
    #userInfoMobile.hidden-logged-out {
        display: none !important;
    }
    #userInfoMobile[style*="display: none"] img,
    #userInfoMobile.hidden-logged-out img {
        display: none !important;
    }
}



@media (max-width: 900px) {
    /* Fix: Make "Login with Google" button single-line + slimmer */
    #loginBtnMobile {
        white-space: nowrap !important;          /* Prevent text wrapping to new line */
        padding: 10px 16px !important;           /* Reduce vertical padding → slimmer height */
        font-size: 0.95rem !important;           /* Slightly smaller font if needed */
        line-height: 1.3 !important;             /* Tighter line height */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;                     /* Space between icon/text if you add icon later */
    }

    /* Optional: Make Logout button match same slim style */
    #logoutBtnMobile {
        white-space: nowrap !important;
        padding: 10px 16px !important;
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
    }
}



@media (max-width: 900px) {
    .sidebar-logout-wrap {
        display: none; /* default for logged-out */
    }
    body.user-logged-in .sidebar-logout-wrap {
        display: block !important; /* force visible when logged in */
    }
}










/* ────────────────────────────────────────────────
   Fix squeezed first field + better mobile behavior
   ──────────────────────────────────────────────── */

/* Desktop — make sure first field isn't crushed */
@media (min-width: 821px) {
    .row.triple {
        grid-template-columns: 1.1fr 0.95fr 0.95fr;   /* slightly wider first column */
        /* or more extreme:  1.2fr 0.9fr 0.9fr */
    }
    
    /* Optional — minimum width protection */
    .row.triple > .input-group:first-child {
        min-width: 240px;   /* prevent too much squeezing */
    }
    
    .mobile-pair {
        display: contents;   /* let the two fields participate directly in the grid */
    }
}

/* Mobile — switch to flex so we can control rows exactly */
@media (max-width: 820px) {
    .row.triple {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    /* SELECT SPACE → full width */
    .row.triple > .input-group:first-child {
        width: 100% !important;
        flex: none !important;
    }
    
    /* WORK ITEM + UNIT side by side */
    .mobile-pair {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
        width: 100% !important;
    }
    
    .mobile-pair .input-group {
        flex: 1 1 50% !important;
        min-width: 0 !important;
    }
}




/*warning-toast message turns to single or double lines*/
@media (max-width: 480px) {
    .warning-toast,
    .duplicate-toast {
        font-size: 11px;
        padding: 10px 18px;
        border-radius: 12px;            /* softer rounded corners */
        min-width: 240px;               /* prevents ultra-narrow look */
        max-width: 90vw;
        margin: 0 auto;                 /* better centering */
        
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}
/*warning-toast message turns to single or double lines*/




/*OUTPUT AREA LOGO HIDE*/
@media (max-width: 820px) {
    .cell-logo,
    .report-logo-circle {
        display: none !important;
    }
}
/*OUTPUT AREA LOGO HIDE*/




/*OUTPUT AREA HEADER HIDES,*/

@media (max-width: 820px) {
    #boqTable thead,
    #boqTable thead tr,
    #boqTable thead th {
        display: none !important;
    }
    
    /* Optional: remove top border of first data row so it doesn't look cut off */
    #boqBody tr:first-child {
        border-top: none !important;
    }
}

/*OUTPUT AREA HEADER HIDES,*/







/*STARTS THE OUTPUT AREA COLUMNS MOVES TO BOTTOM OF THE DESCRIPTION (CARD VIEW)*/

/* ================================================
   PART A: (starts)FIXED PROJECT HEADER (STABLE)
   Mobile only – max-width 768px
   ================================================ */
@media (max-width: 768px) {
  /* Keeps the Logo/Project area as a standard table layout */
  .boq-display-table tr:not(.boq-data-row):not(.group-header) {
    display: table-row !important;
  }

  .boq-display-table tr:not(.boq-data-row):not(.group-header) td {
    display: table-cell !important;
    width: auto !important;
    padding: 10px 8px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  /* Room Title Row (Stays as a full-width bar) */
  .group-header, tr.group-header td {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
    height: 40px !important;
    padding-bottom: 2px !important;
    padding-left: 10px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
  }

  /* Serial Number inside Title */
  tr.group-header .col-sn {
    display: inline-block !important;
    width: auto !important;
    margin-right: 5px !important;
  }
  tr.group-header .col-sn:after { content: "." !important; }
}


/* ================================================
   PART A: (ends)FIXED PROJECT HEADER (STABLE)
   ================================================ */





/* ================================================
   PART B: (starts) GRID-BASED CARD VIEW (THE FINAL FIX)
   ================================================ */
/* ================================================
   PART B: 2-ROW DATA GRID (UNIT/QTY & RATE/AMOUNT)
   Mobile card layout – max-width 768px to match features.css
   ================================================ */
@media (max-width: 768px) {
  
  /* 1. TABLE RESET */
  .boq-display-table, .boq-display-table tbody {
    display: block !important;
    width: 100% !important;
  }

  /* 2. THE SQUARE CARD */
  tr.boq-data-row {
    display: block !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    margin: -12px 9px 15px 9px !important; 
    border-radius: 0px !important; 
    position: relative !important;
    overflow: hidden !important;
  }

  /* 3. SERIAL & DESCRIPTION */
  td.col-sn {
    display: block !important;
    float: left !important;
    padding: 11px 5px 0 10px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
  }
  td.col-sn:after { content: "." !important; }

  td.col-desc {
    display: block !important;
    padding: 16px 45px 16px 0px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  /* 4. DATA GRID: 2 ROWS x 2 COLUMNS */
  /* Start the grid on a new line */
  td.col-unit { clear: both !important; }

  /* Width 50% forces 2 items per row */
  td.col-unit, td.col-qty, td.col-rate, td.col-amt {
    display: inline-flex !important; 
    width: 50% !important; 
    padding: 10px 8px !important;
    font-size: 12px !important;
    justify-content: flex-start !important; /* Text starts from left */
    align-items: center !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid #f1f5f9 !important;
    float: left !important; /* Essential for 2x2 alignment */
  }

  /* Vertical Divider for the right column (QTY & AMOUNT) */
  td.col-qty, td.col-amt {
    border-left: 1px solid #f1f5f9 !important;
  }

  /* Adding Labels: UNIT, QTY, RATE, AMOUNT */
  td.col-unit:before { content: "UNIT : " !important; }
  td.col-qty:before  { content: "QTY : " !important; }
  td.col-rate:before { content: "RATE : " !important; }
  td.col-amt:before  { content: "AMOUNT : " !important; }

  /* Label Styling */
  td.col-unit:before, td.col-qty:before, td.col-rate:before, td.col-amt:before {
    font-weight: 700 !important;
    margin-right: 5px !important;
    color: var(--color-text-secondary) !important;
    font-size: 11px !important;
  }

  /* 5. RED X ICON */
  /*.row-actions {
    position: absolute !important;
    top: 15px !important;
    right: 12px !important;
  }
  */
  /*.delete-icon-btn::before {
    content: "\00d7" !important;
    color: #ef4444 !important;
    font-size: 28px !important;
  }
  .delete-icon-btn i { display: none !important; }
  */

  /* 6. HIDE THEAD */
  .boq-display-table thead { display: none !important; }
}

/* Remove spacing under Room Title */
.boq-display-table tr:not(.boq-data-row) td {
  padding-bottom: 2px !important;
}
/* ================================================
   PART B: (ends) GRID-BASED CARD VIEW (THE FINAL FIX)
   ================================================ */



/* ================================================
   PART C: (starts) CLEANUP & STRAY ELEMENT REMOVAL
   Mobile only – max-width 768px
   ================================================ */

@media (max-width: 768px) {

  /* 1. WIPE OUT ALL DEFAULT TABLE BORDERS & BACKGROUNDS */
  /* This clears the 'ghost' lines from the background */
  .boq-display-table, 
  .boq-display-table tr, 
  .boq-display-table td {
    border: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  /* 2. REMOVE BORDER & BOX FROM ROOM TITLES (KIDS ROOM / BED ROOM) */
  tr.group-header td, 
  .boq-group-header td {
    display: block !important;
    border: none !important;
    padding: 20px 0 10px 10px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
  }

  /* Hide the leading '1.' and '2.' numeric serials only */
  tr.group-header td:first-child, 
  .boq-group-header td:first-child {
    display: none !important;
  }

  /* 3. THE CARD CONTAINER (The white box with the border) */
  /* This is the ONLY place we want a border */
  tr.boq-data-row {
    display: block !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    margin: 0 10px 20px 10px !important;
    border-radius: 4px !important;
    padding-bottom: 0 !important;
  }

  /* 4. RESTORE 'a.' AND 'b.' (Inner Serials) */
  /* This places the letter next to the text WITHOUT a box around it */
  td.col-sn {
    display: inline-block !important;
    width: auto !important;
    padding: 10px 0 3 12px !important;
    font-weight: bold !important;
    color: #1e293b !important;
    float: left !important;
  }

  /* 5. DESCRIPTION TEXT ALIGNMENT */
  td.col-desc {
    display: block !important;
    padding: 15px 15px 15px 35px !important; /* Extra left padding to clear the 'a.' */
    line-height: 1.5 !important;
  }

  /* 6. DATA GRID (UNIT, QTY, RATE, AMOUNT) */
  /* We add internal grid lines back ONLY for these bottom boxes */
  td.col-unit, td.col-qty, td.col-rate, td.col-amt {
    display: inline-flex !important;
    width: 50% !important;
    box-sizing: border-box !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 10px !important;
  }

  /* Vertical divider for the grid */
  td.col-unit, td.col-rate {
    border-right: 1px solid #f1f5f9 !important;
  }
}
/* ================================================
   PART C: (ends) CLEANUP & STRAY ELEMENT REMOVAL
   ================================================ */



/*ENDS THE OUTPUT AREA COLUMNS MOVES TO BOTTOM OF THE DESCRIPTION (CARD VIEW)*/














   

/* ================================================
   MOBILE-ONLY: GRAND TOTAL ADJUSTMENTS
   ================================================ */
@media (max-width: 768px) {
    #boqTable tfoot {
        display: block !important;
        width: 100% !important;
        /* Pulls the total UP towards the card */
        margin-top: -9px !important; 
        padding-top: 0 !important;
        border: none !important;
    }

    #boqTable tfoot .total-row {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: baseline !important;
        border: none !important;
        /* MOVES IT LEFT: Increase this number to move further left */
        margin-right: 15px !important; 
    }

    #boqTable tfoot .total-row td {
        display: block !important;
        padding-top: 0 !important;
        padding-bottom: 5px !important;
        border: none !important;
    }

    #boqTable tfoot #grandTotalDisplay {
        border-top: none !important;
        text-align: right !important;
    }
}
   /* ================================================
   MOBILE: MOVE GRAND TOTAL UPWARD
   ================================================ */




/* --- GLOBAL RESET: No White Box --- */
.row-actions {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: flex;
}

.delete-icon-btn {
    color: #000000 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    font-family: Arial, sans-serif !important; /* Ensure standard character look */
}

/* --- DESKTOP: TOP-RIGHT HOVER --- */
@media (min-width: 768px) {
    tr.boq-data-row { position: relative !important; }

    .row-actions {
        position: absolute !important;
        opacity: 0;
        transition: opacity 0.2s;
        
        /* ADJUST DESKTOP POSITION HERE */
        top: 8px !important;    
        right: 10px !important;  
    }

    tr.boq-data-row:hover .row-actions { opacity: 0.5; }
    .delete-icon-btn { font-size: 20px !important; } /* Standard 'x' size */
}




/*///////////////// mobile cards 5 sec highlights /////////////////// */

/* ────────────────────────────────────────────────
   NEW ROW HIGHLIGHT – Works on BOTH desktop table and mobile cards
───────────────────────────────────────────────── */
/* DESKTOP: Instant row highlight */
@media (min-width: 768px) {
    tr.boq-data-row.new-row-highlight {
        animation: newRowFlash 4s ease-out forwards !important;
        animation-delay: 0s !important;
    }

    tr.boq-data-row.new-row-highlight td {
        background: transparent !important;
    }
}

/* Keep your original keyframes (or use the faster version above) */
@keyframes newRowFlash {
    0%   { background-color: #fefce8; }
    18%  { background-color: #fef08a; box-shadow: 0 0 12px #facc15 inset; }
    55%  { background-color: #fefce8; box-shadow: 0 0 6px #eab308 inset; }
    100% { background-color: #ffffff; box-shadow: none; }
}

/* Drop highlight – same as new-row-highlight but 3 sec (for dragged-and-dropped rows) */
@media (min-width: 768px) {
    tr.boq-data-row.drop-row-highlight {
        animation: newRowFlash 3s ease-out forwards !important;
    }
    tr.boq-data-row.drop-row-highlight td {
        background: transparent !important;
    }
}
@media (max-width: 768px) {
    tr.boq-data-row.drop-row-highlight {
        animation: newRowFlash 3s ease-out forwards !important;
        background: #fffef5 !important;
        box-shadow: 0 0 0 0 #facc15 inset !important;
        border: 2px solid #facc15 !important;
        border-radius: 6px !important;
    }
    tr.boq-data-row.drop-row-highlight td {
        background: transparent !important;
    }
}



/* ────────────────────────────────────────────────
   MOBILE: Full card highlight – uniform light color everywhere
   Outer border kept, description & bottom same color, no dark areas
───────────────────────────────────────────────── */

@media (max-width: 767px) {

    /* Animation – same as before, but softer fade */
    @keyframes newRowFlash {
        0%   { background-color: #fffef5; box-shadow: 0 0 0 0 #facc15 inset; }
        18%  { background-color: #fef9c3; box-shadow: 0 0 10px #facc15 inset; }
        55%  { background-color: #fffef5; box-shadow: 0 0 4px #facc15 inset; }
        100% { background-color: #ffffff; box-shadow: none; }
    }

    /* 1. The whole row – light uniform base + your preferred border */
    tr.boq-data-row.new-row-highlight {
        background: #fffef5 !important;           /* very light yellow – same for all areas */
        animation: newRowFlash 5s ease-out forwards !important;
        box-shadow: 0 0 0 0px #facc15 inset !important;  /* ← your outer glow border */
        border: 2px solid #facc15 !important;     /* ← kept as you like */
        border-radius: 6px !important;
    }

    /* 2. Make ALL cells transparent so row color shows through uniformly */
    tr.boq-data-row.new-row-highlight td {
        background: transparent !important;
        background-color: transparent !important;
        animation: newRowFlash 5s ease-out forwards !important;
    }

    /* 3. Description area – same light color, no stronger/darker tint */
    tr.boq-data-row.new-row-highlight td.col-desc,
    tr.boq-data-row.new-row-highlight .description-text,
    tr.boq-data-row.new-row-highlight .col-desc > div {
        background-color: #fffef5 !important;     /* exactly same as bottom */
        box-shadow: inset 0 0 4px rgba(250, 204, 21, 0.12) !important; /* very subtle */
    }

    /* 4. Bottom fields (UNIT/QTY/RATE/AMOUNT) – same light color as description */
    tr.boq-data-row.new-row-highlight td.col-unit,
    tr.boq-data-row.new-row-highlight td.col-qty,
    tr.boq-data-row.new-row-highlight td.col-rate,
    tr.boq-data-row.new-row-highlight td.col-amt {
        background-color: #fffef5 !important;     /* ← matched to description */
        box-shadow: inset 0 0 4px rgba(250, 204, 21, 0.12) !important;
    }

    /* 5. Text readability – no need for extra overrides */
    tr.boq-data-row.new-row-highlight .col-desc,
    tr.boq-data-row.new-row-highlight .amt-value,
    tr.boq-data-row.new-row-highlight .col-unit,
    tr.boq-data-row.new-row-highlight .col-qty,
    tr.boq-data-row.new-row-highlight .col-rate {
        color: #1e293b !important;
    }
}
/*///////////////// mobile cards 5 sec highlights /////////////////// */






/*/////////////////STARTS THE SUCCESS TOAST GREEN TICK FOR 3 SEC /////////////////// */

/* ────────────────────────────────────────────────
   Bottom-center Success Toast (transparent black + green tick)
───────────────────────────────────────────────── */

.success-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);      /* light transparent black */
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(6px);           /* nice modern blur effect */
}

.success-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Green checkmark styling */
.toast-icon {
    font-size: 20px;
    font-weight: bold;
    color: #10b981;                       /* emerald green */
    line-height: 1;
}

/* Animation on appear */
@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.success-toast.show {
    animation: toastFadeIn 0.4s ease-out forwards;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .success-toast {
        bottom: 24px;
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 10px;
        gap: 10px;
    }
    
    .toast-icon {
        font-size: 18px;
    }
}

/*///////////////// ENDS THE SUCCESS TOAST GREEN TICK FOR 3 SEC /////////////////// */





/*///////////////// STARTS THE NAV BAR FREEZE OR STICKY ON TOP /////////////////// */
/* ────────────────────────────────────────────────
   MOBILE: Freeze (sticky) top nav bar while scrolling
───────────────────────────────────────────────── */

@media (max-width: 900px) {   /* ← your mobile breakpoint, adjust if needed */

    .top-nav {
        position: sticky !important;       /* Sticks to top of viewport */
        top: 0 !important;                 /* Exactly at the top */
        z-index: 1000 !important;          /* Above other content */
        background: white !important;      /* Prevent transparency issues */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important; /* subtle shadow for depth */
        backdrop-filter: blur(8px) !important; /* modern glass effect (optional) */
        -webkit-backdrop-filter: blur(8px) !important; /* Safari support */
    }

    /* Optional: Add slight padding/margin so content doesn't hide under nav */
    .app-layout {
        padding-top: 6px !important;      /* ← match your nav height (65px in your code) */
    }

    /* Prevent double scrollbars or layout jumps */
    body {
        overflow-y: scroll !important;     /* force scrollbar always visible */
    }

    /* Make sure sidebar doesn't fight the sticky nav */
    .sidebar {
        top: 65px !important;              /* start below sticky nav */
        height: calc(100% - 65px) !important;
    }
}



.top-nav {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(10px) !important;
}

.top-nav {
    border-bottom: 1px solid #e2e8f0 !important;
    transition: border-bottom 0.3s ease;
}
/*///////////////// ENDS THE NAV BAR FREEZE OR STICKY ON TOP /////////////////// */




/* ── Toast notifications ─────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 16px;
    right: 20px;
    z-index: 12000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    min-width: 260px;
    max-width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.24s ease, transform 0.24s ease;
    pointer-events: auto;
}

.toast-icon {
    width: 14px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1;
    color: #6b7280;
}

.toast-text {
    flex: 1;
    line-height: 1.35;
}

.toast-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    margin-left: 6px;
    font-size: 15px;
    line-height: 1;
}

.toast-close:hover {
    color: #6b7280;
}

.toast--show {
    opacity: 1;
    transform: translateY(0);
}

.toast--success { border-left: 3px solid #16a34a; }
.toast--error   { border-left: 3px solid #dc2626; }
.toast--warning { border-left: 3px solid #d97706; }

.toast-icon--info    { color: #64748b; }
.toast-icon--success { color: #16a34a; }
.toast-icon--error   { color: #dc2626; }
.toast-icon--warning { color: #d97706; }

@media (max-width: 640px) {
    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        width: auto;
        min-width: 0;
        max-width: none;
    }
}








