/* Authentication and Admin Interface Styles */

/* Login Screen */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-header p {
    color: #666;
    font-size: 16px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.auth-btn {
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.auth-btn.primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.4);
}

.auth-btn.secondary {
    background: #6c757d;
    color: white;
}

.auth-btn.secondary:hover {
    background: #545b62;
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    font-size: 14px;
    text-align: center;
}

/* Main App Navigation */
.app-nav {
    background: linear-gradient(135deg, #a6cbb1, #8daa90);
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-brand h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
}

.user-role {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-actions {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.nav-btn.logout:hover {
    background: #dc3545;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* Tab Navigation */
.tab-navigation {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0 25px;
}

.tabs {
    display: flex;
    gap: 5px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #007bff;
    background: rgba(0,123,255,0.05);
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: rgba(0,123,255,0.05);
}

/* Main Content */
.main-content {
    padding: 25px;
    background: #f8f9fa;
    min-height: calc(100vh - 160px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.content-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn.primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn.primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.btn.secondary {
    background: #6c757d;
    color: white;
}

.btn.secondary:hover {
    background: #545b62;
}

.btn.danger {
    background: #dc3545;
    color: white;
}

.btn.danger:hover {
    background: #c82333;
}

/* Cards and Lists */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.card-subtitle {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0 0;
}

.card-actions {
    display: flex;
    gap: 10px;
}

/* Homework List */
.homework-list {
    display: grid;
    gap: 20px;
}

.homework-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.homework-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.homework-card.assigned {
    border-left-color: #ffc107;
}

.homework-card.in-progress {
    border-left-color: #17a2b8;
}

.homework-card.completed {
    border-left-color: #28a745;
}

.homework-card.graded {
    border-left-color: #6f42c1;
}

.homework-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.homework-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.homework-status.assigned {
    background: #fff3cd;
    color: #856404;
}

.homework-status.in-progress {
    background: #d1ecf1;
    color: #0c5460;
}

.homework-status.completed {
    background: #d4edda;
    color: #155724;
}

.homework-status.graded {
    background: #e2e3f0;
    color: #383d41;
}

.homework-due {
    font-size: 14px;
    color: #666;
}

.homework-due.overdue {
    color: #dc3545;
    font-weight: 600;
}

.homework-grade {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
}

/* Progress Stats */
.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Classes Grid */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.class-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.class-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.class-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.class-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.class-info-item {
    font-size: 14px;
    color: #666;
}

.class-students {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    text-align: center;
}

/* Students Grid */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.student-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.student-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.student-number {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.student-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 14px;
}

.student-stat {
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.student-stat-number {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
}

.student-stat-label {
    display: block;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

/* Users Table */
.users-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background: #f8f9fa;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 10px;
}

.user-info-cell {
    display: flex;
    align-items: center;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name-cell {
    font-weight: 600;
    color: #333;
}

.user-email-cell {
    font-size: 14px;
    color: #666;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin {
    background: #dc3545;
    color: white;
}

.role-badge.teacher {
    background: #007bff;
    color: white;
}

.role-badge.student {
    background: #28a745;
    color: white;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-indicator.active {
    background: #28a745;
}

.status-indicator.inactive {
    background: #dc3545;
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification-panel.show {
    transform: translateX(0);
}

.notification-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.notification-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.notifications-list {
    padding: 20px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background 0.3s ease;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e3f2fd;
    border-left: 4px solid #007bff;
}

.notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.notification-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 12px;
    color: #999;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.modal-close:hover {
    color: #333;
}

.modal-content {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Chart Containers */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.chart-container h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .app-nav {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .progress-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .classes-grid,
    .students-grid {
        grid-template-columns: 1fr;
    }
    
    .notification-panel {
        width: 100%;
    }
    
    .modal {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .modal-content {
        padding: 20px 15px;
    }
}

/* Chat History Styles */
.conversations-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.conversations-header h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
}

.conversations-grid {
    display: grid;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.conversation-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversation-card:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0,123,255,0.1);
}

.conversation-info h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.conversation-date {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.conversation-arrow {
    font-size: 14px;
    font-weight: 500;
}

.conversation-messages {
    max-height: 500px;
    overflow-y: auto;
}

.conversation-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.conversation-header h4 {
    margin: 10px 0 0 0;
    color: #333;
    font-size: 18px;
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.history-message {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.history-message.user-message {
    border-left: 4px solid #007bff;
}

.history-message.assistant-message {
    border-left: 4px solid #28a745;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.message-role {
    font-weight: 600;
    font-size: 14px;
}

.history-message.user-message .message-role {
    color: #007bff;
}

.history-message.assistant-message .message-role {
    color: #28a745;
}

.message-time {
    font-size: 12px;
    color: #666;
}

.message-content {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.message-content p {
    margin: 0 0 8px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Scrollbar styling for chat history */
.chat-history::-webkit-scrollbar,
.conversations-grid::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-track,
.conversations-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-history::-webkit-scrollbar-thumb,
.conversations-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-history::-webkit-scrollbar-thumb:hover,
.conversations-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */

/* Logo Styling */
.login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: block;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth header düzenleme */
.auth-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
    margin-top: 0; /* Logo ile arasındaki boşluk ayarı */
}

/* Responsive - Mobil için küçült */
@media (max-width: 480px) {
    .login-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
    }
    
    .auth-header h1 {
        font-size: 20px;
    }
}