/* styles/main.css - نسخه کامل */

:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --light-text: #ecf0f1;
    --dark-text: #2c3e50;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-text);
    line-height: 1.6;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
}

/* نوبار */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: var(--secondary-color);
    color: white;
    height: 70px;
    box-shadow: var(--shadow);
}

.navbar-brand h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    font-size: 2rem;
}

.btn-logout {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #c0392b;
}

/* کانتینر اصلی */
.main-container {
    display: flex;
    flex: 1;
}

/* سایدبار */
.sidebar {
    width: 280px;
    background: white;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    background: var(--primary-color);
    color: white;
    text-align: center;
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 25px;
}

.section-title {
    padding: 0 20px 10px;
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--dark-text);
    text-decoration: none;
    transition: var(--transition);
    border-right: 3px solid transparent;
}

.menu-item:hover {
    background: var(--light-bg);
    border-right-color: var(--primary-color);
    color: var(--primary-color);
}

.menu-item.active {
    background: var(--light-bg);
    border-right-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 15px 20px;
    text-align: center;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    background: var(--light-bg);
}

/* محتوای اصلی */
.content {
    flex: 1;
    padding: 30px;
    background: var(--light-bg);
    overflow-y: auto;
}

/* داشبورد */
.dashboard-page {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

/* کارت‌های آمار */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* محتوای اصلی داشبورد */
.main-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .main-content-grid {
        grid-template-columns: 1fr;
    }
}

.content-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.content-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    padding: 20px;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
}

.today-date {
    color: #666;
    font-size: 0.9rem;
}

.card-body {
    padding: 20px;
}

/* جدول برنامه امروز */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th {
    background: var(--light-bg);
    padding: 12px 15px;
    text-align: right;
    border-bottom: 2px solid var(--border-color);
    color: var(--secondary-color);
}

.schedule-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.schedule-table tr:hover {
    background: var(--light-bg);
}

.text-center {
    text-align: center;
}

/* دسترسی سریع */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-text);
    transition: var(--transition);
    border: 2px solid transparent;
}

.quick-access-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.quick-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* چت با دستیار */
.ai-chat-container {
    max-width: 800px;
    margin: 0 auto;
}

.ai-message,
.user-message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.ai-avatar,
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar {
    background: var(--success-color);
}

.ai-text,
.user-text {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    flex: 1;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.chat-input {
    flex: 1;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
}

.chat-send-btn {
    padding: 0 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.chat-send-btn:hover {
    background: var(--primary-dark);
}

/* فوتر */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: auto;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .navbar-brand h1 {
        font-size: 1.2rem;
    }

    .navbar-user {
        gap: 10px;
    }

    .sidebar {
        width: 100%;
        position: fixed;
        top: 70px;
        bottom: 0;
        left: -100%;
        z-index: 1000;
        transition: var(--transition);
    }

    .sidebar.active {
        left: 0;
    }

    .main-container {
        margin-top: 70px;
    }

    .content {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-access-grid {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-page {
    animation: fadeIn 0.5s ease;
}
/* استایل‌های جدید برای برنامه هفتگی در داشبورد */
.full-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.full-schedule-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.full-schedule-table td {
    padding: 10px 8px;
    border: 1px solid #e0e0e0;
    text-align: center;
    vertical-align: top;
}

.full-schedule-table .time-slot {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.full-schedule-table .lesson-cell {
    min-height: 60px;
    transition: all 0.3s ease;
}

.full-schedule-table .lesson-cell:hover {
    background-color: #f1f3f4;
    transform: scale(1.02);
}

.full-schedule-table .today-lesson {
    background-color: #e3f2fd !important;
    border: 2px solid #2196f3;
}

.lesson-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.lesson-teacher {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* استایل برای صفحه داشبورد */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

/* استایل برای وضعیت امروز */
.text-center {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.text-center i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}
