/* Global Styles */
:root {
    --primary-color: #007AFF; /* Apple Blue */
    --accent-color: #FF9500;  /* Apple Orange */
    --bg-color: #F8F9FA;      /* Very Light Gray */
    --surface-color: #FFFFFF; /* White */
    --text-primary: #1D1D1F;  /* Apple Near Black */
    --text-secondary: #6E6E73;/* Apple Gray */
    --text-meta: #8A8A8E;    /* Apple Lighter Gray for meta text */
    --border-color: #D2D2D7;  /* Apple Light Gray Border */
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color); 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1300px; 
    margin: 0 auto;
    padding: 0 1.25rem; /* Restore horizontal padding (20px) */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* General Header for login/signup pages (less prominent now) */
.page-header {
    background-color: var(--primary-color);
    color: var(--surface-color);
    text-align: center;
    padding: 1rem 1.25rem; /* 16px 20px */
    width: 100%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.page-header h1 {
    font-size: 1.75rem; /* 28px */
    font-weight: 600;
    margin-bottom: 0.25rem; /* 4px */
}
.page-header p {
    font-size: 1rem; /* 16px */
    font-weight: 400;
    opacity: 0.85;
}


/* General Footer for all pages */
.page-footer {
    text-align: center;
    padding: 1.25rem 0; /* 20px */
    background-color: #333740; /* Darker, slightly desaturated footer */
    color: #AEAEB2; /* Lighter gray text for footer */
    width: 100%;
    margin-top: auto; 
    font-size: 0.875rem; /* 14px */
}


/* Form Styles */
.form-group {
    margin-bottom: 1.25rem; 
}

label {
    display: block;
    margin-bottom: 0.5rem; 
    font-weight: 500; 
    color: var(--text-primary);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem; 
    border: 1px solid var(--border-color);
    border-radius: 0.5rem; /* 8px, slightly more rounded */
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--surface-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--surface-color) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}


input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25); /* Focus ring with primary color */
}


.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem; /* 10px 20px */
    color: var(--surface-color);
    border: none;
    border-radius: 0.5rem; /* 8px */
    cursor: pointer;
    font-size: 0.9375rem; /* 15px */
    font-weight: 500; 
    text-align: center;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    text-decoration: none; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.btn:active {
    transform: translateY(0px); 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}


.btn-primary { 
    background-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #0056b3; /* Darker primary */
}
.btn-primary:active {
    background-color: #004085; 
}


.btn-secondary { 
    background-color: var(--accent-color);
}
.btn-secondary:hover {
    background-color: #E68A00; /* Darker Orange */
}
.btn-secondary:active {
    background-color: #CC7A00; 
}

.btn-danger {
    background-color: #FF3B30; /* Apple Red */
}
.btn-danger:hover {
    background-color: #E02B21; 
}

.btn-success {
    background-color: #34C759; /* Apple Green */
}
.btn-success:hover {
    background-color: #2DA34C; 
}


/* Login Container Specifics */
.login-page-container { 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    padding: 1.25rem; /* Add padding for smaller screens */
}

.login-container {
    max-width: 380px; 
    width: 100%; 
    margin: 2rem auto; 
    background-color: var(--surface-color);
    padding: 2rem; /* 32px */
    border-radius: 0.75rem; /* 12px */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); /* More pronounced shadow */
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem; /* 24px */
    font-size: 1.5rem; /* 24px */
    color: var(--text-primary);
    font-weight: 600;
}

.login-container .btn-primary { 
    width: 100%;
    margin-top: 1.25rem; /* 20px */
    padding: 0.75rem; /* Consistent button padding */
}

.signup-link { 
    text-align: center;
    margin-top: 1.25rem; /* 20px */
    font-size: 0.875rem; /* 14px */
    color: var(--text-secondary);
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.signup-link a:hover {
    text-decoration: underline;
    color: #0056b3; 
}

/* Dashboard Layout & Styles */
.admin-container, .student-container, .faculty-container { /* Generic dashboard container */
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-grow: 1;
}

.nav { 
    background-color: var(--surface-color); 
    color: var(--text-primary);
    padding: 0 1.25rem; /* 20px */
    width: 100%; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    border-bottom: 1px solid var(--border-color);
    height: 60px; 
    display: flex;
    align-items: center;
    position: sticky; 
    top: 0;
    z-index: 1000; 
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px; 
    margin: 0 auto; /* Center nav-container itself */
}

.nav-logo {
    font-size: 1.375rem; /* 22px */
    font-weight: 600; 
    color: var(--primary-color); 
}

.nav-menu {
    display: flex;
    list-style: none;
    height: 100%;
}

.nav-item {
    margin-left: 0.5rem; /* 8px */
    display: flex;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary); 
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
    font-weight: 500;
    padding: 0 0.75rem; /* 12px */
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent; 
}

.nav .nav-link:hover {
    color: var(--primary-color); 
}
.nav .nav-link.active { 
    color: var(--primary-color); 
    border-bottom-color: var(--primary-color); 
    font-weight: 500; 
}

/* Main content area for dashboards */
.dashboard-main-content {
    flex-grow: 1;
    padding: 1.5rem 0; /* Vertical padding, horizontal padding comes from .container */
    width: 100%;
    /* max-width: 1300px; /* No longer needed here, .container handles it */
    /* margin: 0 auto; /* No longer needed here */
}

.dashboard-header { 
    margin-bottom: 1.5rem; 
}
.dashboard-header h1 {
    font-size: 1.75rem; /* 28px */
    font-weight: 600; 
    color: var(--text-primary);
}
.dashboard-header p {
    font-size: 1rem;
    font-weight: 400; 
    color: var(--text-secondary);
}


.dashboard { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 1.5rem; 
}

.card {
    background-color: var(--surface-color);
    border-radius: 0.75rem; 
    box-shadow: var(--card-shadow);
    padding: 1.25rem; /* 20px */
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.card:hover {
    transform: translateY(-3px); 
    box-shadow: var(--card-hover-shadow);
}

.card h2 { 
    font-size: 1.125rem; /* 18px */
    font-weight: 600; 
    margin-bottom: 0.75rem; /* 12px */
    color: var(--text-primary);
}
.card h3 { 
    font-size: 1rem; /* 16px */
    font-weight: 500; 
    margin-bottom: 0.5rem; /* 8px */
    color: var(--primary-color);
}
.card p, .card li {
    color: var(--text-secondary);
    font-weight: 400; 
    margin-bottom: 0.5rem;
    font-size: 0.9375rem; /* 15px */
}
.card ul {
    padding-left: 1.25rem; 
    margin-top: 0.5rem;
}


/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem; 
    background-color: var(--surface-color);
    border-radius: 0.5rem; 
    overflow: hidden; 
    box-shadow: var(--card-shadow);
}

th, td {
    padding: 0.875rem 1rem; 
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem; /* 15px */
}

th {
    background-color: #F3F4F6; /* Lighter header for tables */
    color: var(--text-secondary);
    font-weight: 500; 
    text-transform: uppercase;
    font-size: 0.8125rem; /* 13px */
    letter-spacing: 0.05em;
}

tr:hover {
    background-color: #F0F9FF; 
}
td:first-child, th:first-child {
    padding-left: 1.25rem; 
}
td:last-child, th:last-child {
    padding-right: 1.25rem; 
}


/* Message Styles (Improved) */
.message {
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    border-radius: 0.375rem; 
    text-align: left; 
    border: 1px solid transparent;
    font-size: 0.9375rem; /* 15px */
}

.info-message {
    color: #004085; 
    background-color: #CCE5FF; 
    border-color: #B8DAFF; 
}

.success-message {
    color: #155724; 
    background-color: #D4EDDA; 
    border-color: #C3E6CB; 
}

.error-message {
    color: #721C24; 
    background-color: #F8D7DA; 
    border-color: #F5C6CB; 
}

.warning-message {
    color: #856404; 
    background-color: #FFF3CD; 
    border-color: #FFEEBA; 
}


/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        height: auto; 
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-menu {
        margin-top: 0.75rem; 
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        height: auto;
    }
    
    .nav-item {
        margin-left: 0;
        width: 100%;
    }
    .nav .nav-link {
        padding: 0.75rem 1rem; 
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid var(--border-color); 
    }
    .nav .nav-link.active {
        border-bottom-color: var(--primary-color); 
    }
    
    .dashboard {
        grid-template-columns: 1fr; 
    }
    .dashboard-main-content {
        padding: 1rem; 
    }
}

/* Role-specific styles */
.admin-only, .faculty-only, .student-only {
    display: none;
}

body.role-admin .admin-only,
body.role-faculty .faculty-only,
body.role-student .student-only {
    display: block;
}

/* Dashboard Stats */
.dashboard-stats { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjusted minmax */
    gap: 1.25rem; /* 20px */
    margin-bottom: 1.5rem; 
}

.stat-card { 
    display: flex;
    flex-direction: column; /* Stack icon and info vertically */
    align-items: flex-start; /* Align items to the start */
    gap: 0.5rem; /* 8px */
    padding: 1.25rem; /* 20px */
}

.stat-icon {
    font-size: 1.5rem; /* 24px */
    color: var(--primary-color);
    background-color: #E0EFFF; /* Lighter blue for icon background */
    width: 40px; 
    height: 40px;
    border-radius: 0.5rem; /* 8px, less round */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
    margin-bottom: 0.5rem; /* Space below icon */
}
/* Specific icon colors using accent */
.stat-card.attendance .stat-icon { color: var(--accent-color); background-color: #FFF3E0; } /* Light Orange */
.stat-card.assignments .stat-icon { color: #6366F1; background-color: #EEF2FF; } /* Indigo */
.stat-card.certificates .stat-icon { color: #10B981; background-color: #D1FAE5; } /* Teal/Green */


.stat-info {
    flex-grow: 1;
    text-align: left;
}

.stat-info h3 { 
    margin: 0 0 0.125rem 0; /* 2px */
    color: var(--text-secondary); 
    font-size: 0.8125rem; /* 13px */
    font-weight: 500; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number { 
    font-size: 1.5rem; /* 24px */
    font-weight: 600; 
    margin: 0;
    color: var(--text-primary);
}

.stat-label { 
    margin: 0.125rem 0 0 0; /* 2px */
    color: var(--text-meta); 
    font-size: 0.8125rem; /* 13px */
    font-weight: 400; 
}

.dashboard-row { 
    display: grid;
    grid-template-columns: 1fr 1fr; /* Force two columns */
    gap: 1.5rem; 
    margin-bottom: 1.5rem; 
}
@media (max-width: 900px) { /* Stack on medium screens */
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}


/* Material Items */
.material-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0; 
}

.material-item:last-child {
    border-bottom: none;
}

.material-item h4 {
    margin: 0 0 0.5rem 0; 
    color: var(--primary-color);
    font-weight: 500; 
}

/* Event Items */
.event-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0; 
}

.event-item:last-child {
    border-bottom: none;
}

.event-item h4 {
    margin: 0 0 0.5rem 0; 
    color: var(--primary-color);
    font-weight: 500; 
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.25rem; 
    border-bottom: 1px solid var(--border-color);
}

.category-tab {
    padding: 0.75rem 1rem; 
    background: none;
    border: none;
    border-bottom: 2px solid transparent; 
    cursor: pointer;
    font-weight: 500; 
    color: var(--text-secondary);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.category-tab:hover {
    color: var(--primary-color);
}

.category-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500; 
}

/* Item Cards */
.item-card { 
    border: 1px solid var(--border-color);
    border-radius: 0.75rem; 
    padding: 1rem; 
    margin-bottom: 1rem; 
    background-color: var(--surface-color);
    box-shadow: var(--card-shadow);
}

.item-card h4 {
    margin-bottom: 0.5rem; 
    color: var(--primary-color);
    font-weight: 500; 
}

.item-card p {
    margin-bottom: 0.5rem; 
    font-weight: 400; 
}

.item-meta {
    font-size: 0.875rem; 
    color: var(--text-meta); 
    font-weight: 400; /* Changed from 300 */
}

.item-status {
    font-weight: 500; 
    color: var(--accent-color); /* Use accent for status */
}

.status-found, .status-claimed {
    color: #22C55E; /* Green for positive status */
}

/* Button Sizes */
.btn-sm {
    padding: 0.375rem 0.75rem; 
    font-size: 0.875rem; 
    font-weight: 500;
}

/* Material Cards */
.material-card { 
    border: 1px solid var(--border-color);
    border-radius: 0.75rem; 
    padding: 1rem; 
    margin-bottom: 1rem; 
    background-color: var(--surface-color);
    box-shadow: var(--card-shadow);
}

.material-card h4 {
    margin-bottom: 0.5rem; 
    color: var(--primary-color);
    font-weight: 500; 
}

.material-card p {
    margin-bottom: 0.5rem; 
    font-weight: 400; 
}

.material-card .material-meta {
    font-size: 0.875rem; 
    color: var(--text-meta); 
    font-weight: 400; /* Changed from 300 */
}

/* Feedback form */
.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating input {
    display: none;
}

.rating label {
    cursor: pointer;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z" fill="white" stroke="black" stroke-width="0.5"/></svg>');
    background-repeat: no-repeat;
}

.rating input:checked ~ label,
.rating label:hover,
.rating label:hover ~ label {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z" fill="gold"/></svg>');
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #3B82F6;
    border-radius: 5px;
}

/* Certificate Styles */
.certificate-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.certificate {
    width: 800px;
    max-width: 100%;
    padding: 40px;
    background-color: #fff;
    border: 15px solid #3B82F6;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.certificate:before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 2px solid #3B82F6;
    pointer-events: none;
}

.certificate-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #3B82F6;
    padding-bottom: 20px;
}

.certificate-logo {
    font-size: 24px;
    font-weight: bold;
    color: #3B82F6;
    margin-bottom: 10px;
}

.certificate-header h2 {
    font-size: 28px;
    color: #3B82F6;
    margin: 0;
}

.certificate-body {
    text-align: center;
    margin-bottom: 30px;
}

.certificate-text {
    font-size: 18px;
    margin: 10px 0;
}

.certificate-name {
    font-size: 32px;
    font-weight: bold;
    color: #3B82F6;
    margin: 15px 0;
    font-family: 'Brush Script MT', cursive;
}

.certificate-course {
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0;
    color: #333;
}

.certificate-date {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

.certificate-signature {
    text-align: center;
    width: 200px;
}

.signature-line {
    width: 100%;
    height: 2px;
    background-color: #000;
    margin-bottom: 10px;
}

.certificate-seal {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #3B82F6;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.certificate-seal:before {
    content: 'SEAL';
    color: #3B82F6;
    font-weight: bold;
}

.certificate-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.certificate-modal-content {
    background-color: #f4f4f4;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    border-radius: 5px;
    position: relative;
}

.certificate-actions {
    text-align: center;
    margin-top: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #f4f4f4;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.close-modal:hover {
    color: #3B82F6;
}

/* Tab styles for modals */
.student-details-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: bold;
    color: #6c757d;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #3B82F6;
}

.tab-btn.active {
    color: #3B82F6;
    border-bottom-color: #3B82F6;
}

.tab-content {
    display: none;
    padding: 15px 0;
}

/* Material actions */
.material-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Access statistics */
.access-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    flex: 1 1 200px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
}

.stat-item h3 {
    margin-bottom: 10px;
    color: #3B82F6;
}

.stat-item .stat-number {
    font-size: 1.8rem;
    font-weight: bold;
}

.access-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    margin: 20px 0;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.chart-bar {
    width: 40px;
    background-color: #3B82F6;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.5s;
}

.chart-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    white-space: nowrap;
}

.access-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.access-table th, .access-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.access-table th {
    background-color: #3B82F6;
    color: #fff;
}

/* Student attendance chart */
.attendance-chart {
    width: 100%;
    height: 30px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.attendance-bar {
    height: 100%;
    background-color: #28a745;
    text-align: center;
    line-height: 30px;
    color: white;
    font-weight: bold;
    transition: width 0.5s;
}

/* More details button */
.more-details-btn {
    background-color: #17a2b8;
}

.more-details-btn:hover {
    background-color: #138496;
}

/* AI Chat Styles */
.ai-assistant-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.ai-chat-container {
    flex: 2;
    min-width: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.ai-chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
}

.ai-message, .user-message {
    display: flex;
    margin-bottom: 15px;
}

.ai-avatar, .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin-right: 10px;
}

.ai-avatar {
    background-color: #3B82F6;
    color: white;
}

.user-avatar {
    background-color: #6c757d;
    color: white;
}

.ai-message-content, .user-message-content {
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.ai-message-content {
    border-top-left-radius: 0;
}

.user-message-content {
    border-top-right-radius: 0;
    background-color: #e3f2fd;
}

/* Typing indicator */
.typing-dots {
    display: flex;
    align-items: center;
    height: 20px;
}

.typing-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3B82F6;
    margin-right: 5px;
    animation: typing 1s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.ai-chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

.ai-chat-input form {
    display: flex;
    width: 100%;
}

.ai-chat-input input {
    flex-grow: 1;
    margin-right: 10px;
}

.ai-features {
    flex: 1;
    min-width: 250px;
}

.ai-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ai-quick-action {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-quick-action:hover {
    background-color: #bbdefb;
}

.ai-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.ai-tool {
    width: calc(50% - 10px);
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-tool:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ai-tool-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Tutoring Styles */
.tutoring-session {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.session-status {
    background-color: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.session-details {
    margin-bottom: 15px;
}

.session-actions {
    display: flex;
    gap: 10px;
}

/* Wellness Styles */
.wellness-resource {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.resource-type {
    background-color: #17a2b8;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.resource-details {
    margin-bottom: 15px;
}

.resource-actions {
    display: flex;
    gap: 10px;
}

.service-item {
    display: flex;
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}

.service-item:last-child {
    border-bottom: none;
}

.service-icon {
    font-size: 30px;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e3f2fd;
    border-radius: 50%;
}

.service-details {
    flex-grow: 1;
}

.service-details h4 {
    margin-bottom: 10px;
}

.tool-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
}

.emergency-resources {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.emergency-item {
    flex: 1 1 200px;
    border: 1px solid #dc3545;
    border-radius: 5px;
    padding: 15px;
    background-color: #fff;
}

.emergency-item h4 {
    color: #dc3545;
    margin-bottom: 10px;
}

/* Campus Tour Styles */
.campus-map-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.campus-map {
    flex: 1;
    min-width: 300px;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.campus-map-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e9ecef;
    position: relative;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-building {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s;
}

.map-building:hover, .map-building.hover {
    transform: scale(1.1);
    z-index: 10;
}

.map-building.active .map-pin {
    background-color: #28a745;
}

.map-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 100;
}

.map-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.tour-welcome {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 20px;
}

.tour-welcome h3 {
    margin-bottom: 15px;
    color: #3B82F6;
}

.tour-welcome-image {
    width: 200px;
    height: 200px;
    background-color: #e3f2fd;
    border-radius: 50%;
    margin-top: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="100" height="100"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z" fill="%233B82F6"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-pin {
    width: 40px;
    height: 40px;
    background-color: #3B82F6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.map-label {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.campus-tour-viewer {
    flex: 2;
    min-width: 400px;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.tour-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tour-message {
    text-align: center;
    padding: 20px;
}

.tour-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.tour-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-navigation select {
    flex-grow: 1;
    margin: 0 10px;
}

.tour-options {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.location-info {
    margin-top: 20px;
}

.location-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.detail-item {
    flex: 1 1 200px;
}

.detail-item h4 {
    margin-bottom: 10px;
    color: #3B82F6;
}

.detail-item ul {
    padding-left: 20px;
}

.tour-location {
    width: 100%;
    height: 100%;
}

.tour-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* Certificate Items */
.certificate-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.certificate-type {
    background-color: #3B82F6;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 15px;
}

.certificate-details {
    flex-grow: 1;
}

.certificate-details p {
    margin: 5px 0;
}

.certificate-actions {
    display: flex;
    gap: 10px;
}

.certificates-container {
    margin-top: 20px;
}

/* Responsive Certificate */
@media (max-width: 768px) {
    .certificate {
        padding: 20px;
    }
    
    .certificate-header h2 {
        font-size: 22px;
    }
    
    .certificate-text {
        font-size: 16px;
    }
    
    .certificate-name {
        font-size: 26px;
    }
    
    .certificate-course {
        font-size: 20px;
    }
    
    .certificate-date {
        font-size: 18px;
    }
    
    .certificate-footer {
        margin-top: 30px;
    }
    
    .certificate-seal {
        width: 80px;
        height: 80px;
    }
}

/* Overview Items */
.overview-item {
    margin-bottom: 20px;
}

.overview-item h4 {
    margin-bottom: 10px;
    color: #3B82F6;
}

/* Notification Items */
.notification-item {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item h4 {
    margin: 0 0 10px 0;
    color: #3B82F6;
}

.notification-meta {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 10px;
}

/* Activity Items */
.activity-item {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item h4 {
    margin: 0 0 10px 0;
    color: #3B82F6;
}

.activity-meta {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 10px;
}

/* Class Items */
.class-item {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}

.class-item:last-child {
    border-bottom: none;
}

.class-item h4 {
    margin: 0 0 10px 0;
    color: #3B82F6;
}

/* Message Styles */
.message {
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}

.info-message {
    background-color: #cce5ff;
    color: #004085;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
}

.warning-message {
    background-color: #fff3cd;
    color: #856404;
}
