/* ============================================
   VarsityPlug — Premium Enterprise Dashboard Styles
   ============================================ */

:root {
    --sidebar-width: 280px;
}

/* === Layout === */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    background: var(--bg-color);
}

/* === Sidebar === */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 80px; /* Aligns below the 80px navigation header */
    height: calc(100vh - 80px);
    border-right: 1px solid var(--navy-100);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
    padding: 1.5rem 1rem;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.sidebar-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--navy-400);
    width: 1.25rem;
    height: 1.25rem;
}

.sidebar-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--navy-50);
    border: 1px solid var(--navy-100);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--navy-900);
    outline: none;
    transition: all 0.2s;
}

.sidebar-search input:focus {
    background: var(--card-bg);
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    padding-right: 0.25rem; /* prevent content from hiding under scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--navy-100) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--navy-100);
    border-radius: 99rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--navy-500);
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--navy-50);
    color: var(--navy-900);
}

.sidebar-link.active {
    background: rgba(37, 99, 235, 0.05);
    color: var(--blue-600);
}

.sidebar-link i {
    width: 1.25rem;
    height: 1.25rem;
}

.link-badge {
    margin-left: auto;
    background: var(--navy-50);
    color: var(--navy-500);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.625rem;
    border-radius: 99rem;
}

/* === Sidebar Footer (Profile) === */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--navy-100);
    color: var(--navy-800);
    border-radius: 99rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    position: relative;
}

.user-status {
    width: 0.625rem;
    height: 0.625rem;
    background: #10b981;
    border: 2px solid var(--card-bg);
    border-radius: 99rem;
    position: absolute;
    bottom: 0;
    right: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--navy-900);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--navy-500);
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #ef4444;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.logout-link:hover {
    background: #fef2f2;
}

/* === Listing Cards & Badges (Main Content) === */
.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
}

.badge-active { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-sold { background: rgba(100, 116, 139, 0.1); color: #475569; border: 1px solid rgba(100, 116, 139, 0.2); }
.badge-featured { background: rgba(245, 158, 11, 0.1); color: #D97706; border: 1px solid rgba(245, 158, 11, 0.2); }

/* --- New Compact Hierarchy --- */
.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--navy-400);
}

.meta-dot {
    width: 3px;
    height: 3px;
    background: var(--navy-200);
    border-radius: 50%;
}

.card-title-compact {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--navy-900);
    line-height: 1.3;
}

.action-grid-dash {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 8px;
    align-items: center;
}

.btn-boost-premium {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.btn-boost-premium:hover {
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.3);
    transform: translateY(-1px);
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === Modals === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 32px;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* === Mobile Responsiveness === */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 100; /* Above nav (50) and overlay */
        transform: translateX(-100%);
        box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    }

    .dashboard-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(4px);
        z-index: 90;
    }
}
