/* =========================================
   500+MATEHUBTOOLS - DASHBOARD PREMIUM UI
   ========================================= */

:root {
    --db-bg: #0b0c10;
    --db-sidebar: #111318;
    --db-surface: #1a1d23;
    --db-accent: #1E6FFF; /* Professional Blue */
    --db-text-primary: #ffffff;
    --db-text-secondary: #858a96;
    --db-border: rgba(255, 255, 255, 0.05);
    --db-accent-glow: rgba(30, 111, 255, 0.2);
}

.dashboard-body {
    background-color: var(--db-bg);
    color: var(--db-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 1. SIDEBAR */
.sidebar {
    width: 260px;
    background: var(--db-sidebar);
    border-right: 1px solid var(--db-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    height: 100%;
    z-index: 10;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: white;
}

.sidebar-nav {
    flex: 1;
    position: relative; /* Maintain container stability */
}

.nav-group {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0;
    margin: 0;
    position: relative;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 0.75rem;
    color: var(--db-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    user-select: none;
}

/* Hover State - Distinct from Active */
.nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.03);
    color: var(--db-text-primary);
}

/* Active State - Premium Highlight */
.nav-item.active {
    background: linear-gradient(90deg, rgba(30, 111, 255, 0.15) 0%, rgba(30, 111, 255, 0.02) 100%);
    color: var(--db-accent);
    box-shadow: inset 0 0 10px rgba(30, 111, 255, 0.05);
}

.nav-item.active i {
    text-shadow: 0 0 15px var(--db-accent);
}

.nav-indicator {
    position: absolute;
    left: -18px;
    width: 6px;
    height: 6px;
    background: var(--accent-secondary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-secondary);
    transition: transform 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    z-index: 20;
    pointer-events: none;
    will-change: transform;
}

.nav-item i { font-size: 1.1rem; width: 20px; }

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--db-border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-user img {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
}

.sidebar-user .user-info h5 { font-size: 0.9rem; margin: 0; }
.sidebar-user .user-info span { 
    font-size: 0.75rem; 
    color: var(--db-text-secondary); 
    background: rgba(255,255,255,0.05);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* 2. MAIN LAYOUT */
.main-content {
    flex: 1;
    display: flex;
    height: 100%;
}

/* PANEL: LEFT PROFILE */
.panel-left {
    width: 300px;
    border-right: 1px solid var(--db-border);
    padding: 2rem;
    overflow-y: auto;
}

.profile-card {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-img {
    width: 100px; height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--db-surface);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.profile-card h3 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.profile-card p { font-size: 0.9rem; color: var(--db-text-secondary); }

.rating-stars { color: #facc15; font-size: 0.8rem; margin: 0.5rem 0 1rem; }

.pill-tabs {
    display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0;
}

.pill-tab {
    padding: 0.4rem 0.8rem;
    background: var(--db-surface);
    border: 1px solid var(--db-border);
    border-radius: 50px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
}

.pill-tab.active {
    background: var(--db-accent);
    color: white; border-color: var(--db-accent);
    box-shadow: 0 4px 10px var(--db-accent-glow);
}

.cert-section h4 { font-size: 0.9rem; color: var(--db-text-secondary); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px;}
.cert-list { display: flex; flex-direction: column; gap: 1rem;}
.cert-item { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem;}
.cert-icon { width: 32px; height: 32px; background: var(--db-surface); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;}

.date-range { margin-top: 2rem; }
.date-selector { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.date-selector input { 
    background: var(--db-surface); border: 1px solid var(--db-border); 
    color: white; font-size: 0.8rem; padding: 0.5rem; border-radius: 4px; width: 100%;
}

/* PANEL: MAIN RIGHT */
.panel-right {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between; align-items: center;
    margin-bottom: 2rem;
}

.view-toggles {
    display: flex; background: var(--db-sidebar); padding: 0.3rem; border-radius: 8px; border: 1px solid var(--db-border);
}
.view-btn {
    padding: 0.4rem 1rem; border: none; background: transparent; color: var(--db-text-secondary);
    font-size: 0.85rem; cursor: pointer; border-radius: 6px; font-weight: 500;
}
.view-btn.active { background: var(--db-surface); color: white; }

/* CALENDAR GRID */
.calendar-container {
    background: var(--db-sidebar);
    border: 1px solid var(--db-border);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 1px solid var(--db-border);
    background: rgba(255,255,255,0.02);
}

.day-cell {
    padding: 1rem; text-align: center; border-right: 1px solid var(--db-border);
    font-size: 0.8rem; color: var(--db-text-secondary);
}
.day-cell.today { color: var(--db-accent); font-weight: 700; }

.calendar-body {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    grid-template-rows: repeat(12, 60px);
}

.time-label {
    grid-column: 1; border-right: 1px solid var(--db-border); border-bottom: 1px solid var(--db-border);
    padding: 0.5rem; font-size: 0.7rem; color: var(--db-text-secondary); text-align: right;
}

.cal-cell {
    position: relative; border-right: 1px solid var(--db-border); border-bottom: 1px solid var(--db-border);
}

.appointment-block {
    position: absolute; left: 4px; right: 4px; top: 4px; bottom: 4px;
    background: rgba(30, 111, 255, 0.15);
    border-left: 3px solid var(--db-accent);
    border-radius: 4px;
    padding: 0.4rem;
    font-size: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
}
.appointment-block:hover { background: rgba(30, 111, 255, 0.25); transform: scale(1.02); }
.appointment-block .info { font-weight: 600; margin-bottom: 2px; }
.appointment-block .meta { color: var(--db-text-secondary); font-size: 0.7rem; }

/* EDITOR SECTION */
.editor-container {
    background: var(--db-sidebar);
    border: 1px solid var(--db-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.editor-toolbar {
    display: flex; gap: 0.75rem; border-bottom: 1px solid var(--db-border); padding-bottom: 1rem; margin-bottom: 1rem;
    color: var(--db-text-secondary);
}
.editor-toolbar i { cursor: pointer; transition: 0.2s; }
.editor-toolbar i:hover { color: white; }

.editor-area {
    min-height: 120px; font-size: 0.95rem; color: #d1d5db; line-height: 1.6; outline: none;
}

.ai-hint {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(127, 0, 255, 0.1); color: #c084fc; border: 1px solid rgba(127,0,255,0.2);
    padding: 0.4rem 0.8rem; border-radius: 50px; font-size: 0.75rem; margin-top: 1rem; cursor: pointer;
}

/* FOOTER FEED */
.feed-section {
    margin-top: 3rem; border-top: 1px solid var(--db-border); padding-top: 2rem;
}
.feed-item {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.feed-item img { width: 32px; height: 32px; border-radius: 50%;}
.feed-item .feed-content { font-size: 0.85rem; color: var(--db-text-secondary); }
.feed-item b { color: white; }

/* ANIMATIONS */
@keyframes slideMain {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
.panel-right { animation: slideMain 0.6s ease-out; }

/* Breadcrumb override */
.breadcrumb { font-size: 0.8rem; color: var(--db-text-secondary); margin-bottom: 1rem;}
/* VIEW SWITCHING */
.view-section {
    display: none;
    animation: slideIn 0.4s ease-out forwards;
}

.view-section.active {
    display: flex;
    flex-direction: column;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--db-sidebar);
    border: 1px solid var(--db-border);
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
