/* Shared by the management interface and the standalone dashboard. */
select,
.form-group select,
.filter-bar select {
    border-radius: 12px;
}

body > header ~ main input:not([type="checkbox"]):not([type="radio"]),
body > header ~ main button {
    border-radius: 10px;
}

/* Keep native form, validation and keyboard behavior while styling the picker.
   Browsers without base-select support retain their native picker. */
@supports (appearance: base-select) {
    select:not([multiple]):not([size]),
    select:not([multiple]):not([size])::picker(select) {
        appearance: base-select;
    }

    select:not([multiple]):not([size]) {
        background-image: none;
        padding-right: 16px;
        align-items: center;
        gap: 12px;
    }

    select:not([multiple]):not([size])::picker(select) {
        margin-block: 6px;
        padding: 6px;
        border: 1px solid var(--border, #dbe3eb);
        border-radius: 14px;
        background: var(--surface, #fff);
        color: var(--text, #202f42);
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
        max-height: min(320px, 50dvh);
        overflow-y: auto;
        overscroll-behavior: contain;
        font: inherit;
    }

    select:not([multiple]):not([size]) option {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 8px;
        min-height: 40px;
        background: transparent;
        color: var(--text, #202f42);
        font: inherit;
        cursor: pointer;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    select:not([multiple]):not([size]) option:hover,
    select:not([multiple]):not([size]) option:focus-visible {
        background: var(--surface-hover, #f2f5f8);
        outline: none;
    }

    select:not([multiple]):not([size]) option:checked {
        background: var(--accent-soft, #e8f0fa);
        font-weight: 600;
    }

    select:not([multiple]):not([size]) option:disabled {
        opacity: 0.5;
        cursor: default;
    }

    select:not([multiple]):not([size]) option::checkmark {
        order: 1;
        margin-inline-start: auto;
        color: var(--accent-dark, var(--accent, #225c9f));
    }

    select:not([multiple]):not([size])::picker-icon {
        color: var(--text-secondary, #64748b);
    }
}
