/**
 * Main Stylesheet
 * BTC - BeNextO Training Center
 */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --bg-white: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    min-height: calc(100vh - 80px);
}

body > .container {
    background: var(--bg-color);
    padding: 2rem;
}

/* Old navbar styles removed - using new modern-navbar class in navbar.php */

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
}

.nav-menu a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Old styles removed - using new dropdown system */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Login Page - Modern Design */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-brand {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-brand h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.login-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.login-brand p {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 1rem;
}

.login-form-container {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.login-form {
    width: 100%;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.login-form .form-group label svg {
    opacity: 0.7;
}

.login-form .form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Dashboard Styles */
.admin-dashboard, .student-dashboard {
    padding: 2rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.stat-info p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.quick-actions h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.btn-icon {
    font-size: 1.25rem;
    line-height: 1;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

/* Activity List */
.activity-list, .enrollment-list {
    max-height: 500px;
    overflow-y: auto;
}

.activity-item {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.activity-item:hover {
    background: var(--bg-color);
    transform: translateX(4px);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 8px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.activity-content span {
    color: var(--text-color);
    font-size: 0.95rem;
}

.activity-content small {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.activity-time {
    color: var(--secondary-color);
    font-size: 0.875rem;
    white-space: nowrap;
}

.enrollment-item {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.enrollment-item:hover {
    background: var(--bg-color);
    transform: translateX(4px);
}

.enrollment-item:last-child {
    border-bottom: none;
}

.enrollment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.enrollment-info {
    flex: 1;
}

.enrollment-info strong {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.enrollment-info p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
}

.enrollment-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 120px;
}

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background: white;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
}

table tr:hover {
    background: var(--bg-color);
}

/* Utility Classes */
.text-muted {
    color: var(--secondary-color);
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Enhanced Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: #06b6d4;
    color: white;
}

.btn-info:hover {
    background: #0891b2;
}

/* Enhanced Card Styles */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.dashboard-card {
    background: white;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

/* Enhanced Form Styles */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Enhanced Table Styles */
table {
    border-radius: 8px;
    overflow: hidden;
}

table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-color);
}

table tr {
    transition: background 0.2s;
}

table tr:hover {
    background: #f1f5f9;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Dashboard Section */
.dashboard-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    margin: 0;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-link:hover {
    color: #1d4ed8;
    transform: translateX(4px);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Course Cards */
.course-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.course-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.course-item strong a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.course-item strong a:hover {
    color: var(--primary-color);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin: 0.75rem 0;
    position: relative;
}

.progress-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #3b82f6 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Assignment Cards */
.assignment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-item {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.assignment-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(4px);
}

.assignment-item strong a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
}

.assignment-item strong a:hover {
    color: var(--primary-color);
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.course-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.course-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.course-card h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.course-card h3 a:hover {
    color: var(--primary-color);
}

.course-card .badge {
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}

/* Enhanced Form Styling */
.form-group input,
.form-group textarea,
.form-group select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Enhanced Table */
.table-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

table {
    background: white;
}

table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-color);
    padding: 1.25rem 1rem;
}

table td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
}

table tr {
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
}

table tr:last-child {
    border-bottom: none;
}

table tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-color);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Dashboard Header Enhancement */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.dashboard-header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0;
}

/* Announcement Cards */
.announcement-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--warning-color);
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.announcement-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(4px);
}

.announcement-item.pinned {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
}

/* Enhanced Stat Cards */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    padding: 2rem 1.5rem;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #3b82f6);
}

.stat-card-primary::before {
    background: linear-gradient(90deg, var(--primary-color), #3b82f6);
}

.stat-card-success::before {
    background: linear-gradient(90deg, var(--success-color), #34d399);
}

.stat-card-danger::before {
    background: linear-gradient(90deg, var(--danger-color), #f87171);
}

.stat-card-warning::before {
    background: linear-gradient(90deg, var(--warning-color), #fbbf24);
}

.stat-card-info::before {
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.stat-card-secondary::before {
    background: linear-gradient(90deg, var(--secondary-color), #94a3b8);
}

.stat-icon {
    font-size: 3.5rem;
    opacity: 0.9;
    transition: transform 0.3s;
    line-height: 1;
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(5deg);
}

.stat-info {
    flex: 1;
    min-width: 0; /* Allows flex item to shrink below content size */
    overflow: hidden;
}

.stat-info h3 {
    font-size: 2.75rem;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
    line-height: 1;
}

.stat-info p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin: 0.5rem 0;
    font-weight: 500;
}

.stat-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s;
}

.stat-link:hover {
    color: #1d4ed8;
    transform: translateX(4px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination .btn {
    min-width: 100px;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }
    
    .login-brand {
        padding: 2rem;
        min-height: 200px;
    }
    
    .login-brand h1 {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-menu a {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
}

/* Chat Messages */
.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--success-color), #34d399);
}

.message-content {
    flex: 1;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.user-message .message-content {
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    border-color: var(--primary-color);
}

.message-content strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.user-message .message-content strong {
    color: var(--success-color);
}

#typing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--secondary-color);
    font-style: italic;
}

#typing::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Card Component */
.card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card h2 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
}

.dashboard-header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* Link Button */
.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-link:hover {
    color: #1d4ed8;
    transform: translateX(4px);
}

/* Error Container */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 4rem auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.error-container h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--danger-color);
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-container p {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin: 0 0 2rem 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-color);
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* Progress Bar */
.progress-bar {
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    height: 10px;
    position: relative;
}

.progress-bar > div {
    background: linear-gradient(90deg, var(--primary-color) 0%, #3b82f6 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Course List */
.course-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-item {
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.course-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.course-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.course-item a:hover {
    color: #1d4ed8;
}

/* Assignment List */
.assignment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-item {
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.assignment-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.assignment-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.assignment-item a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Announcement Item */
.announcement-item {
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.announcement-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.announcement-item.pinned {
    border-left: 4px solid var(--warning-color);
    background: linear-gradient(90deg, #fef3c7 0%, white 5%);
}

/* Stat Card Variants */
.stat-card-primary {
    border-left: 4px solid var(--primary-color);
}

.stat-card-success {
    border-left: 4px solid var(--success-color);
}

.stat-card-info {
    border-left: 4px solid #06b6d4;
}

.stat-card-warning {
    border-left: 4px solid var(--warning-color);
}

.stat-card-danger {
    border-left: 4px solid var(--danger-color);
}

.stat-card-secondary {
    border-left: 4px solid var(--secondary-color);
}

/* Quick Actions Enhancement */
.quick-actions {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.quick-actions h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-buttons .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

/* Dashboard Section */
.dashboard-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1.5rem 0;
}

/* Enhanced Form Styles */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="url"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

/* Enhanced Table Styles */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    color: var(--text-color);
    padding: 1.25rem 1rem;
}

table td {
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--border-color);
}

table tr:hover {
    background: var(--bg-color);
}

table tr:last-child td {
    border-bottom: none;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .card {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
}

/* Floating AI Chatbot Widget */
.ai-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ai-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5);
}

.ai-chatbot-toggle.active {
    background: linear-gradient(135deg, var(--danger-color), #f87171);
}

.ai-chatbot-toggle::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border-radius: 50%;
    top: 8px;
    right: 8px;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

.ai-chatbot-toggle.active::after {
    display: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.ai-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chatbot-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.ai-chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chatbot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.ai-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ai-chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-chatbot-message {
    display: flex;
    gap: 0.75rem;
    animation: slideInMessage 0.3s ease;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chatbot-message.user {
    flex-direction: row-reverse;
}

.ai-chatbot-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ai-chatbot-message.ai .ai-chatbot-message-avatar {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
}

.ai-chatbot-message.user .ai-chatbot-message-avatar {
    background: linear-gradient(135deg, var(--success-color), #34d399);
}

.ai-chatbot-message-content {
    max-width: 75%;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-chatbot-message.ai .ai-chatbot-message-content {
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-chatbot-message.user .ai-chatbot-message-content {
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    border: 1px solid var(--primary-color);
}

.ai-chatbot-typing {
    display: flex;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 75%;
}

.ai-chatbot-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
    animation: typingDot 1.4s infinite;
}

.ai-chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.ai-chatbot-input {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
}

.ai-chatbot-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chatbot-input input:focus {
    border-color: var(--primary-color);
}

.ai-chatbot-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ai-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-chatbot-welcome {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-color);
}

.ai-chatbot-welcome h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.ai-chatbot-welcome p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Scrollbar styling for chatbot */
.ai-chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.ai-chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chatbot-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.ai-chatbot-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

@media (max-width: 480px) {
    .ai-chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 90px;
        right: 20px;
        left: 20px;
    }
}

