/* ============================================================
   BOOSTBERRY ADMIN PANEL - GLOBAL FIXES
   Include this on every admin page to prevent recurring bugs
   ============================================================ */

/* 1. FIX: Sidebar & Content spacing */
.admin-view {
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar+.main-content {
    margin-left: 240px !important;
}

.main-content-inner {
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. FIX: Remove duplicate wrappers */
.main-content .main-content,
.mainDiv .mainDiv,
.main-content .mainDiv {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 3. FIX: Page header bar */
.page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* 4. FIX: Table container */
.table-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* 5. FIX: DataTables - minimal, no-conflict */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 16px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
}

.dataTables_wrapper .dataTables_info {
    padding: 8px 16px 16px;
    font-size: 11px;
    color: #888;
}

.dataTables_wrapper .dataTables_paginate {
    padding: 0 16px 16px;
}

/* 6. FIX: Deleted row */
tr.deleted-row {
    background: #fef2f2 !important;
}

tr.deleted-row:hover {
    background: #fee2e2 !important;
}

/* 7. FIX: Action icons */
.action-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
}

.action-icon i {
    font-size: 16px;
}

.action-icon.edit:hover {
    background: #eff6ff;
}

.action-icon.delete:hover {
    background: #fef2f2;
}

.action-icon.restore:hover {
    background: #f0fdf4;
}

/* 8. FIX: Green buttons */
.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #059669;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-create:hover {
    background: #047857;
    color: #fff;
    text-decoration: none;
}

/* 9. FIX: Error alert - only show when has content */
.error:empty {
    display: none;
}

/* 10. FIX: Mobile responsive */
@media (max-width: 767px) {
    .sidebar+.main-content {
        margin-left: 0 !important;
    }

    .page-header-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}