/* ============== InlineEditCell ============== */
.iec {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    min-height: 28px;
}
.iec-value { padding: 4px 6px; border-radius: 6px; }
.iec:hover:not(.editing) { background: var(--c-bg-soft); border-radius: 6px; }
.iec:hover:not(.editing) .iec-pencil { opacity: 1; }

/* Pencil shows on hover */
.iec-pencil {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--c-text-muted);
    padding: 2px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity .15s, color .15s, background .15s;
    display: inline-flex; align-items: center;
}
.iec-pencil:hover {
    background: rgba(99, 102, 241, .12);
    color: var(--c-primary);
}
.iec-pencil .material-symbols-rounded { font-size: 14px; }

/* Editing state */
.iec.editing {
    background: rgba(99, 102, 241, .06);
    border: 1.5px solid var(--c-primary);
    border-radius: 8px;
    padding: 2px 4px;
}
.iec-input {
    border: 0;
    background: var(--c-card);
    color: var(--c-text);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    min-width: 100px;
    max-width: 180px;
    outline: none;
}
.iec-input:focus { box-shadow: 0 0 0 2px rgba(99, 102, 241, .25); }

.iec-act {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex; align-items: center;
    transition: all .12s;
}
.iec-act:disabled { opacity: .5; cursor: not-allowed; }
.iec-act .material-symbols-rounded { font-size: 16px; }
.iec-act.commit { color: var(--c-green); }
.iec-act.commit:hover:not(:disabled) { background: rgba(16, 185, 129, .14); }
.iec-act.cancel { color: var(--c-red); }
.iec-act.cancel:hover:not(:disabled) { background: rgba(220, 38, 38, .12); }

/* Flash animation when saved */
@keyframes iecSaved {
    0%   { background: rgba(16, 185, 129, .25); }
    100% { background: transparent; }
}
.iec.saved-flash { animation: iecSaved 1.2s ease; border-radius: 6px; }

/* ============== BulkActionBar ============== */
.bulk-bar {
    position: fixed;
    bottom: 24px;
    inset-inline-start: 50%;
    transform: translateX(50%);
    background: var(--c-text);
    color: white;
    border-radius: 14px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    z-index: 50;
    animation: bulkSlideUp .25s ease;
    min-width: 360px;
    max-width: 90vw;
}
@keyframes bulkSlideUp {
    from { transform: translateX(50%) translateY(40px); opacity: 0; }
    to   { transform: translateX(50%) translateY(0);     opacity: 1; }
}
.bulk-bar.with-modal { z-index: 49; }
.bulk-bar-info {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px;
    padding-inline-end: 12px;
    border-inline-end: 1px solid rgba(255, 255, 255, .15);
}
.bulk-bar-info strong { font-size: 16px; color: #fbbf24; }
.bulk-bar-info .material-symbols-rounded { color: #34d399; font-size: 22px; }

.bulk-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-bar .btn-sm {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .15);
    color: white;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all .15s;
    font-family: inherit;
}
.bulk-bar .btn-sm:hover:not(:disabled) {
    background: rgba(255, 255, 255, .2);
    transform: translateY(-1px);
}
.bulk-bar .btn-sm:disabled { opacity: .55; cursor: not-allowed; }
.bulk-bar .btn-sm .material-symbols-rounded { font-size: 16px; }
.bulk-bar .btn-sm.success { background: rgba(16, 185, 129, .25); border-color: rgba(16, 185, 129, .45); }
.bulk-bar .btn-sm.success:hover:not(:disabled) { background: rgba(16, 185, 129, .4); }
.bulk-bar .btn-sm.danger  { background: rgba(220, 38, 38, .25); border-color: rgba(220, 38, 38, .5); }
.bulk-bar .btn-sm.danger:hover:not(:disabled)  { background: rgba(220, 38, 38, .4); }
.bulk-bar .btn-sm.warn    { background: rgba(245, 158, 11, .25); border-color: rgba(245, 158, 11, .5); }
.bulk-bar .btn-sm.ghost   { background: transparent; border-color: rgba(255, 255, 255, .2); }

/* Row checkbox */
.bulk-check {
    width: 36px; text-align: center;
}
.bulk-check input[type=checkbox] {
    width: 16px; height: 16px;
    accent-color: var(--c-primary);
    cursor: pointer;
}
tr.bulk-selected { background: rgba(99, 102, 241, .07); }
tr.bulk-selected td { border-color: rgba(99, 102, 241, .15); }

/* ===== Recycle Bin entity cards ===== */
.rb-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.rb-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--c-card);
    border: 2px solid var(--c-border);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    text-align: start;
}
.rb-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--c-primary);
    box-shadow: 0 6px 16px rgba(99, 102, 241, .1);
}
.rb-stat-card.active {
    border-color: var(--c-primary);
    background: rgba(99, 102, 241, .05);
}
.rb-stat-card .ico {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: grid; place-items: center;
    flex: 0 0 48px;
}
.rb-stat-card .ico .material-symbols-rounded { font-size: 24px; }
.rb-stat-card .ttl { font-weight: 700; color: var(--c-text); font-size: 14px; }
.rb-stat-card .val { font-size: 22px; font-weight: 800; color: var(--c-text); margin-top: 2px; }

/* ===== Recycle Bin Settings page ===== */
.rbs-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--c-border);
}
.rbs-row:last-of-type { border-bottom: 0; }
.rbs-label { font-weight: 700; color: var(--c-text); font-size: 14px; }
.rbs-hint  { color: var(--c-text-muted); font-size: 12px; margin-top: 4px; max-width: 460px; }

.rbs-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-card);
    color: var(--c-text);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    font-family: inherit;
}
.rbs-input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(99,102,241,.2); }

.rbs-switch {
    display: inline-flex; align-items: center; gap: 10px;
    cursor: pointer;
    user-select: none;
}
.rbs-switch input { display: none; }
.rbs-switch .slider {
    width: 44px; height: 24px;
    background: var(--c-border);
    border-radius: 12px;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}
.rbs-switch .slider::after {
    content: ''; position: absolute;
    inset-block-start: 2px; inset-inline-end: 2px;
    width: 20px; height: 20px;
    background: white; border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.rbs-switch input:checked + .slider { background: var(--c-green); }
.rbs-switch input:checked + .slider::after { transform: translateX(-20px); }
.rbs-switch .rbs-state { font-weight: 700; font-size: 13px; color: var(--c-text); min-width: 50px; }

.rbs-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--c-border);
}
.rbs-stat {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 12px 14px;
}
.rbs-stat .lbl { color: var(--c-text-muted); font-size: 11px; margin-bottom: 4px; }
.rbs-stat .val { font-size: 16px; font-weight: 800; color: var(--c-text); }
.rbs-stat .sub { color: var(--c-text-muted); font-size: 11px; margin-top: 2px; }
