/* --- GLOBAL LAYOUT RESETS & BASE TYPOGRAPHY --- */

body {
    background-color: var(--dash-bg);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- Global Layout Containers --- */
.dash-layout-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Premium Top Header Navigation (Midnight Navy Container) --- */
.dash-header {
    background: #0F172A; /* Slate 900 for modern high-contrast */
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
}

.dash-header-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-icon {
    color: var(--accent-indigo);
    display: flex;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: #FFFFFF;
}

.brand-role-badge {
    background: rgba(124, 58, 237, 0.15);
    color: #C084FC;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    border: 1px solid rgba(124, 58, 237, 0.25);
}

.dash-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* --- Return to Home Button --- */
.btn-return-home {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    padding: 0.55rem 1.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-return-home:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-return-home:hover svg, .btn-return-home:hover i {
    transform: translateX(-3px);
}

.btn-return-home i {
    transition: transform 0.2s ease;
}

/* --- Dashboard Content Grid --- */
.dash-content {
    flex-grow: 1;
    padding: 2rem 2.5rem 3rem 2.5rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* --- Premium Header Banner Area --- */
.page-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--dash-border);
    padding-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.page-header-title-section {
    display: flex;
    flex-direction: column;
}

.page-header-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header-icon {
    background: rgba(124, 58, 237, 0.06);
    color: var(--accent-purple);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.page-header-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin: 0;
}

.page-header-subtitle {
    color: var(--text-sub);
    margin: 0.35rem 0 0 3.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.page-header-actions-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* --- Pulsing Status Badge --- */
.sync-badge-container {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--dash-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.sync-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-teal);
    border-radius: 50%;
    position: relative;
}

.sync-pulse-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    background-color: var(--accent-teal);
    border-radius: 50%;
    opacity: 0.4;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.sync-text {
    font-size: 0.8rem;
    color: var(--text-sub);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

/* --- Modern Dashboard Refresh Button --- */
.btn-refresh-light {
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-indigo) 100%);
    color: #FFFFFF !important;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-refresh-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-refresh-light:active {
    transform: translateY(1px);
}

.btn-refresh-light i {
    transition: transform 0.5s ease;
}

.btn-refresh-light:hover i {
    transform: rotate(180deg);
}
