/* --- Dashboard Layout --- */
.dashboard-container {
    padding: 120px 0 60px;
    min-height: 100vh;
}

.dash-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

/* --- Cards --- */
.dash-card {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    color: white;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-text-muted);
    transition: var(--transition);
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
}

/* --- User Info --- */
.user-info {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--color-surface);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
    margin-bottom: 15px;
}

.user-name {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.user-role {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(220, 38, 38, 0.2);
    color: var(--color-primary);
    border-radius: 12px;
    display: inline-block;
    margin-top: 5px;
}

/* --- Sidebar Menu --- */
.dash-menu {
    margin-bottom: 30px;
}

.dash-menu ul {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dash-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.dash-menu a:hover,
.dash-menu a.active {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.1), transparent);
    color: var(--color-primary);
    border-left: 3px solid var(--color-primary);
}

.dash-menu i {
    width: 24px;
    text-align: center;
}

/* --- Wallet --- */
.wallet-balance {
    background: linear-gradient(135deg, var(--color-primary), #9f1239);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

.wallet-balance h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.wallet-balance span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.credit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.credit-btn:hover {
    border-color: var(--color-primary);
    background: rgba(220, 38, 38, 0.05);
}

/* --- Empty state overrides --- */
.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--color-text-muted);
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #3f3f46;
}

/* --- New User Header (Profile Page) --- */
.user-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

/* Optional background effect for header */
.user-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.05), transparent);
    z-index: 0;
}

.user-avatar-frame {
    position: relative;
    z-index: 1;
}

.user-avatar-frame img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.status-dot {
    width: 15px;
    height: 15px;
    background: #22c55e;
    border-radius: 50%;
    position: absolute;
    bottom: -2px;
    right: -2px;
    border: 3px solid var(--color-surface);
}

.user-details {
    z-index: 1;
}

.user-details h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 5px;
    font-weight: 800;
}

.role-badge {
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

/* --- Navigation Tabs (Horizontal) --- */
.dash-nav {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    /* Space for scrollbar if any */
    border-bottom: 1px solid var(--glass-border);
}

.dash-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: transparent;
    color: var(--color-text-muted);
    border-radius: 8px;
    /* Tab style */
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.dash-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.dash-nav-item.active {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-bottom-color: var(--color-primary);
    /* Highlight bottom or full border */
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dash-nav-item i {
    font-size: 1.1rem;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-header .nav-links {
        display: none;
    }
}