/* Shared screen components. Keep site.css and its company/theme styling intact. */
.crm-page-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
/* Shared page titles, including older screens that have not adopted crm-page-header. */
main h1 { background:#087f8c; color:#fff !important; font-size:calc(var(--bs-body-font-size, 1rem) * .875); padding:.325rem .5rem; border-radius:4px; width:fit-content; overflow-wrap:anywhere; }
/* Shared section heading bars on all screens, including collapsible card summaries. */
main .card-header { background-color:#087f8c !important; color:#fff !important; }
main .card-header :is(h2, h3, h4, h5, h6, strong, .text-muted, .text-secondary) { color:#fff !important; }
main .card-header a:not(.btn) { color:#fff; text-decoration:underline; }
main .card-header .btn.crm-action { border-color:rgba(255,255,255,.65) !important; }
.crm-toolbar { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.crm-toolbar form { margin:0; }
.crm-form-grid, .crm-detail-field { text-align:left; }
.crm-detail-field { min-width:0; }
.crm-detail-label { font-weight:600; margin-bottom:.25rem; }
.crm-detail-value { min-height:calc(1.5em + .75rem + 2px); height:auto; overflow-wrap:anywhere; background-color:var(--bs-body-bg); }
.crm-detail-value > strong { font-weight:normal; }
.crm-detail-multiline { white-space:pre-wrap; min-height:6rem; }
.crm-action { gap:.35rem; }
.crm-action-symbol { display:inline-flex; align-items:center; justify-content:center; }
.crm-action-symbol svg { width:20px; height:20px; }
.btn.crm-action { position:relative; display:inline-flex; align-items:center; justify-content:center; background:#087f8c !important; border-color:#087f8c !important; color:#fff !important; border-radius:8px; }
.btn.crm-action:hover { background:#066773 !important; border-color:#066773 !important; }
.btn.crm-action-icon-only { width:26.6px !important; min-width:26.6px; height:26.6px; padding:5.6px; flex-shrink:0; }
.btn-sm.crm-action-icon-only { width:22.4px !important; min-width:22.4px; height:22.4px; padding:4.2px; }
.btn.crm-action-icon-only { border-radius:5.6px; }
.btn.crm-action-icon-only .crm-action-symbol svg { width:14px; height:14px; }
.btn.crm-action:disabled, .btn.crm-action.disabled { opacity:.45; }
.btn.crm-action:focus-visible { outline:3px solid #54d9df; outline-offset:3px; box-shadow:none; }
.crm-action-icon-only.dropdown-toggle::after { display:none; }
.crm-action-tooltip { display:none; position:absolute; top:calc(100% + 8px); bottom:auto; left:50%; transform:translateX(-50%); padding:6px 9px; border-radius:5px; background:#087f8c; color:#fff; font-size:12px; line-height:1.4; font-weight:normal; white-space:nowrap; pointer-events:none; z-index:1080; }
.btn.crm-action:hover > .crm-action-tooltip, .btn.crm-action:focus-visible > .crm-action-tooltip { display:block; }
.dropdown-item.crm-action { display:flex; align-items:center; gap:.5rem; }
.dropdown-item > .crm-action-tooltip { display:none; }
.crm-text-only-row > td { white-space:pre-wrap; overflow-wrap:anywhere; }
.crm-action:focus-visible { outline:2px solid var(--bs-primary); outline-offset:2px; }

    .order-header-grid {
        display: grid;
        grid-template-columns: minmax(320px, 2fr) minmax(220px, 1fr) minmax(220px, 1fr);
        gap: 1rem;
        align-items: start;
    }

    .order-header-field {
        min-width: 0;
    }

    .order-header-pair {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

.order-row-fields,
    .order-row-header-fields,
.event-row-fields,
    .event-row-header-fields {
display: grid;
        grid-template-columns: minmax(120px, 1fr) minmax(240px, 2fr) minmax(85px, .7fr) minmax(80px, .7fr) minmax(105px, .9fr) minmax(85px, .7fr) minmax(75px, .7fr) minmax(100px, .8fr) minmax(120px, 1fr) minmax(140px, 1fr);
        gap: .5rem;
        align-items: end;
}

.order-row-header-fields > span,
.event-row-header-fields > span {
white-space: nowrap;
}

.order-row[data-row-type="1"] .order-row-description,
.event-billing-row[data-row-type="1"] .event-row-description {
grid-column: 1 / -1;
}

.order-row[data-row-type="3"] .order-row-description,
.event-billing-row[data-row-type="3"] .event-row-description {
grid-column: 1 / 10;
}

.order-row[data-row-type="3"] .order-row-amount,
.event-billing-row[data-row-type="3"] .event-row-amount {
grid-column: 10;
}

.order-row-field,
.event-row-field {
min-width: 0;
}

.order-row-field[hidden],
.event-row-field[hidden] {
display: none !important;
}

.order-row-field > label,
.event-row-field > label {
display: none;
}

.order-row > td,
.event-billing-row > td {
padding-top: .2rem;
        padding-bottom: .2rem;
}

.order-row .form-control-sm,
    .order-row .form-select-sm,
.event-billing-row .form-control-sm,
    .event-billing-row .form-select-sm {
min-height: calc(1.5em + .35rem + 2px);
        padding-top: .15rem;
        padding-bottom: .15rem;
}

.order-row .row-type-input,
.event-billing-row .row-type-input {
width: 2.25rem;
        min-width: 2.25rem;
        padding-left: 0;
        padding-right: 1.6rem;
        color: transparent;
        background-position: right .35rem center;
}

.order-row .row-type-input option,
.event-billing-row .row-type-input option {
color: var(--bs-body-color);
        background-color: var(--bs-body-bg);
}
    @media (max-width: 991.98px) {
        .order-header-grid {
            grid-template-columns: 1fr;
        }
    }

/* Main navigation uses the same central turquoise theme as section headings. */
.navbar .navbar-nav { gap:.25rem; }
.navbar .navbar-nav > .nav-item > .nav-link { background:#087f8c; color:#fff !important; border-radius:8px; padding:.4rem .5rem; }
.navbar .navbar-nav > .nav-item > .nav-link:hover,
.navbar .navbar-nav > .nav-item > .nav-link.show { background:#066773; }
.navbar .navbar-nav > .nav-item > .nav-link:focus-visible { outline:3px solid #54d9df; outline-offset:2px; }

/* Shared messages and status labels on every screen. */
main :is(.alert, .badge) { background-color:#087f8c !important; border-color:#087f8c !important; color:#fff !important; }
main :is(.alert, .badge) :is(a, strong, .text-muted, .text-secondary) { color:#fff !important; }
main :is(.alert, .badge) a { text-decoration:underline; }

/* Shared dropdown menus and selection fields on all screens. */
.dropdown-menu { --bs-dropdown-bg:#087f8c; --bs-dropdown-color:#fff; --bs-dropdown-link-color:#fff; --bs-dropdown-link-hover-color:#fff; --bs-dropdown-link-hover-bg:#066773; --bs-dropdown-link-active-color:#fff; --bs-dropdown-link-active-bg:#066773; background-color:#087f8c !important; color:#fff !important; }
.dropdown-menu .dropdown-item, .dropdown-menu .dropdown-header, .dropdown-menu .dropdown-item-text { color:#fff !important; }
.dropdown-menu .dropdown-item:hover, .dropdown-menu .dropdown-item:focus, .dropdown-menu .dropdown-item.active { background-color:#066773 !important; color:#fff !important; }
.dropdown-menu .dropdown-item.disabled, .dropdown-menu .dropdown-item:disabled { opacity:.5; }
.dropdown-menu .dropdown-divider { border-top-color:rgba(255,255,255,.35); }
select.form-select, select.form-control { background-color:#087f8c !important; color:#fff !important; border-color:#087f8c; }
select.form-select { --bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
select.form-select option, select.form-control option { background-color:#087f8c; color:#fff; }
select.form-select:disabled, select.form-control:disabled { opacity:.5; }
