:root {
    --primary-color: #1abc9c; /* Teal/Turquoise for accents */
    --background-color: #2c3e50; /* Dark Blue/Gray main background */
    --sidebar-background: #34495e; /* Slightly lighter dark for sidebar/cards */
    --card-background: #34495e;
    --text-color: #ecf0f1; /* Light text for readability */
    --text-secondary: #bdc3c7;
    --low-attendance-bg: #e74c3c; /* Red for alerts */
    --low-attendance-text: #fff;
    --shadow-dark: rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* --- Dashboard Layout --- */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-background);
    box-shadow: 2px 0 10px var(--shadow-dark);
    padding: 20px 0;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin: 5px 0;
}

.sidebar a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background-color 0.3s, color 0.3s;
    font-weight: 500;
}

.sidebar a:hover, .sidebar li.active a {
    background-color: var(--background-color);
    color: var(--primary-color);
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 30px;
}

/* Header */
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--sidebar-background);
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px var(--shadow-dark);
}

.user-info {
    display: flex;
    align-items: center;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid var(--primary-color);
    background-color: #1abc9c; /* Placeholder for image */
}

.user-info h2 {
    margin: 0;
    font-size: 1.4em;
    color: var(--text-color);
}

.user-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85em;
}

.gpa-card {
    text-align: right;
    padding: 10px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
}

.gpa-card p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.gpa-score {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: var(--low-attendance-text);
    background-color: var(--low-attendance-bg);
}

/* Cards and Grid */
.card-grid {
    display: grid;
    /* Force two columns on large screens */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 25px;
}

.card {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-dark);
    min-height: 250px;
}

.card h4 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.card ul {
    list-style: none;
    padding: 0;
}

.card li {
    background: #2c3e50;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* Make the Chart and Payment Summary span equally */
.card:nth-child(1), 
.payment-summary {
    grid-column: span 1; 
}

#gpaChart {
    max-height: 200px; 
}


/* --- Fees & Payments Section Styles --- */

.payment-summary {
    background-color: var(--sidebar-background);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.balance-due {
    margin: 20px 0;
}

.amount-label {
    color: var(--text-secondary);
    font-size: 1em;
    margin: 0;
}

.amount-value {
    font-size: 3em;
    font-weight: 700;
    margin-top: 5px;
}

.due-red {
    color: #e74c3c;
}

.due-date {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 20px;
}

.pay-now-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}
.pay-now-btn:hover {
    background-color: #16a085;
}


/* --- Timetable Specific Styles (Decent & Proper) --- */

.timetable-card {
    padding: 0; 
    overflow-x: auto; 
    border-radius: 10px; /* Rounded corners for the whole schedule card */
}

.timetable-card table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--sidebar-background); 
    color: var(--text-color);
}

.timetable-card th, .timetable-card td {
    padding: 15px 10px; /* Increased vertical padding for better spacing */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15); /* Slightly clearer borders */
    height: 60px; /* Fixed height for consistent look */
}

.timetable-card th {
    background-color: #2c3e50;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9em;
}

.time-slot {
    font-weight: bold;
    color: var(--primary-color);
    background-color: #4a637a; 
    width: 120px; /* Ensure time column is wide enough */
}

.subject-cell {
    color: white;
    font-weight: 600; /* Bolder text for subject names */
    font-size: 0.9em;
    cursor: default;
    transition: background-color 0.3s, transform 0.2s;
    line-height: 1.3; /* Ensure text separation */
}

.subject-cell:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

/* Subject Colors */
.malware { background-color: #c0392b; }      /* Red */
.theory { background-color: #2980b9; }       /* Blue */
.ai { background-color: #f39c12; }           /* Orange */
.data-mining { background-color: #8e44ad; }  /* Purple */
.web-app { background-color: #16a085; }      /* Green */
.rhel { background-color: #34495e; }         /* Dark Blue-Grey */

/* Lab style refinement */
.lab {
    border: 2px solid #f1c40f; /* Yellow border for Labs */
    opacity: 0.95;
}

.break-cell {
    background-color: #2c3e50;
    color: var(--text-secondary);
    font-style: italic;
    font-weight: normal;
}

.lunch {
    background-color: #1a2531;
    color: #f1c40f;
    font-size: 1.1em;
}

/* --- Financial Summary Detail Card Styles --- */

.financial-summary-detail {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    background-color: #4a637a; /* Unique background */
}

.financial-summary-detail h4 {
    color: #f1c40f; /* Highlighted title */
}

.fee-metrics {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.metric {
    text-align: center;
}

.metric p, .balance-due-summary p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.metric .value {
    font-size: 1.5em;
    font-weight: 700;
}

.value.total {
    color: #bdc3c7;
}

.value.paid {
    color: #2ecc71; /* Green for paid amount */
}

.balance-due-summary {
    text-align: center;
    padding: 20px 0;
}

.balance-due-summary .value.due {
    font-size: 2.5em;
    font-weight: 800;
    color: #e74c3c; /* Red for outstanding balance */
}

/* Progress Bar Styling */
.progress-bar-container {
    margin-top: 20px;
    margin-bottom: 30px;
}

.progress-bar-container p {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.progress-bar {
    height: 10px;
    background-color: #2c3e50;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 69%; /* Hardcoded progress (69% paid: 34500/50000) */
    background-color: var(--primary-color);
    transition: width 0.5s;
}

.financial-summary-detail .pay-now-btn {
    width: 100%;
}

/* --- NEW: Assignment List Styles --- */
.assignment-list-card {
    min-height: auto; /* Allow card height to adjust based on content */
}

#assignmentList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#assignmentList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c3e50; /* Darker background for list items */
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: background-color 0.3s;
    border-left: 5px solid var(--primary-color);
}

#assignmentList li:hover {
    background-color: #34495e; 
}

.assignment-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
    text-align: left;
}

.assignment-details {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.assignment-details span {
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Status Badges */
.status-pending {
    background-color: #f39c12; /* Orange */
    color: #fff;
}

.status-completed {
    background-color: #2ecc71; /* Green */
    color: #fff;
}

.status-overdue {
    background-color: #e74c3c; /* Red */
    color: #fff;
}

.grade {
    background-color: var(--primary-color);
    color: #fff;
}

.course {
    background-color: #4a637a;
    color: #fff;
}

.due-date {
    background-color: #34495e;
    color: #bdc3c7;
}

.no-data, .error-message {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #e74c3c !important;
    border-left: none !important;
}