/* Custom styles for PBN Admin */

:root {
    --sidebar-width: 250px;
    --primary-color: #667eea;
    --secondary-color: #764ba2;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    padding-top: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.8);
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
    padding-left: 25px;
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.15);
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
}

.sidebar .nav-link i {
    width: 20px;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Navbar */
.navbar-custom {
    margin-left: var(--sidebar-width);
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.table-actions {
    white-space: nowrap;
}

/* Tags/Badges */
.tag-badge {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
}

/* Django messages compatibility with Bootstrap */
.alert-error {
    color: var(--bs-danger-text, #842029);
    background-color: var(--bs-danger-bg, #f8d7da);
    border-color: var(--bs-danger-border, #f5c2c7);
}

.alert-error .btn-close {
    filter: var(--bs-btn-close-white-filter, invert(1) grayscale(100%) brightness(200%));
}

/* Pagination */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 3px;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
}

/* Login page specific */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content,
    .navbar-custom {
        margin-left: 200px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content,
    .navbar-custom {
        margin-left: 0;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Status badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Empty state */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 20px;
}
