/* EDOP overrides on top of Tabler — keep minimal, do NOT override .btn globally */

:root {
    --tblr-primary: #206bc4;
}

/* Legacy admin markup bridge (scoped) */
.panel {
    background: var(--tblr-card-bg);
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    box-shadow: var(--tblr-box-shadow-card);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.panel h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.panel a.btn,
.panel button.btn,
.panel .btn.secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.4375rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--tblr-border-radius);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    background: var(--tblr-primary);
    color: #fff;
}

.panel .btn.secondary {
    background: transparent;
    color: var(--tblr-primary);
    border-color: var(--tblr-primary);
}

.flash {
    border-radius: var(--tblr-border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.flash.ok {
    background: var(--tblr-success-lt);
    color: var(--tblr-success);
}

.flash.err {
    background: var(--tblr-danger-lt);
    color: var(--tblr-danger);
}

.muted {
    color: var(--tblr-secondary);
}

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat {
    padding: 1rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    background: var(--tblr-bg-surface-secondary);
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tblr-primary);
    margin-top: 0.25rem;
}

/* Public profile table */
.edop-info-table {
    width: 100%;
    margin-bottom: 0;
}

.edop-info-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--tblr-border-color);
    vertical-align: top;
}

.edop-info-table td:first-child {
    width: 32%;
    background: var(--tblr-bg-surface-secondary);
    font-weight: 600;
}

.edop-notice,
.notice-body,
.edop-notice-content {
    line-height: 1.65;
    max-width: none !important;
    width: 100%;
    margin: 0;
    font-size: 1rem;
}

.edop-notice-content h1,
.edop-notice-content h2,
.notice-body h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--tblr-border-color);
}

.edop-notice-content h1:first-child,
.edop-notice-content h2:first-child,
.notice-body h2:first-child {
    margin-top: 0;
}

.edop-notice-content p,
.notice-body p {
    margin-bottom: 0.75rem;
}

.edop-notice-content ul,
.notice-body ul {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.edop-detail-meta {
    margin-bottom: 1rem;
}

/* Logo — override Tabler .navbar-brand-image { height: 2rem } */
.navbar-vertical .edop-sidebar-brand {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 100%;
    padding: 1rem 1.25rem 1.25rem !important;
    margin: 0 !important;
    margin-inline: 0 !important;
    text-align: left !important;
}

.navbar-vertical .edop-brand-link {
    display: block;
    width: 100%;
    text-align: left;
}

.navbar-vertical .edop-logo {
    display: block;
    height: 3.75rem;
    width: auto;
    max-width: 100%;
    margin: 0;
    object-fit: contain;
    object-position: left center;
}

.edop-home-logo {
    text-align: center;
}

.edop-home-logo .edop-logo {
    height: 4.25rem;
    width: auto;
    max-width: 16rem;
}

.page-pretitle {
    max-width: 48rem;
    white-space: normal;
}

.edop-rights-page {
    max-width: 52rem;
    line-height: 1.55;
}

.edop-rights-page h2 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.edop-rights-page h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.edop-rights-page ul {
    margin-bottom: 1rem;
}

.edop-rights-page .card-sm {
    background: var(--tblr-bg-surface-secondary, #f8fafc);
}

.navbar-vertical .nav-link-title {
    white-space: normal;
    line-height: 1.25;
}

.edop-tenant-switcher-box {
    position: relative;
}

.edop-tenant-switcher-list {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 18rem;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--tblr-border-color, #d0d5dd);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.12);
}

.edop-tenant-switcher-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.45rem 0.75rem;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.edop-tenant-switcher-item:hover,
.edop-tenant-switcher-item:focus {
    background: var(--tblr-bg-surface-secondary, #f1f5f9);
    outline: none;
}

.edop-tenant-switcher-all {
    font-weight: 600;
    border-bottom: 1px solid var(--tblr-border-color, #d0d5dd);
}

.legal-basis-filter-input,
.legal-basis-picker-search {
    width: 100%;
}

.legal-basis-picker {
    position: relative;
    max-width: 900px;
}

.legal-basis-picker-results {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow: auto;
    margin-top: 0.25rem;
    background: var(--tblr-card-bg, #fff);
    border: 1px solid var(--tblr-border-color, #ddd);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.legal-basis-picker-option {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    line-height: 1.35;
}

.legal-basis-picker-option:hover,
.legal-basis-picker-option.is-active {
    background: rgba(32, 107, 196, 0.08);
}

.legal-basis-picker-id {
    color: var(--tblr-secondary, #667);
    font-size: 0.85em;
}

.legal-basis-picker-empty {
    padding: 0.75rem;
}

.legal-basis-checkbox-list [data-legal-basis-search][hidden] {
    display: none !important;
}

.bulk-merge-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: #f4f7fb;
    border: 1px solid var(--tblr-border-color, #dce3ec);
    border-radius: 8px;
}

.bulk-merge-bar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.bulk-merge-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
}

.bulk-merge-modal[hidden] {
    display: none !important;
}

.bulk-merge-modal-dialog {
    width: min(560px, 100%);
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.bulk-merge-choice {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.55rem 0.35rem;
    border-bottom: 1px solid var(--tblr-border-color, #eee);
    cursor: pointer;
}

.bulk-merge-choice:last-child {
    border-bottom: 0;
}

.bulk-merge-choice input {
    margin-top: 0.2rem;
    width: auto;
}

/* Admin edit / create forms */
.edop-edit-tabs {
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--tblr-border-color);
}

.edop-edit-tabs .nav-link {
    white-space: nowrap;
}

.edop-cat-nav {
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    background: var(--tblr-bg-surface);
}

.edop-cat-nav .list-group-item {
    border-left: 0;
    border-right: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
}

.edop-cat-nav .list-group-item:first-child {
    border-top: 0;
}

.edop-cat-pill-nav {
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.edop-edit-card {
    box-shadow: var(--tblr-box-shadow-card);
}

.edop-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tblr-border-color);
}

.edop-check-list {
    max-height: 26rem;
    overflow: auto;
    padding: 0.75rem 1rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    background: var(--tblr-bg-surface-secondary, #f8fafc);
}

.edop-processor-pick-list {
    max-height: 16rem;
    overflow: auto;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    background: var(--tblr-bg-surface-secondary, #f8fafc);
}

.edop-processor-pick-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--tblr-border-color);
    background: transparent;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
}

.edop-processor-pick-item:last-child {
    border-bottom: 0;
}

.edop-processor-pick-item:hover:not(:disabled) {
    background: rgba(32, 107, 196, 0.08);
}

.edop-processor-pick-item.is-selected {
    background: rgba(32, 107, 196, 0.14);
}

.edop-processor-pick-item.is-linked,
.edop-processor-pick-item:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.edop-check-item {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin: 0 0 0.55rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--tblr-border-color);
}

.edop-check-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.edop-check-item .form-check-input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.edop-check-item .form-check-label {
    line-height: 1.35;
}

/* Legacy .panel bare fields → Tabler-like controls */
.panel > form > label,
.panel form .grid label {
    display: block;
    margin: 0.85rem 0 0.35rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.panel > form > label:first-of-type,
.panel form .grid > div > label:first-child {
    margin-top: 0;
}

.panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.panel select,
.panel textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.4375rem 0.75rem;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.4285714;
    color: inherit;
    background: var(--tblr-bg-forms, #fff);
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
}

.panel input[type="checkbox"],
.panel input[type="radio"] {
    width: auto;
}

.panel table {
    width: 100%;
    border-collapse: collapse;
}

.panel table th,
.panel table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--tblr-border-color);
    text-align: left;
    vertical-align: top;
}

.panel table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--tblr-secondary);
    background: var(--tblr-bg-surface-secondary, #f8fafc);
}
