/* dashboard-modal.css - Main App Dashboard & Account Styles */

.dashboard-modal {
    max-width: 800px;
    padding: 0;
    overflow: hidden;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--bg-surface-solid) 0%, rgba(var(--p-h), 90%, 60%, 0.1) 100%);
    padding: 40px 80px 40px 40px;
    /* Increased right padding to avoid overlap with close button */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.user-info-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(var(--p-h), 90%, 60%, 0.3);
}

.avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

#dash-user-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-main);
}

.user-role-badge {
    background: rgba(var(--p-h), 90%, 60%, 0.15);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.dash-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.dash-btn.primary {
    background: var(--primary);
    color: white;
}

.dash-btn.secondary {
    background: var(--bg-item);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.dash-btn.outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
}

.dash-btn.danger {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dash-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Classes Grid */
.dashboard-content {
    padding: 40px;
}

.dashboard-content h3 {
    margin-bottom: 24px;
    font-size: 1.2rem;
    opacity: 0.8;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.class-card {
    background: var(--bg-item);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.class-card:hover {
    background: var(--bg-surface-solid);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-main);
}

.class-icon {
    width: 48px;
    height: 48px;
    background: rgba(var(--p-h), 90%, 60%, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.class-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
}

.class-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Management Modal Styles */
.mgmt-content {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.mgmt-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-item);
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-glass);
}

.mgmt-info h4 {
    margin-bottom: 4px;
}

.mgmt-code-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.join-code-text {
    font-family: 'Source Code Pro', monospace;
    font-weight: 700;
    color: var(--primary);
    background: rgba(var(--p-h), 90%, 60%, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.copy-badge {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.copy-badge:hover {
    color: var(--primary);
}

.mgmt-actions {
    display: flex;
    gap: 8px;
}

.mgmt-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.mgmt-btn:hover {
    background: var(--bg-item-hover);
    color: var(--text-main);
}

.mgmt-btn.delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Teacher Account Detail Items */
.account-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    padding: 10px;
    background: var(--bg-item);
    border-radius: 8px;
    flex-grow: 1;
}

.name-display-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.icon-btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.icon-btn-text:hover {
    background: var(--bg-item-hover);
    color: var(--primary);
}

.icon-btn-text.success {
    color: #10b981;
}

.auth-input.mini {
    padding: 10px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: var(--bg-surface-solid);
    flex-grow: 1;
}

.avatar-selection-section {
    margin-top: 10px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 12px 0;
}

.avatar-opt {
    aspect-ratio: 1/1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

.avatar-opt:hover {
    transform: scale(1.1);
}

.avatar-opt.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--primary);
}