/* ============================================================
   X-connecteur — styles principaux
   ============================================================ */

/* ── Variables ── */
:root {
    --sidebar-width: 248px;
    --navbar-height: 56px;
    --sidebar-bg: #1a2035;
    --sidebar-text: rgba(255,255,255,.72);
    --sidebar-text-hover: #fff;
    --sidebar-active-bg: rgba(67,97,238,.25);
    --sidebar-active-border: #4361ee;
    --sidebar-section: rgba(255,255,255,.35);
    --accent: #4361ee;
    --accent-indigo: #7048e8;
    --accent-teal: #0ca678;
    --accent-orange: #f76707;
    --bg-page: #f0f2f8;
    --card-border: rgba(0,0,0,.07);
    --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --card-shadow-hover: 0 4px 12px rgba(0,0,0,.12);
    --radius: 10px;
    --radius-sm: 6px;
}

/* ── Reset / base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    padding-top: var(--navbar-height);
    background-color: var(--bg-page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 0.9rem;
    color: #212529;
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════════ */
.app-navbar {
    background: linear-gradient(135deg, #1a2035 0%, #2d3561 100%);
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    padding: 0 1rem;
    height: var(--navbar-height);
}

.navbar-brand { padding: 0; }

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--accent);
    border-radius: 7px;
    margin-right: 8px;
    font-size: .9rem;
    color: #fff;
}

.brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: .01em;
}

.brand-accent { color: #90caf9; }

.badge-superadmin {
    background: rgba(248,75,75,.15);
    color: #ff8787;
    border: 1px solid rgba(248,75,75,.3);
    padding: .3rem .65rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
}

.btn-navbar-org, .btn-navbar-user {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
    border-radius: 20px;
    padding: .3rem .75rem;
    font-size: .82rem;
    transition: background .15s;
}
.btn-navbar-org:hover, .btn-navbar-user:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
    border-color: rgba(255,255,255,.25);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    margin-right: 6px;
}

.navbar-org-name {
    font-size: .82rem;
    color: rgba(255,255,255,.7);
}

.dropdown-menu {
    border-radius: var(--radius);
    padding: .5rem;
    margin-top: .5rem !important;
}
.dropdown-menu .dropdown-item {
    border-radius: var(--radius-sm);
    padding: .45rem .75rem;
    font-size: .875rem;
}
.dropdown-menu .dropdown-item:hover { background-color: #f0f4ff; }
.dropdown-menu .dropdown-item.active { background-color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════ */
#sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: .75rem 0;
}

.sidebar-nav {
    flex: 1;
    padding: 0;
}

.sidebar-section-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--sidebar-section);
    padding: 1.25rem 1.25rem .35rem;
    list-style: none;
}

#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .5rem 1.25rem;
    color: var(--sidebar-text);
    font-size: .875rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color .15s, background .15s, border-color .15s;
    white-space: nowrap;
}

#sidebar .nav-link:hover {
    color: var(--sidebar-text-hover);
    background: rgba(255,255,255,.06);
}

#sidebar .nav-link.active {
    color: #fff;
    background: var(--sidebar-active-bg);
    border-left-color: var(--sidebar-active-border);
    font-weight: 600;
}

#sidebar .nav-link-sub {
    padding-left: 2.5rem;
    font-size: .82rem;
    color: rgba(255,255,255,.5);
}
#sidebar .nav-link-sub:hover { color: rgba(255,255,255,.8); }
#sidebar .nav-link-sub.active { color: #fff; border-left-color: rgba(255,255,255,.4); }

.nav-icon {
    width: 18px;
    text-align: center;
    font-size: .95rem;
    flex-shrink: 0;
    opacity: .85;
}

.sidebar-footer {
    padding: .75rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: auto;
}

.env-badge {
    font-size: .72rem;
    color: rgba(255,255,255,.4);
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* Overlay mobile */
#sidebarOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 150;
}
#sidebarOverlay.show { display: block; }

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════════ */
#main_content {
    margin-left: var(--sidebar-width);
    padding: 1.75rem 2rem;
    min-height: calc(100vh - var(--navbar-height));
}

/* ── Flash alerts ── */
.app-alert {
    border-radius: var(--radius);
    border: none;
    margin-bottom: .75rem;
    font-size: .875rem;
}

/* ── En-tête de page ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.page-header-title h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1a2035;
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: .875rem;
    color: #6c757d;
    margin: .2rem 0 0;
}

.page-header-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ── Bouton xs ── */
.btn-xs {
    padding: .2rem .5rem;
    font-size: .75rem;
    border-radius: 5px;
    line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════
   STAT CARDS (DASHBOARD)
══════════════════════════════════════════════════════════════ */
.stat-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform .15s, box-shadow .15s;
    background: #fff;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.25rem .75rem;
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #1a2035;
}

.stat-card-label {
    font-size: .8rem;
    color: #6c757d;
    margin-top: .15rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 1.25rem;
    background: rgba(0,0,0,.025);
    border-top: 1px solid var(--card-border);
    font-size: .78rem;
}

.stat-card-link {
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent);
}
.stat-card-link:hover { text-decoration: underline; }

/* Couleurs */
.stat-card--blue   .stat-card-icon { background: rgba(67,97,238,.12);  color: #4361ee; }
.stat-card--indigo .stat-card-icon { background: rgba(112,72,232,.12); color: #7048e8; }
.stat-card--teal   .stat-card-icon { background: rgba(12,166,120,.12); color: #0ca678; }
.stat-card--orange .stat-card-icon { background: rgba(247,103,7,.12);  color: #f76707; }

.stat-card--blue   { border-top: 3px solid #4361ee; }
.stat-card--indigo { border-top: 3px solid #7048e8; }
.stat-card--teal   { border-top: 3px solid #0ca678; }
.stat-card--orange { border-top: 3px solid #f76707; }

/* ══════════════════════════════════════════════════════════════
   CARDS GRAPHIQUES
══════════════════════════════════════════════════════════════ */
.card {
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    padding: .9rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.card-title {
    font-size: .9rem;
    font-weight: 600;
    color: #343a40;
    margin: 0;
}

.chart-card .card-body { padding: 1.25rem; }

.empty-chart-placeholder {
    text-align: center;
    color: #adb5bd;
    padding: 2rem;
}
.empty-chart-placeholder i { font-size: 2.5rem; margin-bottom: .75rem; display: block; }
.empty-chart-placeholder p { font-size: .85rem; margin: 0; }

/* ── Couleurs inline pour Chart.js ── */
.text-indigo { color: var(--accent-indigo) !important; }

/* ══════════════════════════════════════════════════════════════
   LISTES RÉCENTES (DASHBOARD)
══════════════════════════════════════════════════════════════ */
.recent-card { overflow: hidden; }

.recent-item {
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--card-border);
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0 !important;
    transition: background .12s;
}
.recent-item:hover { background: #f8f9ff !important; }
.recent-item:first-child { border-top: none; }

.recent-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.recent-item-icon.active   { background: rgba(12,166,120,.12);  color: #0ca678; }
.recent-item-icon.inactive { background: rgba(108,117,125,.1);  color: #6c757d; }
.recent-item-icon.draft    { background: rgba(247,103,7,.12);   color: #f76707; }

.recent-item-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .15rem;
    font-size: .78rem;
}

.recent-item-date {
    font-size: .75rem;
    color: #adb5bd;
    margin-top: .15rem;
}

.badge-type, .badge-trigger {
    background: rgba(67,97,238,.08);
    color: #4361ee;
    font-size: .7rem;
    padding: .15rem .45rem;
    border-radius: 4px;
    font-weight: 600;
}
.badge-trigger {
    background: rgba(112,72,232,.08);
    color: #7048e8;
}

/* ══════════════════════════════════════════════════════════════
   TABLES (PAGES LISTE)
══════════════════════════════════════════════════════════════ */
.table-card {
    overflow: hidden;
}

.table-card .table {
    font-size: .875rem;
    margin: 0;
}

.table-card .table thead th {
    background: #f8f9fb;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
    padding: .75rem 1rem;
    white-space: nowrap;
}

.table-card .table tbody td {
    padding: .9rem 1rem;
    border-bottom: 1px solid #f0f2f8;
    vertical-align: middle;
}

.table-card .table tbody tr:last-child td { border-bottom: none; }

.table-card .table tbody tr:hover > td { background: #f8f9ff; }

/* ── Barre de recherche ── */
.list-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-bar {
    max-width: 340px;
    flex: 1;
}

.search-bar .input-group-text {
    background: #fff;
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.search-bar .form-control {
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: none !important;
}

/* ── Icône item dans table ── */
.item-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.item-icon--blue   { background: rgba(67,97,238,.1);   color: #4361ee; }
.item-icon--indigo { background: rgba(112,72,232,.1);  color: #7048e8; }
.item-icon--teal   { background: rgba(12,166,120,.1);  color: #0ca678; }
.item-icon--orange { background: rgba(247,103,7,.1);   color: #f76707; }

/* ── Badges de statut ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .65rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
}
.status-badge i { font-size: .45rem; }

.status-badge--active   { background: rgba(25,135,84,.1);   color: #198754; }
.status-badge--inactive { background: rgba(108,117,125,.1); color: #6c757d; }
.status-badge--draft    { background: rgba(255,153,0,.1);   color: #e07b00; }

/* ── Badges type/déclencheur ── */
.type-badge {
    display: inline-block;
    padding: .25rem .55rem;
    border-radius: var(--radius-sm);
    font-size: .72rem;
    font-weight: 600;
    background: rgba(67,97,238,.08);
    color: #4361ee;
}
.type-badge--oauth2_cc, .type-badge--oauth2_ac { background: rgba(247,103,7,.08); color: #f76707; }
.type-badge--bearer     { background: rgba(112,72,232,.08); color: #7048e8; }
.type-badge--basic_auth { background: rgba(12,166,120,.08); color: #0ca678; }
.type-badge--custom_token { background: rgba(16,152,173,.08); color: #1098ad; }

.trigger-badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .55rem;
    border-radius: var(--radius-sm);
    font-size: .72rem;
    font-weight: 600;
}
.trigger-badge--webhook { background: rgba(112,72,232,.08); color: #7048e8; }
.trigger-badge--cron    { background: rgba(12,166,120,.08);  color: #0ca678; }

/* ── Steps count ── */
.steps-count {
    font-size: .82rem;
    color: #6c757d;
    background: #f0f2f8;
    padding: .2rem .55rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
}

/* ── Boutons ghost d'action ── */
.action-buttons { display: flex; gap: .25rem; justify-content: flex-end; }

.btn-ghost-primary { color: var(--accent);   border: 1px solid transparent; }
.btn-ghost-info    { color: #0ca678;         border: 1px solid transparent; }
.btn-ghost-danger  { color: #dc3545;         border: 1px solid transparent; }

.btn-ghost-primary, .btn-ghost-info, .btn-ghost-danger {
    background: transparent;
    padding: .3rem .5rem;
    border-radius: var(--radius-sm);
    transition: background .12s, border-color .12s;
    font-size: .8rem;
}
.btn-ghost-primary:hover { background: rgba(67,97,238,.1);   border-color: rgba(67,97,238,.2);  color: var(--accent); }
.btn-ghost-info:hover    { background: rgba(12,166,120,.1);  border-color: rgba(12,166,120,.2); color: #0ca678; }
.btn-ghost-danger:hover  { background: rgba(220,53,69,.1);   border-color: rgba(220,53,69,.2);  color: #dc3545; }

/* ── Empty state page entière ── */
.empty-page-state {
    text-align: center;
    padding: 5rem 2rem;
    max-width: 400px;
    margin: 0 auto;
}
.empty-page-icon {
    width: 72px;
    height: 72px;
    background: rgba(67,97,238,.08);
    color: #4361ee;
    font-size: 1.8rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}
.empty-page-state h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; color: #343a40; }

/* ── Empty state inline ── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}
.empty-state-icon {
    font-size: 2.5rem;
    opacity: .2;
    display: block;
    margin-bottom: .75rem;
}
.empty-state p { font-size: .875rem; margin-bottom: .75rem; }

/* ══════════════════════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════════════════════ */
.login-body {
    padding-top: 0;
    background: #f0f2f8;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.login-brand-panel {
    flex: 0 0 420px;
    background: linear-gradient(150deg, #1a2035 0%, #2d3561 60%, #4361ee 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.login-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 240px;
    height: 240px;
    background: rgba(255,255,255,.03);
    border-radius: 50%;
}

.login-brand-content { position: relative; z-index: 1; }

.login-brand-logo {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,.12);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255,255,255,.15);
}

.login-brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: .75rem;
}
.login-brand-name span { color: #90caf9; }

.login-brand-tagline {
    font-size: 1rem;
    color: rgba(255,255,255,.75);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.login-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.login-features li {
    font-size: .875rem;
    color: rgba(255,255,255,.7);
    padding: .35rem 0;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.login-features .fa-check-circle { color: #40c057; font-size: .9rem; }

.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
}

.login-form-inner {
    width: 100%;
    max-width: 380px;
}

.login-form-header {
    margin-bottom: 2rem;
}
.login-form-header h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #1a2035;
    margin-bottom: .25rem;
}

.login-form .form-label {
    font-weight: 600;
    font-size: .85rem;
    color: #495057;
    margin-bottom: .4rem;
}

.login-form .input-group-text {
    background: #f8f9fa;
    border-right: none;
    color: #6c757d;
}

.login-form .form-control {
    border-left: none;
}
.login-form .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}
.login-form .input-group:focus-within .input-group-text,
.login-form .input-group:focus-within .form-control,
.login-form .input-group:focus-within .btn-toggle-pwd {
    border-color: var(--accent);
}

.btn-toggle-pwd {
    background: #f8f9fa;
    border-left: none;
    color: #6c757d;
    cursor: pointer;
}
.btn-toggle-pwd:hover { color: var(--accent); }

.login-submit {
    border-radius: var(--radius);
    font-weight: 700;
    padding: .75rem;
    background: var(--accent);
    border-color: var(--accent);
    font-size: .95rem;
    transition: background .15s, transform .1s;
}
.login-submit:hover {
    background: #3451d1;
    border-color: #3451d1;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .login-brand-panel { display: none; }
    .login-form-panel { background: #f0f2f8; }
}

/* ══════════════════════════════════════════════════════════════
   VARIABLES PANEL / CONFIG MODAL
══════════════════════════════════════════════════════════════ */
.variables-panel {
    position: sticky;
    top: 0;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.var-insert-btn {
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.5rem;
    text-align: left;
    transition: background .12s;
}
.var-insert-btn:hover { background-color: #e8eeff; }

.modal-xl .modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════════
   WORKFLOW BUILDER
══════════════════════════════════════════════════════════════ */
.steps-container { min-height: 60px; }

.step-card { transition: box-shadow .15s; border-radius: var(--radius) !important; }
.step-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }

.step-drag-handle { font-size: 1rem; cursor: grab; }
.step-drag-handle:active { cursor: grabbing; }

.step-card-placeholder {
    height: 52px;
    background: #e8eeff;
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    margin-bottom: .5rem;
}

.step-type-btn { padding: 1rem .5rem; font-size: .85rem; line-height: 1.4; border-radius: var(--radius) !important; }
.step-type-btn.active { font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   API EXPLORER
══════════════════════════════════════════════════════════════ */
.endpoint-group-header {
    background: #f8f9fa;
    cursor: pointer;
    border: 1px solid #e9ecef;
    transition: background .1s;
    border-radius: var(--radius-sm) !important;
}
.endpoint-group-header:hover { background: #e8eeff; border-color: #c5d0f8; }

.endpoint-chip {
    transition: background .1s, box-shadow .1s;
    border: 1px solid transparent;
    border-radius: var(--radius-sm) !important;
}
.endpoint-chip:hover { background: #f0f4ff; border-color: #c5d0f8; }
.endpoint-chip.selected { background: #e8eeff; border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }

.method-badge { font-size: .65rem; min-width: 52px; text-align: center; letter-spacing: .03em; }

/* ══════════════════════════════════════════════════════════════
   RESPONSE MAPPER
══════════════════════════════════════════════════════════════ */
.response-mapper {
    border: 1px solid #dee2e6;
    border-radius: var(--radius);
    padding: .75rem;
    background: #fafbfc;
}

.field-chip {
    cursor: grab;
    font-size: .8rem;
    border-color: #dee2e6 !important;
    transition: background .1s, box-shadow .1s;
    user-select: none;
    border-radius: var(--radius-sm) !important;
}
.field-chip:hover { background: #e8eeff !important; border-color: var(--accent) !important; }
.field-chip.dragging { opacity: .5; cursor: grabbing; }

.field-drag-icon { opacity: .4; }

.field-group-header {
    font-size: .72rem;
    padding: 0 .25rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: .2rem;
    margin-bottom: .3rem;
}

.slot-drop {
    min-height: 32px;
    border: 2px dashed #ced4da;
    border-radius: var(--radius-sm);
    transition: border-color .15s, background .15s;
}
.slot-drop.slot-empty { border-color: #ced4da; background: #fff; }
.slot-drop.slot-filled { border: 1px solid var(--accent); background: #f0f4ff; border-style: solid; }
.slot-drop.dragover { border-color: var(--accent) !important; background: #e8eeff !important; box-shadow: 0 0 0 3px rgba(67,97,238,.2); }

.field-chip-small { font-size: .78rem; display: inline-flex; align-items: center; flex-wrap: wrap; gap: .2rem; }

.mapper-slot { background: #fff; }
.mapper-slot:hover { background: #f8f9fa; }

.slot-metadata {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: .8rem;
}
.slot-metadata .form-label-sm {
    font-size: .72rem;
    color: #6c757d;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ══════════════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════════════ */
.min-w-0 { min-width: 0; }

.bg-success-subtle  { background: rgba(25,135,84,.1) !important; }
.bg-warning-subtle  { background: rgba(255,153,0,.1) !important; }
.bg-secondary-subtle{ background: rgba(108,117,125,.1) !important; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    #sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
    }
    #sidebar.open {
        transform: translateX(0);
    }
    #main_content {
        margin-left: 0;
        padding: 1.25rem;
    }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header-actions { justify-content: flex-start; }
}

@media (max-width: 576px) {
    .list-toolbar { flex-direction: column; align-items: stretch; }
    .search-bar { max-width: 100%; }
}
