/* =================================================================
   Staff Interface — Unfold UI overrides
   CargoSprint brand: #0C2245 (navy), #016C78 (teal), #02C38D (mint)
   ================================================================= */

/* ── Sidebar — use Unfold defaults, just add brand accent ── */
/* Active item highlight uses primary color (handled by Unfold via COLORS config) */
/* Section group headings (only app section titles, not logo/user area) */
#nav-sidebar-apps .font-semibold.text-sm {
    color: #0C2245;
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
}
.dark #nav-sidebar-apps .font-semibold.text-sm {
    color: #94a3b8;
}

/* ── Header bar accent ── */
#main > header,
header[class*="border-b"] {
    border-bottom-color: #016C78 !important;
    border-bottom-width: 2px !important;
}

/* ── View buttons — Unfold-compatible styling ── */
.button,
a.button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid #016C78;
    background: #016C78;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.button:hover,
a.button:hover {
    background: #014e57;
    border-color: #014e57;
    color: #fff;
}

/* ── Icon buttons (upper-right toolbar) ── */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}
.icon-btn:hover {
    background: #f1f5f9;
    color: #016C78;
    border-color: #016C78;
}
.icon-btn--active {
    color: #016C78;
    border-color: #016C78;
}
.dark .icon-btn {
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
}
.dark .icon-btn:hover {
    background: #334155;
    color: #02C38D;
    border-color: #02C38D;
}

/* ── Export warning modal ── */
#export-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.15s ease-out;
}
@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
#export-modal {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    max-width: 420px;
    width: 90vw;
    text-align: center;
    animation: modal-slide-up 0.2s ease-out;
}
@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
#export-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #fef3c7;
    margin-bottom: 1rem;
}
#export-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
}
#export-modal-body {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}
#export-modal-hint {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin: 0 0 1.5rem;
}
#export-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
#export-modal-cancel {
    padding: 0.5rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
#export-modal-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
#export-modal-confirm {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    background: #f59e0b;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
}
#export-modal-confirm:hover {
    background: #d97706;
}
.dark #export-modal {
    background: #1e293b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.dark #export-modal-title { color: #f1f5f9; }
.dark #export-modal-body { color: #94a3b8; }
.dark #export-modal-hint { color: #64748b; }
.dark #export-modal-icon { background: #422006; }
.dark #export-modal-cancel {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}
.dark #export-modal-cancel:hover { background: #3b4f6b; }

/* ── Icon toolbar positioning ── */
#icon-toolbar {
    position: absolute;
    right: 1.5rem;
    top: 0.75rem;
    z-index: 10;
}
/* Ensure the parent content block is positioned for the absolute toolbar */
#content {
    position: relative;
}

/* Export download button (mint green) */
#export-download-btn {
    background: #02C38D !important;
    border-color: #02C38D !important;
    color: #fff !important;
}
#export-download-btn:hover {
    background: #01a577 !important;
}

/* Delete view button (red) */
#delete-view-btn {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}
#delete-view-btn:hover {
    background: #dc2626 !important;
}

/* ── Filter chips ── */
#active-filter-chips {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

/* ── Two-column layout (customer form) ── */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 768px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

/* ── View dropdown container ── */
#view-dropdown-container {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
#view-dropdown-container select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    background: #fff;
}

/* ── Export progress ── */
#export-progress {
    font-size: 0.8125rem;
    color: #016C78;
}
#export-progress-fill {
    background: #02C38D !important;
}

/* ── Module headers ── */
.module h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0C2245;
    padding: 0.5rem 0.75rem;
}

/* ── Page size selector ── */
#page_size {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

/* ── Tools slide-out panel ── */
#tools-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
#tools-panel-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
#tools-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 90vw;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}
#tools-panel.open {
    transform: translateX(0);
}
#tools-panel-header {
    position: sticky;
    top: 0;
    background: #0C2245;
    color: #fff;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}
#tools-panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
}
#tools-panel-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
#tools-panel-close:hover {
    color: #fff;
}
.tools-section {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.tools-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.tools-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin: 0.125rem 0;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    color: #0C2245;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.tools-link:hover {
    background: #f1f5f9;
    color: #016C78;
}
.tools-link-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #016C78;
    flex-shrink: 0;
}
.tools-link-disabled {
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem 0.375rem 2.5rem;
}

/* ── Tools trigger button ── */
#tools-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: #016C78;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
#tools-trigger-btn:hover {
    background: #014e57;
}

/* ── Staff modals (shared) ── */
.staff-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
}
.staff-modal-inner {
    background: #fff;
    border-radius: 0.75rem;
    max-height: 80vh;
    overflow-y: auto;
    margin: 5vh auto;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.staff-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0.75rem 0.75rem 0 0;
}
.staff-modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #0C2245;
}
.staff-modal-close {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}
.staff-modal-close:hover { color: #0f172a; }
.staff-modal-body { padding: 1.25rem; }
.staff-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.staff-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
}
.staff-btn:hover { background: #f1f5f9; }
.staff-btn-primary {
    background: #016C78;
    border-color: #016C78;
    color: #fff;
}
.staff-btn-primary:hover { background: #014e57; }
.staff-btn-blue {
    background: #016C78;
    border-color: #016C78;
    color: #fff;
}
.staff-btn-blue:hover { background: #014e57; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bookmarks section on dashboard ── */
.bookmarks-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    overflow: hidden;
}
.bookmarks-panel-header {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0C2245;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ── Filter panel — collapsible right-side panel (no overlay) ── */
.filter-panel-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: stretch;
    pointer-events: none;
}
.filter-panel-container > * {
    pointer-events: auto;
}

/* Collapse handle — centered on left edge */
.filter-collapse-handle {
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    color: #64748b;
    box-shadow: -2px 0 8px rgba(0,0,0,0.06);
    transition: color 0.15s, background 0.15s;
    z-index: 2;
}
.filter-collapse-handle:hover {
    background: #f8fafc;
    color: #016C78;
}
.dark .filter-collapse-handle {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
.dark .filter-collapse-handle:hover {
    background: #334155;
    color: #02C38D;
}

/* Panel inner container */
.filter-panel-inner {
    width: 320px;
    max-width: 90vw;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -4px 0 16px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dark .filter-panel-inner {
    background: #1e293b;
    border-left-color: #334155;
}

/* Slide transition classes */
.filter-panel-hidden {
    opacity: 0;
    transform: translateX(100%);
}
.filter-panel-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Header */
.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #016C78;
    background: #f8fafc;
    flex-shrink: 0;
}
.dark .filter-panel-header {
    background: #0f172a;
}

.filter-panel-close {
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.15s, background 0.15s;
}
.filter-panel-close:hover {
    color: #0f172a;
    background: #e2e8f0;
}
.dark .filter-panel-close:hover {
    color: #f1f5f9;
    background: #334155;
}

/* Body */
.filter-panel-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.filter-panel-scroll {
    flex: 1;
    overflow-y: auto;
}

/* Content area shrinks when filter is open */
body.filter-open #content-main {
    margin-right: 320px;
    transition: margin-right 0.25s ease;
}
#content-main {
    transition: margin-right 0.25s ease;
}

/* Horizontal scroll on results table when space is tight */
body.filter-open .result-list-wrapper {
    overflow-x: auto;
}
body.filter-open #result_list {
    overflow-x: auto;
}

/* ── Collapsible filter sections ── */
.filter-section {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}
.dark .filter-section {
    border-bottom-color: #334155;
}
.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ── Active filter chips — Unfold-compatible ── */
#active-filter-chips {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0.5rem 0 !important;
}

/* ── Advanced filters page ── */
.adv-filter-grid {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
}
.adv-filter-grid > div:first-child,
.adv-filter-grid > div:nth-child(2),
.adv-filter-grid > div:nth-child(3),
.adv-filter-grid > div:nth-child(4) {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.adv-filter-row select,
.adv-filter-row input[type="text"],
.adv-filter-row input[type="number"],
.adv-filter-row input[type="date"],
.adv-filter-row input[type="datetime-local"] {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}
.adv-filter-row select:focus,
.adv-filter-row input:focus {
    outline: none;
    border-color: #016C78;
    box-shadow: 0 0 0 2px rgba(1, 108, 120, 0.15);
}
.adv-filter-actions {
    margin-top: 1rem !important;
}
.adv-filter-actions .button {
    padding: 0.5rem 1rem !important;
    font-size: 0.8125rem !important;
    border-radius: 0.375rem !important;
}
.adv-filter-actions .button.default {
    background: #016C78 !important;
    border-color: #016C78 !important;
    color: #fff !important;
}
.adv-filter-actions .button.default:hover {
    background: #014e57 !important;
}
.adv-filter-actions .button.default:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.button.row-remove {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
    font-size: 0.75rem !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 0.375rem !important;
}
.button.row-remove:hover {
    background: #fee2e2 !important;
}
.button.add-row {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #16a34a !important;
    font-weight: 600 !important;
}

/* ── Utility page form styling (save view, select fields — NOT change form) ── */
.sv-card input[type="text"],
.sv-card input[type="number"],
.sv-card textarea,
.adv-filter-grid input[type="text"],
.adv-filter-grid input[type="number"],
.adv-filter-grid input[type="date"],
.adv-filter-grid input[type="datetime-local"] {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: #fff;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}
.sv-card input:focus,
.sv-card textarea:focus,
.adv-filter-grid input:focus {
    outline: none;
    border-color: #016C78;
    box-shadow: 0 0 0 2px rgba(1, 108, 120, 0.15);
}
.sv-card select {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    background: #fff;
}
.sv-card select:focus {
    outline: none;
    border-color: #016C78;
    box-shadow: 0 0 0 2px rgba(1, 108, 120, 0.15);
}
.sv-card label {
    font-size: 0.8125rem;
    color: #334155;
    font-weight: 500;
}

/* ── Change form — HTML5 native date/time widgets ── */
/* Split datetime container */
.html5-split-datetime {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.html5-split-datetime-inputs {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
/* Native date/time inputs */
input.html5-date,
input.html5-time {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.4375rem 0.625rem;
    font-size: 0.8125rem;
    background: #fff;
    color: #334155;
    max-width: 170px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input.html5-date:focus,
input.html5-time:focus {
    outline: none;
    border-color: #016C78;
    box-shadow: 0 0 0 2px rgba(1, 108, 120, 0.15);
}
input.html5-date:hover,
input.html5-time:hover {
    border-color: #94a3b8;
}
/* Timezone hint */
.html5-tz-hint {
    font-size: 0.6875rem;
    color: #94a3b8;
    font-style: italic;
}

/* Timezone hint on datetime fields via CSS */
.datetime::after {
    content: "Note: You are 4 hours behind server time (UTC)";
    display: block;
    font-size: 0.6875rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 0.25rem;
}

/* Hide any leftover DateTimeShortcuts injections on old widgets */
.datetimeshortcuts { display: none !important; }
.timezonewarning { display: none !important; }

/* Also hide old datetime validation artifacts */
.datetime img[src*="icon_alert"],
.datetime img[src*="warning"],
span.invalid-date,
span.invalid-time {
    display: none !important;
}

/* ── Change form — help text ── */
.help-text,
.helptext,
div.help {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ── Button variants ── */
/* Delete / destructive button — red */
.button-danger,
a.button-danger,
#delete-view-btn {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
.button-danger:hover,
a.button-danger:hover,
#delete-view-btn:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}

/* Secondary / outline button — for less prominent actions */
.button-secondary,
a.button-secondary {
    background: #fff;
    border: 1px solid #016C78;
    color: #016C78;
}
.button-secondary:hover,
a.button-secondary:hover {
    background: #f0fdfa;
    border-color: #014e57;
    color: #014e57;
}

/* Accent / mint green buttons (Process View, Update View) */
#process-view-btn,
#update-view-btn {
    background: #02C38D !important;
    border-color: #02C38D !important;
    color: #fff !important;
}
#process-view-btn:hover,
#update-view-btn:hover {
    background: #01a577 !important;
    border-color: #01a577 !important;
}

/* Download CSV — green success variant */
#export-download-btn {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}
#export-download-btn:hover {
    background: #15803d !important;
    border-color: #15803d !important;
}

/* ── Fieldset section headers (teal bar like staging) ── */
fieldset.module.aligned > h2,
fieldset.module.aligned > details > summary h2 {
    background: #016C78;
    color: #fff;
    margin: 0;
    padding: 8px 12px;
    font-weight: 500;
    font-size: 0.8125rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

/* ── Collapsible fieldsets (details/summary) ── */
fieldset details > summary {
    list-style: none;
}
fieldset details > summary::-webkit-details-marker {
    display: none;
}
fieldset details .details-arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.625rem;
    margin-right: 0.375rem;
    color: #fff;
}
fieldset details[open] .details-arrow {
    transform: rotate(90deg);
}
fieldset details > summary h2 {
    user-select: none;
    cursor: pointer;
}

/* ── Change-form action buttons (button-3 from old admin) ── */
.button-3,
a.button-3 {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid #016C78;
    background: #016C78;
    color: #fff !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    line-height: 1.4;
}
.button-3:hover,
a.button-3:hover {
    background: #014e57;
    border-color: #014e57;
    color: #fff !important;
}
input.button-3[type="button"] {
    display: inline-flex;
    align-items: center;
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid #016C78;
    background: #016C78;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    line-height: 1.4;
}
input.button-3[type="button"]:hover {
    background: #014e57;
    border-color: #014e57;
}

/* Action button bar — consistent placement above forms */
.action-button-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

/* ── Multi-select (Groups field) styling ── */
#content select[multiple],
select[name="groups"] {
    width: 100%;
    max-width: 400px;
    min-height: 140px;
    padding: 0.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #334155;
}
#content select[multiple]:focus,
select[name="groups"]:focus {
    outline: none;
    border-color: #016C78;
    box-shadow: 0 0 0 2px rgba(1, 108, 120, 0.15);
}
#content select[multiple] option,
select[name="groups"] option {
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 1px;
}
#content select[multiple] option:checked,
select[name="groups"] option:checked {
    background: #016C78 linear-gradient(0deg, #016C78, #016C78);
    color: #fff;
}
#content select[multiple] option:hover,
select[name="groups"] option:hover {
    background: #f0fdfa;
}
