/* Student Dashboard Styles - OPay Inspired */

:root {
    --primary-purple: #8B5CF6;
    --secondary-red: #DC2626;
    --accent-gold: #FFC107;
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1E293B;
    --bg-secondary: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --border-color: #475569;
}

/* Main Dashboard */
.mtts-student-dashboard {
    min-height: 100vh;
    background: var(--bg-secondary);
}

.dashboard-header {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-red));
    color: white;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gold);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.student-details h2 {
    margin: 0;
    font-size: 1.5rem;
}

.matric-number {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0.25rem 0;
}

.program, .level, .session {
    margin: 0.25rem 0;
    opacity: 0.9;
}

.quick-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    min-width: 120px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.dashboard-nav {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-md);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: var(--bg-secondary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-red));
    color: white;
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-text {
    font-weight: 500;
}

/* Dashboard Content */
.dashboard-content {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.dashboard-section {
    padding: 2rem;
    display: none;
}

.dashboard-section.active {
    display: block;
}

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

.section-header h2 {
    margin: 0;
    color: var(--text-primary);
}

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

.overview-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.overview-card h3 {
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 1rem auto;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-purple);
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.course-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.course-card:hover {
    transform: translateY(-2px);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.course-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.course-code {
    background: var(--primary-purple);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.course-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.credits {
    color: var(--text-secondary);
}

.btn-view {
    background: var(--primary-purple);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Assignments List */
.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.assignment-card.submitted {
    border-left: 4px solid var(--success-green);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.assignment-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.course-name {
    background: var(--accent-gold);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.assignment-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.type, .marks, .deadline {
    color: var(--text-secondary);
}

.submission-status {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.submitted {
    color: var(--success-green);
}

.marks {
    color: var(--primary-purple);
    font-weight: bold;
}

.btn-submit {
    background: var(--primary-purple);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

/* Results Table */
.results-table {
    overflow-x: auto;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background: var(--bg-secondary);
    font-weight: 600;
}

/* Wallet Section */
.wallet-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.currency-selector select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
}

.btn-toggle-balance {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    cursor: pointer;
}

.wallet-overview {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.balance-card {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-red));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.balance-amount {
    font-size: 2rem;
    font-weight: bold;
}

.currency-symbol {
    font-size: 1.5rem;
}

.wallet-actions {
    display: flex;
    gap: 1rem;
}

.btn-load-wallet,
.btn-pay-fees {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-load-wallet {
    background: var(--success-green);
    color: white;
}

.btn-pay-fees {
    background: var(--primary-purple);
    color: white;
}

/* Transactions List */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.transaction-type {
    font-weight: bold;
}

.transaction-description {
    color: var(--text-secondary);
}

.transaction-amount {
    text-align: right;
}

.amount {
    font-weight: bold;
    color: var(--text-primary);
}

.date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Profile Section */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.profile-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.profile-card h3 {
    margin: 0 0 1.5rem;
    color: var(--text-primary);
}

.profile-details p,
.academic-info p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.profile-details strong,
.academic-info strong {
    color: var(--text-primary);
}

/* ID Card */
.id-card-preview {
    text-align: center;
}

.id-card {
    width: 350px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-red));
    border-radius: 16px;
    padding: 2rem;
    color: white;
    margin: 0 auto 2rem;
    box-shadow: var(--shadow-lg);
}

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

.school-logo {
    width: 60px;
    height: auto;
    margin-bottom: 0.5rem;
}

.id-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.id-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.photo-section {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
}

.student-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-section {
    text-align: center;
}

.info-section h4 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.info-section p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.id-card-footer {
    text-align: center;
    margin-top: 2rem;
}

.signature-line {
    border-bottom: 1px solid white;
    width: 100px;
    margin: 0.5rem auto;
}

.btn-print-id {
    background: var(--primary-purple);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: static;
    }
    
    .dashboard-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .nav-item {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .quick-stats {
        justify-content: center;
    }
    
    .dashboard-content,
    .dashboard-grid {
        padding: 1rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .wallet-overview {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .id-card {
        width: 300px;
        height: 450px;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stat-card {
        min-width: 100px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .results-table {
        font-size: 0.9rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
}

/* Dark Theme Support */
[data-theme="dark"] .dashboard-nav,
[data-theme="dark"] .overview-card,
[data-theme="dark"] .course-card,
[data-theme="dark"] .assignment-card,
[data-theme="dark"] .profile-card {
    background: var(--bg-secondary);
}

[data-theme="dark"] .stat-card {
    background: rgba(255, 255, 255, 0.1);
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
</style>