/* ===== DASHBOARD STYLES ===== */

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--pure-black) 0%, var(--dark-gray) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: var(--pure-white);
}

.loading-content i {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--primary-gold);
}

.loading-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-gold);
}

.loading-content p {
    color: var(--gold-light);
    font-size: 1.1rem;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--off-white);
}

/* Sidebar */
.dashboard-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--pure-black) 0%, var(--dark-gray) 100%);
    color: var(--pure-white);
    display: flex;
    flex-direction: column;
    border-right: 3px solid var(--primary-gold);
    transition: var(--transition);
    z-index: 100;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
    text-align: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--primary-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--pure-black);
}

.user-info h3 {
    color: var(--primary-gold);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.user-role {
    color: var(--gold-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.user-ref {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
    border: 1px solid var(--primary-gold);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #cccccc;
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
    position: relative;
}

.nav-item i {
    width: 24px;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.nav-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
    border-left-color: var(--primary-gold);
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary-gold);
    border-left-color: var(--primary-gold);
}

.nav-badge {
    margin-left: auto;
    background: var(--medium-gray);
    color: var(--pure-white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-badge.gold {
    background: var(--primary-gold);
    color: var(--pure-black);
}

.nav-badge.new {
    background: var(--danger-red);
    animation: pulse 2s infinite;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--medium-gray);
}

.prayer-count {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid var(--primary-gold);
}

.prayer-count i {
    font-size: 2rem;
    color: var(--primary-gold);
}

.prayer-count h4 {
    color: var(--primary-gold);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.prayer-count p {
    color: var(--pure-white);
    font-size: 1.5rem;
    font-weight: bold;
}

.btn-logout {
    width: 100%;
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
    padding: 0.75rem;
}

.btn-logout:hover {
    background: var(--primary-gold);
    color: var(--pure-black);
}

/* Main Content */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Dashboard Header */
.dashboard-header {
    background: var(--pure-white);
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--primary-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-gold);
    cursor: pointer;
    display: none;
}

#dashboardTitle {
    color: var(--pure-black);
    font-size: 1.8rem;
    margin: 0;
}

.breadcrumb {
    color: var(--light-gray);
    font-size: 0.9rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #ddd;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--off-white);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.stat-item i {
    color: var(--primary-gold);
    font-size: 1.2rem;
}

.stat-item small {
    display: block;
    color: var(--light-gray);
    font-size: 0.8rem;
}

.stat-item strong {
    color: var(--pure-black);
    font-size: 1.2rem;
}

/* Notifications */
.notifications {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-gold);
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-red);
    color: var(--pure-white);
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: var(--pure-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    border: 1px solid #ddd;
    display: none;
    z-index: 100;
}

.notification-dropdown.show {
    display: block;
}

.notification-dropdown h4 {
    padding: 1rem;
    margin: 0;
    border-bottom: 1px solid #eee;
    color: var(--pure-black);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: var(--light-gray);
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-gold);
}

.section-header h2 {
    color: var(--pure-black);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header p {
    color: var(--light-gray);
    font-size: 1.1rem;
}

/* Overview Stats */
.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--pure-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.stat-card.gold {
    border-color: var(--primary-gold);
    background: linear-gradient(135deg, #fff9e6, #fff);
}

.stat-card i {
    font-size: 3rem;
    color: var(--primary-gold);
}

.stat-card h3 {
    color: var(--pure-black);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--pure-black);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-status {
    background: var(--off-white);
    color: var(--light-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
}

/* Overview Events & Messages */
.overview-events,
.overview-messages {
    background: var(--pure-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid #e0e0e0;
}

.overview-events h3,
.overview-messages h3 {
    color: var(--pure-black);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.event-empty,
.message-empty {
    padding: 2rem;
    text-align: center;
    color: var(--light-gray);
}

.event-empty i,
.message-empty i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* Date Detail Card */
.date-detail-card {
    background: var(--pure-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-gold);
    text-align: center;
}

.date-loading {
    padding: 2rem;
}

.date-loading i {
    font-size: 2rem;
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

/* Prayer Timer */
.prayer-timer-card {
    background: var(--pure-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-gold);
}

.timer-display {
    text-align: center;
}

.timer-digits {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-gold);
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.timer-status {
    color: var(--light-gray);
    font-style: italic;
}

/* Reflection Card */
.reflection-card {
    background: var(--pure-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-gold);
}

.reflection-card textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.word-count {
    text-align: right;
    color: var(--light-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Dashboard Footer */
.dashboard-footer {
    padding: 1.5rem 2rem;
    background: var(--pure-white);
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: var(--light-gray);
    font-size: 0.9rem;
}

.dashboard-footer a {
    color: var(--primary-gold);
    text-decoration: none;
}

.dashboard-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-sidebar {
        width: 250px;
    }
    
    .overview-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .dashboard-sidebar {
        position: fixed;
        left: -280px;
        height: 100vh;
        transition: left 0.3s ease;
    }
    
    .dashboard-sidebar.show {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header-stats {
        display: none;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem;
    }
    
    .dashboard-content {
        padding: 1rem;
    }
    
    .timer-digits {
        font-size: 2.5rem;
    }
    
    .timer-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
}