/* ==== Premium Theme Variables ==== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --sidebar-bg: #1e293b;
    --sidebar-color: #94a3b8;
    --sidebar-active: #ffffff;
    --sidebar-active-bg: rgba(99, 102, 241, 0.1);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
}

/* ==== Global Styles ==== */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body) !important;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* ==== Typography ==== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

/* ==== Scrollbar ==== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ==== Sidebar (Premium Dark Look) ==== */
#sidebar-wrapper {
    min-height: 100vh;
    width: 280px;
    background: var(--sidebar-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    box-shadow: 10px 0 30px rgba(0,0,0,0.05);
}

.sidebar-heading {
    padding: 2.5rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-heading i {
    -webkit-text-fill-color: #6366f1;
    margin-right: 12px;
}

#sidebar-wrapper .list-group-item {
    background: transparent;
    border: none;
    color: var(--sidebar-color);
    padding: 0.8rem 1.5rem;
    margin: 0.2rem 1rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

#sidebar-wrapper .list-group-item i {
    font-size: 1.1rem;
    width: 25px;
    margin-right: 12px;
    transition: transform 0.2s ease;
}

#sidebar-wrapper .list-group-item:hover {
    color: var(--sidebar-active);
    background: rgba(255,255,255,0.05);
}

#sidebar-wrapper .list-group-item:hover i {
    transform: translateX(3px);
}

#sidebar-wrapper .list-group-item.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 1.5rem 1.5rem;
}

.sidebar-label {
    padding: 0 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.1rem;
    margin-bottom: 0.5rem;
}

/* ==== Navbar ==== */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ==== Cards (Soft Elevation) ==== */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* ==== Stats Widgets ==== */
.stats-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* ==== Table Styling ==== */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table thead th {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    padding: 1rem;
}

.table tbody tr {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border-radius: 12px;
}

.table tbody td {
    padding: 1.2rem 1rem;
    border: none;
    background: #fff;
}

.table tbody tr td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.table tbody tr td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

/* ==== Badges ==== */
.badge {
    padding: 0.5em 1em;
    font-weight: 600;
    border-radius: 8px;
}

.badge-pending { background: #fef3c7; color: #d97706; }
.badge-posted { background: #d1fae5; color: #059669; }
.badge-failed { background: #fee2e2; color: #dc2626; }

/* ==== Buttons ==== */
.btn-primary {
    background: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.4);
}

/* ==== Responsive ==== */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -280px;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}
