/* App-specific layout */
.content-panel {
    display: none;
}

.content-panel.active {
    display: block;
}

.quote-total {
    display: grid;
    gap: 6px;
    text-align: right;
}

.quote-large-total {
    color: var(--setra-blue-dark);
    font-size: 1.5rem;
}

.quote-total-line {
    font-size: 1.05rem;
    text-align: right;
}

.btn-sm {
    padding: 7px 10px;
    font-size: 0.85rem;
    border-radius: 10px;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-table input,
.admin-table select {
    min-width: 110px;
}

#calendar {
    min-height: 720px;
}

.fc {
    background: #fff;
    border-radius: 16px;
    padding: 10px;
}

.fc .fc-button-primary {
    background: var(--setra-blue);
    border-color: var(--setra-blue);
}

.fc .fc-button-primary:hover {
    background: var(--setra-blue-dark);
    border-color: var(--setra-blue-dark);
}

.fc .fc-toolbar-title {
    color: var(--setra-blue-dark);
}

@media (max-width: 768px) {
    .quote-total,
    .quote-total-line {
        text-align: left;
    }

    #calendar {
        min-height: 520px;
    }
}

/* Admin customer and user management */
.admin-editor {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.admin-list-space {
    margin-top: 18px;
}

.customers-table td,
.users-table td {
    vertical-align: top;
}

.customers-table .muted,
.users-table .muted {
    display: inline-block;
    margin-top: 4px;
}

/* Paginated admin tables and modal editors */
.admin-search {
    min-width: 240px;
    max-width: 320px;
}

.pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.custom-modal.hidden {
    display: none !important;
}

.custom-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(14, 23, 43, 0.56);
}

.custom-modal-content {
    width: min(820px, 96vw);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.custom-modal-header h2 {
    margin: 0;
}

.custom-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: var(--setra-blue-soft);
    color: var(--setra-blue-dark);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.custom-modal-close:hover {
    background: var(--setra-blue);
    color: #fff;
}

.services-table .table-actions,
.customers-table .table-actions,
.users-table .table-actions {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .admin-search {
        min-width: 100%;
        max-width: none;
    }

    .pagination-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Icon buttons */
.icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
}

.icon-label-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-sm.icon-btn {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    padding: 0;
}

.btn-icon-svg {
    width: 19px;
    height: 19px;
    display: block;
    fill: currentColor;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.toolbar-group .icon-btn {
    margin-bottom: 0;
}

/* Tablet/mobile module bar: icons only across the top */
@media (max-width: 1100px) {
    .page-shell.app-layout {
        display: block;
    }

    .side-menu {
        position: sticky;
        top: 0;
        z-index: 998;
        display: flex;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        margin-bottom: 16px;
        padding: 12px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .side-menu .side-title,
    .side-menu .module-text,
    .side-menu .module-chevron {
        display: none;
    }

    .side-link.module-button {
        width: 52px;
        min-width: 52px;
        height: 52px;
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        grid-template-columns: none;
        padding: 0;
        border-radius: 16px;
        flex: 0 0 52px;
    }

    .side-link.module-button:hover {
        transform: translateY(-1px);
    }

    .side-link.module-button .module-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 1.25rem;
    }

    .side-link.module-button.active {
        box-shadow: 0 12px 28px rgba(21, 52, 110, 0.22);
    }

    .content-stack {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .page-shell {
        margin-top: 14px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .side-menu {
        top: 0;
        margin-left: -4px;
        margin-right: -4px;
        border-radius: 16px;
    }

    .side-link.module-button {
        width: 48px;
        min-width: 48px;
        height: 48px;
        min-height: 48px;
        flex-basis: 48px;
    }

    .side-link.module-button .module-icon {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
    }
}

/* Quotation line layout: keep remove/trash action fixed to the far right */
#itemsTable {
    width: 100%;
    min-width: 980px;
    table-layout: fixed;
}

#itemsTable th:nth-child(1),
#itemsTable td:nth-child(1) {
    width: 22%;
}

#itemsTable th:nth-child(2),
#itemsTable td:nth-child(2),
#itemsTable th:nth-child(3),
#itemsTable td:nth-child(3),
#itemsTable th:nth-child(4),
#itemsTable td:nth-child(4) {
    width: 11%;
}

#itemsTable th:nth-child(5),
#itemsTable td:nth-child(5) {
    width: 24%;
}

#itemsTable th:nth-child(6),
#itemsTable td:nth-child(6) {
    width: 8%;
    text-align: right;
}

#itemsTable th:nth-child(7),
#itemsTable td:nth-child(7) {
    width: 10%;
    text-align: right;
}

#itemsTable th:nth-child(8),
#itemsTable td:nth-child(8) {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    text-align: right;
    padding-left: 6px;
    padding-right: 8px;
}

#itemsTable td:nth-child(8) .icon-btn {
    margin-left: auto;
}

#itemsTable input,
#itemsTable select {
    min-width: 0;
}

/* Tablet/mobile quotation rows: make each room/rug a compact card with the trash icon in its own right column */
@media (max-width: 768px) {
    #itemsTable {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    #itemsTable thead {
        display: none;
    }

    #itemsTable tbody,
    #itemsTable tr,
    #itemsTable td {
        display: block;
        width: auto;
        min-width: 0;
        max-width: none;
        white-space: normal;
        overflow: visible;
    }

    #itemsTable tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
        gap: 10px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(16, 33, 63, 0.05);
    }

    #itemsTable tbody td {
        padding: 0;
        border-bottom: 0;
        text-align: left;
    }

    #itemsTable tbody td:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    #itemsTable tbody td:nth-child(5) {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    #itemsTable tbody td:nth-child(2) {
        grid-column: 1;
        grid-row: 3;
    }

    #itemsTable tbody td:nth-child(3) {
        grid-column: 2;
        grid-row: 3;
    }

    #itemsTable tbody td:nth-child(4) {
        grid-column: 1 / 3;
        grid-row: 4;
    }

    #itemsTable tbody td:nth-child(6) {
        grid-column: 1;
        grid-row: 5;
        color: var(--muted);
        font-weight: 700;
    }

    #itemsTable tbody td:nth-child(6)::before {
        content: 'Area: ';
        color: var(--muted);
        font-weight: 500;
    }

    #itemsTable tbody td:nth-child(7) {
        grid-column: 2;
        grid-row: 5;
        color: var(--setra-blue-dark);
        font-weight: 800;
        text-align: right;
    }

    #itemsTable tbody td:nth-child(7)::before {
        content: 'Total: ';
        color: var(--muted);
        font-weight: 500;
    }

    #itemsTable tbody td:nth-child(8) {
        grid-column: 3;
        grid-row: 1 / 6;
        align-self: center;
        justify-self: end;
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    #itemsTable tbody td:nth-child(8) .icon-btn {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    #itemsTable tbody tr {
        grid-template-columns: minmax(0, 1fr) 48px;
    }

    #itemsTable tbody td:nth-child(1),
    #itemsTable tbody td:nth-child(2),
    #itemsTable tbody td:nth-child(3),
    #itemsTable tbody td:nth-child(4),
    #itemsTable tbody td:nth-child(5),
    #itemsTable tbody td:nth-child(6),
    #itemsTable tbody td:nth-child(7) {
        grid-column: 1;
    }

    #itemsTable tbody td:nth-child(1) { grid-row: 1; }
    #itemsTable tbody td:nth-child(5) { grid-row: 2; }
    #itemsTable tbody td:nth-child(2) { grid-row: 3; }
    #itemsTable tbody td:nth-child(3) { grid-row: 4; }
    #itemsTable tbody td:nth-child(4) { grid-row: 5; }
    #itemsTable tbody td:nth-child(6) { grid-row: 6; }
    #itemsTable tbody td:nth-child(7) {
        grid-row: 7;
        text-align: left;
    }

    #itemsTable tbody td:nth-child(8) {
        grid-column: 2;
        grid-row: 1 / 8;
    }
}

/* Quotation customer lookup */
.hidden {
    display: none !important;
}

.customer-lookup-box {
    border: 1px solid var(--border);
    background: #f8fbff;
    border-radius: 18px;
    padding: 16px;
    display: grid;
    gap: 12px;
}

.compact-head {
    margin-bottom: 0;
}

.lookup-results {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
}

.lookup-result {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    text-align: left;
    display: grid;
    gap: 3px;
    color: var(--ink);
}

.lookup-result:hover {
    border-color: var(--setra-blue);
    background: var(--setra-blue-soft);
}

.lookup-result strong {
    color: var(--setra-blue-dark);
}

.lookup-result span,
.lookup-result small {
    color: var(--muted);
}

.lookup-empty {
    border: 1px dashed var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--muted);
}

.selected-customer-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    background: var(--setra-blue-soft);
    color: var(--setra-blue-dark);
    border: 1px solid rgba(29, 66, 138, .18);
    border-radius: 999px;
    padding: 9px 13px;
}

.selected-customer-chip span {
    color: var(--muted);
}

@media (max-width: 768px) {
    .customer-lookup-box {
        padding: 14px;
    }

    .selected-customer-chip {
        width: 100%;
        border-radius: 14px;
    }
}

/* Search + icon action toolbars */
.admin-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: min(100%, 520px);
}

.admin-table-toolbar .admin-search {
    flex: 1 1 320px;
    min-width: 220px;
    max-width: none;
}

.icon-table-actions {
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
}

.records-table .table-actions,
.customers-table .table-actions,
.users-table .table-actions,
.services-table .table-actions {
    min-width: 44px;
}

@media (max-width: 768px) {
    .section-head {
        align-items: stretch;
    }

    .admin-table-toolbar {
        width: 100%;
        min-width: 0;
        justify-content: stretch;
    }

    .admin-table-toolbar .admin-search {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        max-width: none;
    }

    .admin-table-toolbar .icon-btn {
        flex: 0 0 42px;
    }
}

/* Booking modal */
.booking-summary {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fbff;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.booking-conflict-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.booking-conflict-list li {
    margin-bottom: 6px;
}

.modal-content {
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.modal-header,
.modal-footer {
    border-color: var(--border);
}

.modal-title {
    color: var(--setra-blue-dark);
    font-weight: 800;
}

/* UK date/directions enhancements */
.booking-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 180px;
}

.booking-cell .directions-link {
    flex: 0 0 36px;
}


.job-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.job-card-head h3 {
    margin: 0 0 4px;
}

.job-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.job-card-grid > div,
.job-card-address {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.job-card-grid span,
.job-card-address span {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    margin-bottom: 4px;
}

.job-card-grid strong,
.job-card-address strong {
    display: block;
    overflow-wrap: anywhere;
}

.job-card-address {
    margin-top: 12px;
}

.job-card-total {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    font-size: 1.05rem;
}

/* Customer self-registration and portal quote improvements */
.auth-shell {
    max-width: 1180px;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(280px, 440px) minmax(320px, 1fr);
    gap: 22px;
    align-items: start;
}

.register-card {
    max-width: none;
}

.customer-locked-box {
    border-color: rgba(29, 66, 138, .22);
    background: #f8fbff;
}

.customer-locked-box label {
    display: none;
}

@media (max-width: 900px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }
}

/* Login modal actions */
.auth-login-card {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.auth-secondary-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.auth-link-button {
    border: 0;
    background: transparent;
    color: var(--setra-blue-dark);
    font-weight: 700;
    cursor: pointer;
    padding: 8px;
    text-align: center;
}

.auth-link-button:hover {
    text-decoration: underline;
}

.custom-bootstrap-modal {
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.custom-bootstrap-modal .modal-header,
.custom-bootstrap-modal .modal-footer {
    border-color: var(--border);
}

.custom-bootstrap-modal .modal-header {
    background: #f8fbff;
}

.notice {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.notice.success {
    color: #166534;
    background: #ecfdf5;
    border-color: #bbf7d0;
}


/* Customer self-service quotation mode */
.readonly-field {
    background: #f8fbff;
    color: var(--muted);
    cursor: not-allowed;
}

.customer-lookup-box.hidden,
.hidden {
    display: none !important;
}

.quote-total div:last-child {
    color: var(--setra-blue-dark);
}

/* Promotions admin module */
.custom-modal-wide {
    width: min(980px, 96vw);
}

.promotion-customer-picker {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    background: #f8fbff;
}

.inline-checkbox,
.select-all-row {
    display: inline-flex !important;
    grid-template-columns: none !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 700;
}

.inline-checkbox input,
.select-all-row input {
    width: auto;
}

.promotion-customer-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    max-height: 320px;
    overflow: auto;
    margin-top: 12px;
    padding-right: 4px;
}

.promotion-customer-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 10px;
    cursor: pointer;
}

.promotion-customer-option:hover {
    border-color: var(--setra-blue);
    box-shadow: 0 0 0 3px rgba(29, 66, 138, .08);
}

.promotion-customer-option input {
    width: auto;
    margin-top: 4px;
    flex: 0 0 auto;
}

.promotion-customer-option span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.promotion-customer-option small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.promotion-content-preview {
    margin: 16px 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    padding: 16px;
}

/* Product catalogue and quotation product picker */
.product-catalog-grid,
.quote-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.product-card,
.quote-product-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(16, 33, 63, .06);
}

.product-card img,
.quote-product-card img,
.product-image-placeholder {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: var(--setra-blue-soft);
    color: var(--setra-blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-placeholder svg {
    width: 46px;
    height: 46px;
    fill: currentColor;
}

.product-card-body,
.quote-product-body {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.product-card-body h3,
.quote-product-body strong {
    margin: 0;
    color: var(--setra-blue-dark);
}

.product-card-body p,
.quote-product-body p {
    margin: 0;
    color: var(--muted);
    min-height: 40px;
}

.quote-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
}

.quote-product-meta a,
.product-card-body a {
    color: var(--setra-blue-dark);
    font-weight: 700;
}

.quote-product-body label {
    display: grid;
    grid-template-columns: auto 90px;
    align-items: center;
    gap: 10px;
}

.product-table-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-table-name img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.products-table .table-actions,
.services-table .table-actions {
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .product-catalog-grid,
    .quote-products-grid {
        grid-template-columns: 1fr;
    }
}

/* Quotation request workflow */
.dashboard-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.request-quote-items {
    display: grid;
    gap: 14px;
}
.request-quote-line {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(110px, .7fr)) minmax(190px, 1fr) 48px;
    gap: 12px;
    align-items: end;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    background: #fff;
}
.request-quote-line .full-width {
    grid-column: 1 / -2;
}
.request-remove {
    grid-column: -2 / -1;
    grid-row: 1 / span 2;
    align-self: center;
}
.request-review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.soft-card {
    box-shadow: none;
    background: #f8fbff;
    margin-bottom: 0;
}
.request-file-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.request-file-link {
    display: inline-flex;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--setra-blue-dark);
    font-weight: 700;
}
.requested-pricing-table input {
    min-width: 120px;
}
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.slot-card {
    min-height: 82px;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.slot-card span {
    font-weight: 500;
    opacity: .8;
}
@media (max-width: 900px) {
    .request-quote-line {
        grid-template-columns: minmax(0, 1fr) 48px;
    }
    .request-quote-line label,
    .request-quote-line .full-width {
        grid-column: 1 / 2;
    }
    .request-remove {
        grid-column: 2 / 3;
        grid-row: 1 / span 6;
    }
    .request-review-grid {
        grid-template-columns: 1fr;
    }
}

/* Login/Register links and CAPTCHA */
.login-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.login-link-row .auth-link-button {
    border: 0;
    background: transparent;
    color: var(--setra-blue, #1d428a);
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.login-link-row .auth-link-button:hover {
    text-decoration: underline;
}

.request-quote-link-full {
    width: 100%;
    margin-top: 14px;
}

.request-quote-link-full .btn {
    width: 100%;
}

.captcha-box {
    border: 1px dashed var(--border, #dbe4f0);
    background: #f8fbff;
    border-radius: 14px;
    padding: 14px;
}

.captcha-question {
    color: var(--setra-blue-dark, #15346e);
    font-weight: 800;
}

/* Requested quotation admin table */
.admin-table-toolbar,
.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-table-toolbar input,
.admin-toolbar input[type="search"] {
    flex: 1;
    min-width: 220px;
}

.request-file-list,
.requested-files {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.request-file-link,
.requested-file-link {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border, #dbe4f0);
    border-radius: 999px;
    background: var(--setra-blue-soft, #eaf0fb);
    color: var(--setra-blue-dark, #15346e);
    padding: 8px 12px;
    font-weight: 800;
}

.request-review-grid,
.requested-quote-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.soft-card,
.requested-quote-card {
    border: 1px solid var(--border, #dbe4f0);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
}

@media (max-width: 768px) {
    .request-review-grid,
    .requested-quote-detail-grid {
        grid-template-columns: 1fr;
    }

    .login-link-row {
        justify-content: center;
    }
}
.dispatch-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.dispatch-column {
    background: #f8fafc;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.dispatch-column h3 {
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 700;
}

.dispatch-job-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    border-left: 5px solid #1d428a;
}

.dispatch-job-card.completed {
    border-left-color: #16a34a;
}

.dispatch-job-card.in-progress {
    border-left-color: #d97706;
}


.dispatch-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dispatch-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.dispatch-refresh-row {
    display: flex;
    justify-content: flex-start;
}
.dispatch-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.dispatch-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.job-activity-panel {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.job-activity-timeline {
    display: grid;
    gap: 10px;
}

.job-activity-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.job-activity-item strong {
    display: block;
}

.job-activity-item span,
.job-activity-item time {
    color: var(--muted);
    font-size: 0.85rem;
}
.btn.success {
    background: #15803d;
    color: #fff;
    border-color: #15803d;
}

.dispatch-audit-log {
    margin-top: 10px;
    display: grid;
    gap: 6px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

.dispatch-audit-item {
    font-size: 0.82rem;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
}

.dispatch-audit-item strong {
    display: block;
}

.dispatch-audit-item small {
    color: var(--muted);
}
.message-template-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.completion-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.checklist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

.checklist-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}
.job-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.job-photo-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.job-photo-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.job-photo-meta {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-type {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.photo-type.before {
    background: #fff3cd;
    color: #856404;
}

.photo-type.after {
    background: #d4edda;
    color: #155724;
}

.photo-type.general {
    background: #d1ecf1;
    color: #0c5460;
}
.job-photo-trigger {
    border: 0;
    background: transparent;
    padding: 0;
    width: 100%;
    cursor: zoom-in;
}

.job-photo-trigger img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.job-photo-trigger:hover img {
    transform: scale(1.02);
}
.saved-signature-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
    background: #fff;
}

.saved-signature-card small {
    display: block;
    color: #6b7280;
    margin-bottom: 8px;
}

.saved-signature-card img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.portal-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.online-users-wrapper {
    position: relative;
}

.online-users-btn {
    position: relative;
    border:1px solid white;
    background: #1d428a;
    color: white;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
}

.online-users-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    padding: 12px;
    display: none;
    z-index: 1000;
}

.online-users-dropdown.show {
    display: block;
}


.online-user {
    padding: 10px 0;
    font-weight: 600;
    color: #1d428a;
    border-bottom: 1px solid #eee;
}

.online-user:last-child {
    border-bottom: none;
}
.online-user-message-btn {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.online-user-message-btn:hover {
    background: #f3f6fb;
}

.user-message-popup {
    border-top: 5px solid #1d428a;
}

.received-user-message-text {
    padding: 18px;
    border-radius: 12px;
    background: #f5f9ff;
    font-size: 18px;
    font-weight: 600;
    color: #1d428a;
}

.online-user-row {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.online-user-row:last-child {
    border-bottom: none;
}

.online-user-name {
    display: block;
    font-weight: 700;
    color: #1d428a;
    margin-bottom: 8px;
}

.online-user-actions {
    display: flex;
    gap: 8px;
}

.online-user-mini-btn {
    border: 1px solid #d7dfec;
    background: #fff;
    color: #1d428a;
    border-radius: 8px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.online-user-mini-btn.primary {
    background: #1d428a;
    color: #fff;
    border-color: #1d428a;
}

.online-user-mini-btn:hover {
    filter: brightness(0.96);
}

.video-call-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.video-call-modal.active {
    display: flex;
}

.video-call-window {
    width: 92vw;
    height: 92vh;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.35);
}

.video-call-header {
    height: 68px;
    background: #1d428a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

.video-call-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
}

.video-call-brand img {
    height: 40px;
    width: auto;
}

.video-call-close {
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 28px;
    cursor: pointer;
}

.video-call-close:hover {
    background: rgba(255,255,255,0.25);
}

.jitsi-container {
    width: 100%;
    height: calc(92vh - 68px);
}

.internal-video-invite {
    background: #f8fbff;
    border: 1px solid #d7e6ff;
    border-left: 5px solid #1d428a;
    border-radius: 14px;
    padding: 16px;
    margin-top: 10px;
}

.internal-video-invite-title {
    font-size: 18px;
    font-weight: 800;
    color: #1d428a;
    margin-bottom: 8px;
}

.internal-video-invite-body {
    color: #334155;
    margin-bottom: 14px;
    line-height: 1.5;
}

.internal-video-invite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1d428a;
    color: #fff !important;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.2s ease;
}

.internal-video-invite-btn:hover {
    background: #15346e;
}

.online-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.online-user-row:last-child {
    border-bottom: none;
}

.online-user-name {
    font-weight: 700;
    color: #1d428a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-user-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.online-user-icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d7dfec;
    border-radius: 9px;
    background: #fff;
    color: #1d428a;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.online-user-icon-btn.primary {
    background: #1d428a;
    color: #fff;
    border-color: #1d428a;
}

.online-user-icon-btn:hover {
    filter: brightness(0.96);
}

.video-call-window {
    position: relative;
}


.video-call-logo-overlay {
    position: absolute;
    top: 84px;
    left: 18px;
    z-index: 99999;
    pointer-events: none;
}

.video-call-logo-overlay img {
    height: auto;
    width: 200px;
    display: block;
}

.notification-wrapper {
    position: relative;
}

.notification-btn {
    position: relative;
    border: none;
    background: #fff;
    color: #1d428a;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #dc2626;
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.notification-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(0,0,0,.16);
    padding: 10px;
    display: none;
    z-index: 10000;
}

.notification-dropdown.show {
    display: block;
}

.notification-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
}

.notification-item:hover {
    background: #f3f6fb;
}

.notification-item strong {
    display: block;
    color: #1d428a;
    margin-bottom: 4px;
}

.notification-item span {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.online-users-btn {
    position: relative;
    border: none;
    background: #fff;
    color: #1d428a;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.online-users-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #dc2626;
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.notification-item {
    padding: 10px;
    border-radius: 12px;
    border-bottom: 1px solid #eef2f7;
}

.notification-main {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0;
    cursor: pointer;
}

.notification-main strong {
    display: block;
    color: #1d428a;
    margin-bottom: 4px;
}

.notification-main span {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.notification-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.notification-action-btn {
    border: 1px solid #d7dfec;
    background: #fff;
    color: #1d428a;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.notification-action-btn:hover {
    background: #f3f6fb;
}

.recent-activity-card {
    min-height: 520px;
}

.recent-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    max-height: 650px;
    overflow-y: auto;
    padding-right: 4px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.activity-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-message {
    font-weight: 600;
    color: #1e293b;
    line-height: 1.45;
    margin-bottom: 5px;
}

.activity-meta {
    font-size: 12px;
    color: #64748b;
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-refresh-btn {
    border: 1px solid #d7dfec;
    background: #fff;
    color: #1d428a;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.activity-item {
    width: 100%;
    border: 1px solid #eef2f7;
    text-align: left;
    cursor: pointer;
}

.activity-item:hover {
    background: #eef6ff;
    transform: translateY(-1px);
}

.online-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f7;
}

.online-user-details {
    flex: 1;
    min-width: 0;
}

.online-user-name {
    font-weight: 600;
    color: #111827;
}

.online-user-lastseen {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.online-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-user-action-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #dbe3ef;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s ease;
    font-size: 15px;
}

.online-user-action-btn:hover {
    background: #f3f7ff;
    border-color: #bfd3ff;
}

.online-users-dropdown {
    width: 340px;
}

.online-user-lastseen {
    font-size: 12px;
    color: #6b7280;
    margin-top: -2px;
    white-space: nowrap;
}