/**
 * Backlink Intelligence Pro — Application Styles
 * Modern white/blue Bootstrap admin theme
 */

:root {
    --bip-primary: #0d6efd;
    --bip-primary-dark: #0a58ca;
    --bip-sidebar-bg: #0b3d91;
    --bip-sidebar-width: 260px;
    --bip-topnav-height: 64px;
    --bip-body-bg: #f4f7fb;
}

body {
    background-color: var(--bip-body-bg);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: #212529;
}

/* Layout */
.admin-wrapper {
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--bip-sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bip-sidebar-bg) 0%, #072a66 100%);
    color: #fff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.25s ease;
    z-index: 1040;
}

.admin-main {
    min-width: 0;
    background: var(--bip-body-bg);
}

.admin-topnav {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    min-height: var(--bip-topnav-height);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.admin-content {
    max-width: 1400px;
}

.admin-footer {
    background: #fff;
    border-top: 1px solid #e9ecef;
}

/* Sidebar */
.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.sidebar-brand .brand-text {
    color: #fff;
    line-height: 1.2;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.925rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 600;
}

.sidebar-nav .nav-link-disabled {
    opacity: 0.65;
}

.sidebar-nav .nav-link-disabled:hover {
    opacity: 0.85;
}

.sidebar-nav .nav-link .badge {
    font-size: 0.65rem;
    font-weight: 500;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Top nav */
.avatar-circle {
    width: 36px;
    height: 36px;
    background: #e7f1ff;
    color: var(--bip-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle {
    text-decoration: none;
}

/* Cards */
.stat-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.1) !important;
}

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

.stat-value {
    color: #1a1a2e;
    line-height: 1.1;
}

/* Coming soon */
.coming-soon-icon {
    width: 80px;
    height: 80px;
    background: #e7f1ff;
    color: var(--bip-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--bip-primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Error pages */
.error-page {
    background: var(--bip-body-bg);
}

.error-wrapper .display-1 {
    font-size: 6rem;
    line-height: 1;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
    }

    .admin-wrapper.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1035;
    }
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
}

.card-header {
    font-weight: 600;
}

/* Guest authentication */
.guest-auth-body {
    background: linear-gradient(135deg, #f4f7fb 0%, #e8f0fe 100%);
}

.guest-auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(13, 110, 253, 0.12);
    color: var(--bip-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.guest-auth-card {
    border-radius: 16px;
}
