/**
 * Etkilesimli Kitap v3.0 - Stiller
 * Modern, Neumorphic UI
 */

/* ==================== VARIABLES ==================== */
:root {
    --primary-bg: #e6e9f0;
    --secondary-bg: #eef1f6;
    --card-bg: #f0f3f8;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --accent-color: #667eea;
    --accent-hover: #5a67d8;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --info-color: #4299e1;
    
    --card-shadow: 6px 6px 12px #d1d9e6, -6px -6px 12px #ffffff;
    --card-shadow-sm: 3px 3px 6px #d1d9e6, -3px -3px 6px #ffffff;
    --inset-shadow: inset 3px 3px 6px #d1d9e6, inset -3px -3px 6px #ffffff;
    
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --transition: all 0.3s ease;
    
    --sidebar-width: 260px;
    --header-height: 60px;
}

/* ==================== RESET & BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Nunito Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ==================== LOGIN PAGE ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: white;
    box-shadow: var(--card-shadow);
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.login-form label i {
    margin-right: 8px;
    color: var(--accent-color);
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--primary-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--inset-shadow);
    color: var(--text-primary);
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    box-shadow: var(--inset-shadow), 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.demo-info {
    margin-top: 30px;
    padding: 20px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--inset-shadow);
}

.demo-info p {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.demo-accounts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.demo-badge {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-badge.student { background: #e6fffa; color: #234e52; }
.demo-badge.teacher { background: #fef3c7; color: #92400e; }
.demo-badge.admin { background: #fee2e2; color: #991b1b; }

.demo-badge:hover { transform: translateY(-2px); }

/* ==================== ALERTS ==================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ==================== BUTTONS ==================== */
.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: var(--card-shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--secondary-bg);
    color: var(--text-primary);
    box-shadow: var(--card-shadow-sm);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-block { width: 100%; }

.btn-sm { padding: 8px 14px; font-size: 13px; }

.btn-disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================== APP LAYOUT ==================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--secondary-bg);
    box-shadow: 4px 0 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.logo i { font-size: 28px; }

.user-info {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.user-details h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.role-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.role-badge.student { background: #e6fffa; color: #234e52; }
.role-badge.teacher { background: #fef3c7; color: #92400e; }
.role-badge.admin { background: #fee2e2; color: #991b1b; }

.sidebar-nav {
    flex: 1;
    padding: 15px 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 4px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--primary-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--accent-color);
    box-shadow: var(--inset-shadow);
    font-weight: 600;
}

.nav-item.logout { color: var(--danger-color); }
.nav-item.logout:hover { background: #fee2e2; }

.nav-divider {
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 15px 10px;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.page-header h1 i { color: var(--accent-color); }
.page-header p { color: var(--text-secondary); }

/* ==================== CARDS ==================== */
.section-card {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.section-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

.section-card h3 i { color: var(--accent-color); }

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-icon.green { background: linear-gradient(135deg, #48bb78, #38a169); }
.stat-icon.purple { background: linear-gradient(135deg, #9f7aea, #805ad5); }
.stat-icon.orange { background: linear-gradient(135deg, #ed8936, #dd6b20); }

.stat-info h3 {
    font-size: 24px;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== UNITS GRID ==================== */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.unit-card {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.unit-card:hover { transform: translateY(-5px); }

.unit-card.locked {
    opacity: 0.7;
}

.unit-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unit-badge {
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.completed { color: var(--success-color); }

.unit-body {
    padding: 20px;
}

.unit-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.unit-body p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.unit-progress {
    margin-top: 15px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--primary-bg);
    border-radius: 10px;
    box-shadow: var(--inset-shadow);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.eval-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 10px;
}

.eval-badge.passed { background: #d1fae5; color: #065f46; }
.eval-badge.failed { background: #fee2e2; color: #991b1b; }

.unit-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* ==================== MINI UNITS GRID ==================== */
.units-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.unit-mini-card {
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--card-shadow-sm);
}

.unit-mini-card:hover:not(.locked) {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.unit-mini-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.unit-mini-card .unit-number {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 6px;
}

.unit-mini-card h4 {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.unit-status {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.unit-status.completed { color: var(--success-color); }
.unit-status.progress { color: var(--warning-color); }
.unit-status.new { color: var(--accent-color); }
.unit-status.locked { color: var(--text-secondary); }

/* ==================== CONTINUE READING ==================== */
.continue-reading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--inset-shadow);
}

.continue-info h4 { margin-bottom: 5px; }
.continue-info p { color: var(--text-secondary); font-size: 14px; margin-bottom: 10px; }
.continue-info .progress-bar { width: 200px; }

/* ==================== BADGES ==================== */
.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--card-shadow-sm);
    border-left: 4px solid var(--badge-color, var(--accent-color));
}

.badge-item i {
    font-size: 24px;
    color: var(--badge-color, var(--accent-color));
}

.badge-item strong { display: block; margin-bottom: 2px; }
.badge-item small { color: var(--text-secondary); font-size: 12px; }

/* ==================== PDF VIEWER ==================== */
.pdf-viewer-wrapper {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    background: var(--primary-bg);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.pdf-viewer-wrapper:fullscreen {
    left: 0;
    z-index: 100;
}

.pdf-toolbar {
    height: var(--header-height);
    background: var(--secondary-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 20;
}

.toolbar-left, .toolbar-center, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--card-shadow-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.back-btn:hover { transform: scale(1.05); }

.unit-title h3 { font-size: 16px; margin-bottom: 2px; }
.unit-title .page-info { font-size: 13px; color: var(--text-secondary); }

.btn-toolbar {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--card-shadow-sm);
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
}

.btn-toolbar:hover { background: var(--secondary-bg); }
.btn-toolbar:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-toolbar .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-chatbot {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.page-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--inset-shadow);
}

.page-input-group input {
    width: 50px;
    text-align: center;
    background: transparent;
    border: none;
    font-weight: 600;
}

.page-input-group input:focus { outline: none; }

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-level {
    font-size: 13px;
    font-weight: 600;
    min-width: 45px;
    text-align: center;
}

.toolbar-divider {
    width: 1px;
    height: 30px;
    background: rgba(0,0,0,0.1);
}

/* ==================== PDF MAIN AREA ==================== */
.pdf-main-area {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

.pdf-container {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    padding: 20px;
    background: var(--primary-bg);
}

.pdf-viewer {
    background: white;
    box-shadow: 0 5px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
}

.pdf-viewer canvas {
    display: block;
}

.pdf-loading, .pdf-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-bg);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.pdf-error i { font-size: 48px; color: var(--danger-color); margin-bottom: 15px; }

/* ==================== INFO SIDEBAR ==================== */
.info-sidebar {
    width: 320px;
    background: var(--secondary-bg);
    border-left: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.info-sidebar.hidden {
    width: 0;
    opacity: 0;
    pointer-events: none;
}

.info-sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-sidebar-header h3 {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-sidebar {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: 50%;
    color: var(--text-secondary);
}

.info-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.info-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.info-empty i { font-size: 40px; margin-bottom: 10px; opacity: 0.5; }

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--card-shadow-sm);
}

.info-item:hover { transform: translateX(5px); }

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.info-icon.info { background: var(--info-color); }
.info-icon.definition { background: #9f7aea; }
.info-icon.tip { background: var(--warning-color); }
.info-icon.warning { background: var(--danger-color); }
.info-icon.example { background: var(--success-color); }
.info-icon.question { background: var(--accent-color); }

.info-text strong { display: block; font-size: 13px; }
.info-text small { color: var(--text-secondary); font-size: 11px; }

.info-item .seen { color: var(--success-color); margin-left: auto; }
.info-item .status-icon { margin-left: auto; }

.question-item.correct .status-icon { color: var(--success-color); }
.question-item.wrong .status-icon { color: var(--danger-color); }
.question-item.pending .status-icon { color: var(--text-secondary); }

/* ==================== CHATBOT SIDEBAR ==================== */
.chatbot-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 380px;
    height: 100%;
    background: var(--secondary-bg);
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: var(--transition);
}

.chatbot-sidebar.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.chatbot-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.chatbot-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 85%;
}

.chat-message.user { align-self: flex-end; }
.chat-message.bot { align-self: flex-start; }

.chat-message .message-content {
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    font-size: 14px;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.bot .message-content {
    background: var(--primary-bg);
    box-shadow: var(--card-shadow-sm);
    border-bottom-left-radius: 4px;
}

.chat-message.typing .message-content {
    display: flex;
    gap: 5px;
    padding: 16px 20px;
}

.chat-message.typing .dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.chat-message.typing .dot:nth-child(1) { animation-delay: -0.32s; }
.chat-message.typing .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chatbot-input {
    padding: 15px;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    background: var(--primary-bg);
    border: none;
    border-radius: 25px;
    box-shadow: var(--inset-shadow);
}

.chatbot-input input:focus { outline: none; }

.chatbot-input button {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow-sm);
}

/* ==================== POPUP SYSTEM ==================== */
.popup-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* popup-box: showPopup fonksiyonu tarafindan dinamik olusturulan popup container */
.popup-box {
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100000 !important;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-box {
    transform: scale(1);
}

.popup-container {
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100000 !important;
}

.popup-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

/* popup-title: showPopup tarafindan kullanilan baslik span'i */
.popup-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.popup-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
    cursor: pointer;
    flex-shrink: 0;
}

.popup-close:hover { background: rgba(255,255,255,0.3); }

.popup-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2) !important;
    border-radius: 50% !important;
    color: white !important;
    transition: var(--transition);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 22px !important;
    line-height: 1;
    padding: 0 !important;
}

.popup-close-btn:hover { background: rgba(255,255,255,0.4) !important; }

.popup-body {
    flex: 1;
    padding: 24px;
    padding-bottom: 32px;
    overflow-y: auto;
    max-height: 60vh;
}

.popup-footer {
    padding: 18px 24px;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--primary-bg);
}

/* Popup Content Styles - Renkli ve Modern */
.popup-type-info { 
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.08), rgba(99, 179, 237, 0.08));
    border-left: 4px solid #4299e1;
    padding: 20px;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 15px;
}

.popup-type-definition { 
    background: linear-gradient(135deg, rgba(159, 122, 234, 0.08), rgba(183, 148, 244, 0.08));
    border-left: 4px solid #9f7aea; 
    padding: 20px;
    border-radius: var(--border-radius-sm);
    line-height: 1.8;
    font-size: 15px;
}

.popup-type-tip { 
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.08), rgba(246, 173, 85, 0.08));
    border-left: 4px solid #ed8936;
    padding: 20px; 
    border-radius: var(--border-radius-sm);
    line-height: 1.8;
    font-size: 15px;
}

.popup-type-warning { 
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.08), rgba(252, 129, 129, 0.08));
    border-left: 4px solid #f56565;
    padding: 20px; 
    border-radius: var(--border-radius-sm); 
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 15px;
}

.popup-type-example { 
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.08), rgba(104, 211, 145, 0.08));
    border-left: 4px solid #48bb78;
    padding: 20px; 
    border-radius: var(--border-radius-sm);
    line-height: 1.8;
    font-size: 15px;
}

.popup-icon-large {
    animation: popupIconPulse 2s ease-in-out infinite;
}

@keyframes popupIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==================== QUESTION STYLES ==================== */
.question-content {
    padding: 10px 0;
}

.question-text {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--card-shadow-sm);
}

.option-label:hover { transform: translateX(5px); }

.option-label input { display: none; }

.option-key {
    width: 32px;
    height: 32px;
    background: var(--secondary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--accent-color);
    box-shadow: var(--card-shadow-sm);
}

.option-label input:checked + .option-key {
    background: var(--accent-color);
    color: white;
}

.option-label.correct-option {
    background: #d1fae5;
    border: 2px solid var(--success-color);
}

.option-label.wrong-option {
    background: #fee2e2;
    border: 2px solid var(--danger-color);
}

.question-options.true-false {
    flex-direction: row;
    gap: 15px;
}

.question-options.true-false .option-label {
    flex: 1;
    justify-content: center;
}

/* ===== SAYFA ICI DOGRU/YANLIS BUTONLARI ===== */
.tf-options-container {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.tf-option-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 25px;
    background: var(--primary-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.25s ease;
}

.tf-option-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tf-option-btn i {
    font-size: 18px;
    transition: all 0.25s ease;
}

.tf-option-btn[data-value="true"] i {
    color: #48bb78;
}

.tf-option-btn[data-value="false"] i {
    color: #f56565;
}

/* Hover */
.tf-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.tf-option-btn[data-value="true"]:hover {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.08);
}

.tf-option-btn[data-value="false"]:hover {
    border-color: #f56565;
    background: rgba(245, 101, 101, 0.08);
}

/* Selected - DOGRU */
.tf-option-btn[data-value="true"].selected {
    border-color: #48bb78 !important;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.15), rgba(72, 187, 120, 0.08)) !important;
    box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2), 0 6px 20px rgba(72, 187, 120, 0.15) !important;
    color: #2f855a;
}

.tf-option-btn[data-value="true"].selected i {
    color: #2f855a;
    transform: scale(1.2);
}

/* Selected - YANLIS */
.tf-option-btn[data-value="false"].selected {
    border-color: #f56565 !important;
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.15), rgba(245, 101, 101, 0.08)) !important;
    box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.2), 0 6px 20px rgba(245, 101, 101, 0.15) !important;
    color: #c53030;
}

.tf-option-btn[data-value="false"].selected i {
    color: #c53030;
    transform: scale(1.2);
}

/* Cevaplanmis - Dogru cevap */
.tf-option-btn.correct-option {
    border-color: #48bb78 !important;
    background: rgba(72, 187, 120, 0.12) !important;
}

.tf-option-btn.correct-option i {
    color: #2f855a;
}

/* Cevaplanmis - Yanlis cevap */
.tf-option-btn.wrong-option {
    border-color: #f56565 !important;
    background: rgba(245, 101, 101, 0.12) !important;
}

.tf-option-btn.wrong-option i {
    color: #c53030;
}

/* Cevaplanmis - Kullanici secimi */
.tf-option-btn.user-selected {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Disabled */
.tf-option-btn:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.85;
}

@media (max-width: 480px) {
    .tf-options-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .tf-option-btn {
        padding: 15px 20px;
    }
}

/* ========== v4.3: Gruplu Dogru/Yanlis Soru Stilleri ========== */
.grouped-tf-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.grouped-tf-questions::-webkit-scrollbar {
    width: 6px;
}

.grouped-tf-questions::-webkit-scrollbar-track {
    background: transparent;
}

.grouped-tf-questions::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.grouped-tf-item {
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    box-shadow: var(--card-shadow-sm);
    border: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.grouped-tf-item:hover {
    box-shadow: var(--card-shadow);
}

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

.grouped-tf-number {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
}

.grouped-tf-points {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.grouped-tf-points i {
    color: #ed8936;
    font-size: 11px;
}

.grouped-tf-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.grouped-tf-options {
    display: flex;
    gap: 10px;
}

.grouped-tf-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border-color);
    background: var(--primary-bg);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.grouped-tf-btn input[type="radio"] {
    display: none;
}

.grouped-tf-btn i {
    font-size: 15px;
}

.grouped-tf-btn[data-value="true"] i { color: #48bb78; }
.grouped-tf-btn[data-value="false"] i { color: #f56565; }

.grouped-tf-btn:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.grouped-tf-btn[data-value="true"].selected {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
}

.grouped-tf-btn[data-value="false"].selected {
    border-color: #f56565;
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
}

/* Sonuc popup'indaki item stilleri */
.grouped-tf-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grouped-tf-result-item {
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .grouped-tf-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .grouped-tf-btn {
        padding: 12px;
    }
    
    .grouped-tf-questions {
        max-height: 45vh;
    }
    
    .grouped-tf-item {
        padding: 12px;
    }
}

/* ========== v4.3: Gruplu Bosluk Doldurma Soru Stilleri ========== */
.grouped-fb-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.grouped-fb-questions::-webkit-scrollbar {
    width: 6px;
}

.grouped-fb-questions::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.grouped-fb-item {
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    box-shadow: var(--card-shadow-sm);
    border: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.grouped-fb-item:hover {
    box-shadow: var(--card-shadow);
}

.grouped-fb-input-wrap {
    margin-top: 4px;
}

.grouped-fb-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--primary-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.grouped-fb-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.grouped-fb-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

@media (max-width: 480px) {
    .grouped-fb-questions {
        max-height: 45vh;
    }
    
    .grouped-fb-item {
        padding: 12px;
    }
    
    .grouped-fb-input {
        padding: 10px 12px;
        font-size: 14px;
    }
}

.fill-blank-input input {
    width: 100%;
    padding: 14px 16px;
    background: var(--primary-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--inset-shadow);
    font-size: 16px;
}

.question-feedback {
    margin-top: 20px;
    padding: 18px 20px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 15px;
}

.question-feedback.correct { 
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.15), rgba(104, 211, 145, 0.15));
    border: 1px solid rgba(72, 187, 120, 0.3);
    color: #065f46; 
}

.question-feedback.wrong { 
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.15), rgba(252, 129, 129, 0.15));
    border: 1px solid rgba(245, 101, 101, 0.3);
    color: #991b1b; 
}

.question-feedback i { 
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.question-feedback.correct i {
    background: linear-gradient(135deg, #48bb78, #68d391);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.question-feedback.wrong i {
    background: linear-gradient(135deg, #f56565, #fc8181);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
}

.result-content { 
    text-align: center; 
    padding: 25px 0; 
}

.result-content.correct { color: var(--text-primary); }
.result-content.wrong { color: var(--text-primary); }

.result-content.correct p:first-child {
    font-size: 20px;
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 15px;
}

.result-content.wrong p:first-child {
    font-size: 20px;
    font-weight: 600;
    color: var(--danger-color);
    margin-bottom: 15px;
}

.result-content::before {
    content: '';
    display: block;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
}

.result-content.correct::before {
    background: linear-gradient(135deg, #48bb78, #68d391);
    box-shadow: 0 6px 25px rgba(72, 187, 120, 0.4);
}

.result-content.wrong::before {
    background: linear-gradient(135deg, #f56565, #fc8181);
    box-shadow: 0 6px 25px rgba(245, 101, 101, 0.4);
}

.explanation, .correct-answer-box {
    margin-top: 20px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-left: 4px solid var(--accent-color);
    border-radius: var(--border-radius-sm);
    text-align: left;
    font-size: 14px;
    line-height: 1.7;
}

.correct-answer-box {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.08), rgba(104, 211, 145, 0.08));
    border-left-color: var(--success-color);
}

.retry-hint { 
    margin-top: 20px; 
    color: var(--text-secondary); 
    font-size: 14px;
    padding: 12px 18px;
    background: rgba(237, 137, 54, 0.1);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid #ed8936;
}

.next-question-hint {
    margin-top: 20px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

/* ==================== SELF EVALUATION ==================== */
.self-evaluation-intro {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--border-radius-sm);
    margin-bottom: 25px;
}

.passing-note {
    margin-top: 10px;
    color: var(--accent-color);
    font-weight: 500;
}

.eval-theme {
    margin-bottom: 25px;
}

.eval-theme h4 {
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 16px;
}

.eval-statement {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
}

.eval-statement p {
    margin-bottom: 12px;
    font-size: 14px;
}

.eval-scale {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.scale-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.scale-option input { display: none; }

.scale-option span {
    display: block;
    padding: 10px;
    background: var(--secondary-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--card-shadow-sm);
    transition: var(--transition);
}

.scale-option input:checked + span {
    background: var(--accent-color);
    color: white;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 11px;
}

.eval-result {
    text-align: center;
    padding: 30px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--card-shadow);
}

.score-circle.success { background: linear-gradient(135deg, #48bb78, #38a169); color: white; }
.score-circle.danger { background: linear-gradient(135deg, #f56565, #e53e3e); color: white; }

.score-value { font-size: 32px; font-weight: 700; }

.result-message { margin-top: 20px; }
.result-message p { margin-bottom: 10px; }

.next-unit {
    color: var(--success-color);
    font-weight: 600;
}

/* ==================== TOAST ==================== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 20px;
    background: var(--secondary-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.toast.show { transform: translateX(0); }

.toast-success { border-left: 4px solid var(--success-color); }
.toast-danger { border-left: 4px solid var(--danger-color); }
.toast-warning { border-left: 4px solid var(--warning-color); }
.toast-info { border-left: 4px solid var(--info-color); }

.toast-success i { color: var(--success-color); }
.toast-danger i { color: var(--danger-color); }
.toast-warning i { color: var(--warning-color); }
.toast-info i { color: var(--info-color); }

/* ==================== TABLES ==================== */
.table-responsive { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.data-table th {
    background: var(--primary-bg);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.data-table tr:hover { background: rgba(102, 126, 234, 0.03); }

.data-table.compact th, .data-table.compact td { padding: 10px 12px; font-size: 13px; }

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-bg);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.score {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.score.good { background: #d1fae5; color: #065f46; }
.score.bad { background: #fee2e2; color: #991b1b; }
.score.neutral { background: var(--primary-bg); color: var(--text-secondary); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success { background: #d1fae5; color: #065f46; }
.status-badge.progress { background: #fef3c7; color: #92400e; }
.status-badge.pending { background: var(--primary-bg); color: var(--text-secondary); }

.mini-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-progress .progress-bar { flex: 1; max-width: 120px; }
.mini-progress span { font-size: 13px; font-weight: 500; }

/* ==================== PROGRESS PAGE ==================== */
.progress-overview {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.progress-circle-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.progress-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        var(--accent-color) calc(var(--progress) * 1%),
        var(--primary-bg) 0
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
}

.progress-inner {
    width: 120px;
    height: 120px;
    background: var(--secondary-bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--inset-shadow);
}

.progress-value { font-size: 28px; font-weight: 700; color: var(--accent-color); }
.progress-label { font-size: 13px; color: var(--text-secondary); }

.progress-stats {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.progress-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.progress-stat i { font-size: 28px; }
.progress-stat h4 { font-size: 24px; margin-bottom: 4px; }
.progress-stat p { color: var(--text-secondary); font-size: 13px; }

/* ==================== ADMIN FORMS ==================== */
.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--primary-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--inset-shadow);
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    box-shadow: var(--inset-shadow), 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

/* ==================== ACTIVITY LIST ==================== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
}

.activity-icon {
    color: var(--accent-color);
    font-size: 8px;
}

.activity-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-action { font-size: 14px; }
.activity-time { font-size: 12px; color: var(--text-secondary); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .sidebar.open { transform: translateX(0); }
    
    .main-content { margin-left: 0; }
    
    .pdf-viewer-wrapper { left: 0; }
    
    .progress-overview { flex-direction: column; }
    
    .chatbot-sidebar { width: 100%; }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    
    .units-grid { grid-template-columns: 1fr; }
    
    .pdf-toolbar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .toolbar-left, .toolbar-center, .toolbar-right {
        width: 100%;
        justify-content: center;
    }
    
    .unit-title { display: none; }
    
    .info-sidebar { width: 100%; }
}

/* ==================== ADMIN PANEL EK STILLER ==================== */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.db-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.db-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
}

.db-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.db-value {
    font-weight: 600;
    font-size: 14px;
}

.db-value.status-ok {
    color: var(--success-color);
}

.table-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-tag {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-bg);
    border-radius: 20px;
    font-size: 12px;
    font-family: monospace;
    box-shadow: var(--card-shadow-sm);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 20px;
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.action-btn i {
    font-size: 28px;
    color: var(--accent-color);
}

.action-btn span {
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== PDF SCROLL DUZELTMESI ==================== */
.pdf-container {
    flex: 1;
    overflow: auto !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 30px;
    background: var(--primary-bg);
    position: relative;
}

.pdf-viewer {
    background: white;
    box-shadow: 0 5px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: visible;
    flex-shrink: 0;
}

.pdf-main-area {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    height: calc(100vh - var(--header-height));
}

/* Scrollbar Stilleri */
.pdf-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.pdf-container::-webkit-scrollbar-track {
    background: var(--primary-bg);
    border-radius: 6px;
}

.pdf-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
    border: 2px solid var(--primary-bg);
}

.pdf-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* Firefox Scrollbar */
.pdf-container {
    scrollbar-width: thin;
    scrollbar-color: #667eea var(--primary-bg);
}

/* Fullscreen modda scroll */
.pdf-viewer-wrapper:fullscreen .pdf-container {
    height: calc(100vh - var(--header-height));
    overflow: auto !important;
}

/* Mobile scroll iyilestirmesi */
@media (max-width: 768px) {
    .pdf-container {
        padding: 15px;
    }
    
    .pdf-main-area {
        height: calc(100vh - 120px);
    }
}

/* ==================== ANALYTICS DASHBOARD ==================== */

/* Header */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

/* Metrik Kartlari */
.analytics-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.metric-card.gradient-blue::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.metric-card.gradient-green::before { background: linear-gradient(90deg, #48bb78, #38a169); }
.metric-card.gradient-purple::before { background: linear-gradient(90deg, #9f7aea, #805ad5); }
.metric-card.gradient-orange::before { background: linear-gradient(90deg, #ed8936, #dd6b20); }

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.gradient-blue .metric-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.gradient-green .metric-icon { background: linear-gradient(135deg, #48bb78, #38a169); }
.gradient-purple .metric-icon { background: linear-gradient(135deg, #9f7aea, #805ad5); }
.gradient-orange .metric-icon { background: linear-gradient(135deg, #ed8936, #dd6b20); }

.metric-content {
    flex: 1;
}

.metric-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.metric-trend {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.metric-trend.up {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
}

.metric-trend.down {
    background: rgba(245, 101, 101, 0.1);
    color: var(--danger-color);
}

/* Grafik Grid */
.analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.chart-card.span-2 {
    grid-column: span 2;
}

.chart-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.chart-header h3 i {
    color: var(--accent-color);
}

.chart-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.chart-body {
    padding: 20px;
    height: 280px;
    position: relative;
}

.chart-body-sm {
    height: 200px;
}

.chart-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0 20px 20px;
}

.chart-stat {
    text-align: center;
}

.chart-stat .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.chart-stat .stat-value.success { color: var(--success-color); }
.chart-stat .stat-value.danger { color: var(--danger-color); }

.chart-stat .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Chatbot Istatistikleri */
.chatbot-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.chatbot-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
}

.chatbot-stat i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    color: var(--accent-color);
    font-size: 16px;
}

.chatbot-stat .value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.chatbot-stat .label {
    font-size: 11px;
    color: var(--text-secondary);
}

.top-chat-units {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 15px;
}

.top-chat-units h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.chat-unit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
}

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

.chat-unit-item .rank {
    width: 24px;
    height: 24px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-color);
}

.chat-unit-item .title {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.chat-unit-item .count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--primary-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Ogrenci Tablosu */
.analytics-table-card {
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.table-header h3 {
    margin: 0;
}

.table-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.search-box input {
    padding: 10px 14px 10px 40px;
    background: var(--primary-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    width: 220px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.table-controls select {
    padding: 10px 14px;
    background: var(--primary-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    cursor: pointer;
}

/* Analytics Tablosu */
.analytics-table {
    width: 100%;
}

.analytics-table th {
    background: var(--primary-bg);
    padding: 14px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
}

.analytics-table td {
    padding: 16px 12px;
    vertical-align: middle;
}

.analytics-table tbody tr {
    transition: var(--transition);
}

.analytics-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.04);
}

/* Siralama */
.td-rank {
    width: 50px;
    text-align: center;
}

.rank-badge {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: white;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: white;
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b06c2d);
    color: white;
}

.rank-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Ogrenci Bilgisi */
.student-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.student-info strong {
    display: block;
    font-size: 14px;
}

.student-info small {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Ilerleme */
.progress-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar-mini {
    width: 100px;
    height: 6px;
    background: var(--primary-bg);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-mini .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
}

.progress-cell span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Sorular */
.td-questions {
    display: flex;
    gap: 12px;
}

.question-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}

.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }

/* Basari Gostergesi */
.success-indicator {
    position: relative;
    width: 50px;
    height: 50px;
}

.circular-chart {
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: var(--primary-bg);
    stroke-width: 3;
}

.circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dasharray 0.6s ease;
}

.success-indicator.excellent .circle { stroke: #38a169; }
.success-indicator.good .circle { stroke: #48bb78; }
.success-indicator.average .circle { stroke: #ecc94b; }
.success-indicator.poor .circle { stroke: #f56565; }

.success-indicator .percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
}

/* Sure ve Rozet */
.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-bg);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.time-badge i {
    color: var(--accent-color);
}

.badge-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.badge-count i {
    color: #ffd700;
}

/* Son Aktivite */
.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.activity-time.inactive {
    color: #cbd5e0;
}

/* Aktivite Timeline */
.analytics-activity-section {
    margin-bottom: 30px;
}

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

.activity-header h3 {
    margin: 0;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--success-color);
    font-weight: 500;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(72, 187, 120, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0);
    }
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
}

.timeline-item:hover {
    background: rgba(102, 126, 234, 0.03);
    padding-left: 10px;
    margin-left: -10px;
    margin-right: -10px;
    padding-right: 10px;
}

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

.timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.timeline-icon.blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.timeline-icon.green { background: linear-gradient(135deg, #48bb78, #38a169); }
.timeline-icon.purple { background: linear-gradient(135deg, #9f7aea, #805ad5); }
.timeline-icon.orange { background: linear-gradient(135deg, #ed8936, #dd6b20); }
.timeline-icon.gold { background: linear-gradient(135deg, #ffd700, #ffb800); }
.timeline-icon.gray { background: linear-gradient(135deg, #a0aec0, #718096); }
.timeline-icon.teal { background: linear-gradient(135deg, #38b2ac, #319795); }
.timeline-icon.default { background: var(--primary-bg); color: var(--text-secondary); }

.timeline-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-header strong {
    font-size: 14px;
}

.action-label {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 3px 10px;
    background: var(--primary-bg);
    border-radius: 20px;
}

.timeline-time {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Responsive Analytics */
@media (max-width: 1200px) {
    .analytics-charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-card.span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .analytics-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card.span-2 {
        grid-column: span 1;
    }
    
    .analytics-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .analytics-metrics {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .table-controls select {
        width: 100%;
    }
    
    .td-questions {
        flex-direction: column;
        gap: 4px;
    }
    
    .timeline-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ==================== BEKLEYEN ICERIK UYARISI ==================== */
.pending-content-warning {
    text-align: center;
    padding: 20px;
}

.pending-content-warning p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.pending-content-warning p:first-child {
    color: var(--danger-color);
    font-size: 16px;
}

.pending-content-warning p:last-child {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

/* ==================== OLCME DEGERLENDIRME SORULARI ==================== */



/* ==================== EŞLEŞTIRME SORULARI - REDESIGNED ==================== */
.matching-question {
    margin: 10px 0;
}

.matching-instructions {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.matching-instructions i {
    font-size: 20px;
    color: #6366f1;
    flex-shrink: 0;
}

.matching-content {
    font-size: 15px;
    line-height: 2.4;
    padding: 20px;
    background: #fafbff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.matching-dropdown-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 6px;
    vertical-align: middle;
    position: relative;
}

.matching-select {
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    border: 2px solid #c7d2fe;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 160px;
    font-weight: 500;
    color: #374151;
}

.matching-select:hover {
    border-color: #818cf8;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.matching-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.matching-select:disabled {
    cursor: not-allowed;
    opacity: 0.85;
    transform: none !important;
    box-shadow: none !important;
}

.matching-select.correct-select {
    border-color: #34d399;
    background-color: #ecfdf5;
    color: #065f46;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2310b981' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.matching-select.wrong-select {
    border-color: #fca5a5;
    background-color: #fef2f2;
    color: #991b1b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ef4444' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.match-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    animation: matchResultPop 0.3s ease;
}

@keyframes matchResultPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.match-result.correct {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.match-result.wrong {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.correct-hint {
    color: #059669;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 6px;
    padding: 4px 10px;
    background: #d1fae5;
    border-radius: 8px;
    white-space: nowrap;
}

.correct-hint i {
    font-size: 12px;
}

/* Eşleştirme Çiftleri - Kart Tasarımı */
.matching-pairs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.matching-pair {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.matching-pair:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.matching-pair::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #818cf8, #6366f1);
    border-radius: 12px 0 0 12px;
}

.matching-key {
    font-weight: 700;
    color: #4338ca;
    min-width: 50px;
    font-size: 15px;
    padding: 6px 12px;
    background: #eef2ff;
    border-radius: 8px;
    text-align: center;
    flex-shrink: 0;
}

.matching-pair .matching-select {
    flex: 1;
    max-width: 350px;
}

.matching-pair .correct-hint {
    margin-left: auto;
}

/* Sonuç Özeti */
.matching-result-summary {
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    border: 1px solid transparent;
}

.matching-result-summary.success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #a7f3d0;
    color: #065f46;
}

.matching-result-summary.error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fecaca;
    color: #991b1b;
}

/* Eşleştirme Mobil */
@media (max-width: 768px) {
    .matching-content {
        padding: 14px;
        line-height: 2.6;
        font-size: 14px;
    }
    
    .matching-select {
        min-width: 130px;
        padding: 8px 30px 8px 10px;
        font-size: 13px;
    }
    
    .matching-pair {
        flex-wrap: wrap;
        padding: 12px 14px 12px 18px;
        gap: 10px;
    }
    
    .matching-pair .matching-select {
        width: 100%;
        max-width: 100%;
    }
    
    .matching-key {
        min-width: auto;
        font-size: 14px;
    }
    
    .matching-instructions {
        font-size: 13px;
        padding: 12px 14px;
    }
    
    .correct-hint {
        font-size: 12px;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .matching-select {
        min-width: 100%;
        font-size: 14px;
        padding: 10px 32px 10px 12px;
    }
    
    .matching-dropdown-wrapper {
        display: flex;
        width: 100%;
        margin: 6px 0;
    }
    
    .matching-dropdown-wrapper .matching-select {
        width: 100%;
    }
}

/* Bosluk doldurma feedback */
.fill-blank-input {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fill-feedback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
}

.fill-feedback.correct {
    background: #48bb78;
    color: white;
}

.fill-feedback.wrong {
    background: #f56565;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .matching-select {
        min-width: 120px;
        font-size: 13px;
    }
    
    .matching-content {
        line-height: 2.5;
    }
    
    .matching-dropdown-wrapper {
        display: flex;
        flex-wrap: wrap;
    }
}

/* ==================== NAV GROUP (ACILIR MENU) ==================== */
.nav-group {
    margin: 0;
}

.nav-group-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    gap: 10px;
}

.nav-group-header:hover {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

.nav-group-header i:first-child {
    width: 20px;
    text-align: center;
}

.nav-group-header span {
    flex: 1;
}

.nav-group-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-group.open .nav-group-arrow {
    transform: rotate(180deg);
}

.nav-group-items {
    display: none;
    padding-left: 10px;
}

.nav-group.open .nav-group-items {
    display: block;
}

.nav-item.sub-item {
    padding-left: 35px;
    font-size: 13px;
}

.nav-badge {
    background: var(--accent-color);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.nav-badge.warning {
    background: #f5a623;
}

/* ==================== MESAJLAR SAYFASI ==================== */
.messages-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    height: calc(100vh - 180px);
    min-height: 500px;
}

.conversations-panel {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversations-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversations-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    padding: 12px 15px;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
}

.conversation-item:hover {
    background: var(--secondary-bg);
}

.conversation-item.active {
    background: #667eea15;
    border-left: 3px solid var(--accent-color);
}

.conversation-item.unread {
    background: #fff7ed;
}

.conv-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
}

.unread-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #f56565;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conv-info {
    flex: 1;
    min-width: 0;
}

.conv-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.conv-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.conv-role {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
}

.conv-role.teacher {
    background: #48bb7820;
    color: #2f855a;
}

.conv-role.admin {
    background: #f5656520;
    color: #c53030;
}

.conv-role.student {
    background: #4299e120;
    color: #2b6cb0;
}

.conv-preview {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.you-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.conv-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.no-conversations {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-conversations i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
    display: block;
}

.no-conversations p {
    margin: 10px 0 5px;
    font-weight: 500;
}

.no-conversations small {
    font-size: 12px;
}

/* Mesaj Detay Paneli */
.message-detail-panel {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.message-detail-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: var(--secondary-bg);
}

.detail-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.detail-user-info h3 {
    margin: 0 0 2px;
    font-size: 16px;
}

.messages-thread {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
}

.message-bubble.sent {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-bubble.received {
    background: white;
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-content {
    line-height: 1.5;
    word-break: break-word;
}

.message-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 11px;
    opacity: 0.7;
}

.message-status.read {
    color: #48bb78;
}

.message-input-area {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    background: white;
}

.message-input-area form {
    display: flex;
    gap: 10px;
}

.message-input-area textarea {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    resize: none;
    font-size: 14px;
    max-height: 100px;
    font-family: inherit;
}

.message-input-area textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.message-input-area button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-conversation-selected {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.no-conversation-selected i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-conversation-selected h3 {
    margin: 0 0 10px;
}

.no-conversation-selected p {
    margin: 0;
}

/* ==================== KILAVUZ SAYFASI ==================== */
.guide-container {
    max-width: 900px;
    margin: 0 auto;
}

.guide-hero {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 25px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
}

.guide-hero h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.guide-hero p {
    margin: 0;
    opacity: 0.9;
}

.guide-toc {
    margin-bottom: 25px;
}

.guide-toc h3 {
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--secondary-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.toc-item:hover {
    background: #667eea15;
    color: var(--accent-color);
}

.toc-item i {
    color: var(--accent-color);
}

.guide-section {
    margin-bottom: 20px;
}

.guide-section h3 {
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color);
}

.guide-content h4 {
    margin: 20px 0 10px;
    color: var(--text-primary);
}

.guide-content p {
    margin: 0 0 15px;
    line-height: 1.7;
}

.guide-content ul, .guide-content ol {
    margin: 0 0 15px;
    padding-left: 25px;
}

.guide-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.guide-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.guide-alert.info {
    background: #ebf8ff;
    color: #2b6cb0;
}

.guide-alert.success {
    background: #f0fff4;
    color: #2f855a;
}

.guide-alert.warning {
    background: #fffaf0;
    color: #c05621;
}

.guide-alert i {
    font-size: 18px;
    margin-top: 2px;
}

.popup-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.popup-type-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.popup-type-card i {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.popup-type-card h5 {
    margin: 0 0 5px;
    font-size: 14px;
}

.popup-type-card p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.popup-type-card.info {
    background: #ebf8ff;
    color: #2b6cb0;
}

.popup-type-card.definition {
    background: #faf5ff;
    color: #6b46c1;
}

.popup-type-card.tip {
    background: #fffaf0;
    color: #c05621;
}

.popup-type-card.warning {
    background: #fff5f5;
    color: #c53030;
}

.popup-type-card.example {
    background: #f0fff4;
    color: #2f855a;
}

.guide-cta {
    text-align: center;
    background: linear-gradient(135deg, #667eea15, #764ba215);
    padding: 30px;
}

.guide-cta i {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 15px;
    display: block;
}

.guide-cta h3 {
    margin: 0 0 10px;
}

.guide-cta p {
    margin: 0 0 20px;
    color: var(--text-secondary);
}

/* ==================== DESTEK TALEBI SAYFASI ==================== */
.support-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.support-form-panel .section-card h3 {
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Support Form Stilleri */
.support-form-panel .form-group {
    margin-bottom: 20px;
}

.support-form-panel .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.support-form-panel .form-group label i {
    margin-right: 6px;
    color: var(--accent-color);
}

.support-form-panel .form-group input[type="text"],
.support-form-panel .form-group select,
.support-form-panel .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: var(--transition);
    box-sizing: border-box;
}

.support-form-panel .form-group input[type="text"]:focus,
.support-form-panel .form-group select:focus,
.support-form-panel .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.support-form-panel .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.support-form-panel .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.support-form-panel .form-row .form-group {
    margin-bottom: 20px;
}

.support-form-panel .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.request-types-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.type-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.type-item i {
    width: 35px;
    height: 35px;
    background: var(--secondary-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
}

.type-item strong {
    display: block;
    margin-bottom: 2px;
}

.type-item p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.response-times {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.time-item.urgent {
    background: #fed7d7;
    color: #c53030;
}

.time-item.high {
    background: #feebc8;
    color: #c05621;
}

.time-item.normal {
    background: #e2e8f0;
    color: #4a5568;
}

.time-item.low {
    background: #c6f6d5;
    color: #2f855a;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
    display: block;
}

.empty-state p {
    margin: 0;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.request-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.request-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.request-info h4 {
    width: 100%;
    margin: 10px 0 0;
    font-size: 16px;
}

.request-type-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.request-type-badge.technical {
    background: #fed7d7;
    color: #c53030;
}

.request-type-badge.question {
    background: #bee3f8;
    color: #2b6cb0;
}

.request-type-badge.suggestion {
    background: #c6f6d5;
    color: #2f855a;
}

.request-type-badge.complaint {
    background: #feebc8;
    color: #c05621;
}

.request-type-badge.other {
    background: #e2e8f0;
    color: #4a5568;
}

.request-priority {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.request-priority.urgent {
    background: #c53030;
    color: white;
}

.request-priority.high {
    background: #dd6b20;
    color: white;
}

.request-priority.normal {
    background: #718096;
    color: white;
}

.request-priority.low {
    background: #a0aec0;
    color: white;
}

.request-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.open {
    background: #bee3f8;
    color: #2b6cb0;
}

.status-badge.in_progress {
    background: #feebc8;
    color: #c05621;
}

.status-badge.closed {
    background: #c6f6d5;
    color: #2f855a;
}

.request-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.request-body {
    padding: 15px;
    background: var(--secondary-bg);
}

.request-body p {
    margin: 0;
    line-height: 1.6;
}

.request-response {
    padding: 15px;
    background: #f0fff4;
    border-top: 1px solid #c6f6d5;
}

.request-response .response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #2f855a;
    flex-wrap: wrap;
}

.request-response .response-date {
    margin-left: auto;
}

.request-response p {
    margin: 0;
    line-height: 1.6;
}

/* ==================== ADMIN DESTEK TALEPLERI ==================== */
.filter-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.admin-requests-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.admin-request-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.admin-request-item.open {
    border-left: 4px solid #4299e1;
}

.admin-request-item.in_progress {
    border-left: 4px solid #ed8936;
}

.admin-request-item.closed {
    border-left: 4px solid #48bb78;
    opacity: 0.8;
}

.request-main {
    padding: 20px;
}

.request-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.request-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.request-id {
    font-weight: 600;
    color: var(--text-secondary);
}

.request-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0 10px;
    padding: 10px 15px;
    background: var(--secondary-bg);
    border-radius: 8px;
}

.request-user i {
    color: var(--text-secondary);
}

.request-subject {
    margin: 0 0 10px;
    font-size: 18px;
}

.request-message {
    line-height: 1.7;
    color: var(--text-secondary);
}

.existing-response {
    margin-top: 15px;
    padding: 15px;
    background: #f0fff4;
    border-radius: 8px;
}

.existing-response .response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #2f855a;
}

.existing-response p {
    margin: 0;
    line-height: 1.6;
}

.request-actions {
    padding: 15px 20px;
    background: var(--secondary-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.response-form {
    padding: 20px;
    background: #fffff0;
    border-top: 1px solid #e2e8f0;
}

.response-form.hidden {
    display: none;
}

.response-form h4 {
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.response-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 15px;
    font-family: inherit;
}

.response-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ==================== UNITE GERI BILDIRIM ANKETI ==================== */
.feedback-survey {
    max-width: 500px;
    margin: 0 auto;
}

.feedback-intro {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
}

.feedback-intro::before {
    content: '\f518';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    display: block;
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    line-height: 60px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.feedback-question {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--secondary-bg);
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--card-shadow-sm);
    transition: var(--transition);
}

.feedback-question:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

.feedback-question-text {
    margin: 0 0 18px;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

.feedback-scale {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feedback-option {
    cursor: pointer;
}

.feedback-option input {
    display: none;
}

.feedback-option-label {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border: 2px solid #e2e8f0;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.feedback-option input:checked + .feedback-option-label {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.feedback-option:hover .feedback-option-label {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.feedback-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    padding: 0 5px;
}

.feedback-open-question {
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.08), rgba(246, 173, 85, 0.08));
    border-radius: var(--border-radius-sm);
    border-left: 4px solid #ed8936;
}

.feedback-open-question label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #c05621;
}

.feedback-open-question label i {
    font-size: 18px;
}

.feedback-open-question textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(237, 137, 54, 0.2);
    border-radius: 10px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.feedback-open-question textarea:focus {
    outline: none;
    border-color: #ed8936;
    box-shadow: 0 0 0 3px rgba(237, 137, 54, 0.15);
}

.feedback-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ==================== MODAL ==================== */
.modal {
    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: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 5px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-body .form-group select,
.modal-body .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.modal-body .form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-body .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .messages-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .conversations-panel {
        max-height: 300px;
    }
    
    .support-container {
        grid-template-columns: 1fr;
    }
    
    .support-info-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .request-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-actions {
        width: 100%;
        justify-content: center;
    }
    
    .request-header {
        flex-direction: column;
    }
    
    .request-status {
        align-items: flex-start;
        flex-direction: row;
        gap: 10px;
    }
}

/* ==================== QUIZ MODULU STILLERI ==================== */
.quiz-intro {
    text-align: center;
    padding: 25px;
}

.quiz-intro > p:first-child {
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.quiz-intro::before {
    content: '\f518';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: white;
    font-size: 32px;
    line-height: 80px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    animation: quizIconPulse 2s ease-in-out infinite;
}

@keyframes quizIconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5); }
}

.quiz-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.quiz-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.quiz-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.quiz-stat i {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quiz-stat span {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.quiz-note {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1), rgba(99, 179, 237, 0.1));
    padding: 15px 25px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: #2b6cb0;
    border-left: 4px solid #4299e1;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-note i {
    font-size: 20px;
    color: #4299e1;
}

.quiz-question-content {
    padding: 15px 0;
}

.quiz-progress {
    height: 8px;
    background: linear-gradient(135deg, #e2e8f0, #edf2f7);
    border-radius: 4px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #9f7aea);
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.quiz-results {
    text-align: center;
    padding: 25px;
}

.quiz-results::before {
    content: '';
    display: block;
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.quiz-results.passed::before {
    background: linear-gradient(135deg, #48bb78, #68d391);
    box-shadow: 0 8px 30px rgba(72, 187, 120, 0.4);
}

.quiz-results.failed::before {
    background: linear-gradient(135deg, #f56565, #fc8181);
    box-shadow: 0 8px 30px rgba(245, 101, 101, 0.4);
}

.quiz-results .result-score {
    margin: 25px 0;
}

.quiz-results .score-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    font-weight: 800;
    position: relative;
}

.quiz-results .score-circle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: scoreRotate 3s linear infinite;
}

@keyframes scoreRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.quiz-results .score-circle.success {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.15), rgba(56, 161, 105, 0.15));
    border: 4px solid var(--success-color);
    color: var(--success-color);
    box-shadow: 0 6px 25px rgba(72, 187, 120, 0.3);
}

.quiz-results .score-circle.danger {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.15), rgba(229, 62, 62, 0.15));
    border: 4px solid var(--danger-color);
    color: var(--danger-color);
    box-shadow: 0 6px 25px rgba(245, 101, 101, 0.3);
}

.quiz-results p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.quiz-results .success-message {
    color: var(--success-color);
    font-weight: 700;
    margin-top: 25px;
    font-size: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(104, 211, 145, 0.1));
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

.quiz-results .success-message i {
    margin-right: 10px;
    font-size: 22px;
}

.quiz-results .retry-message {
    color: #c05621;
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.1), rgba(246, 173, 85, 0.1));
    border-radius: var(--border-radius-sm);
    border-left: 4px solid #ed8936;
}

.quiz-results.passed {
    border-top: none;
    background: linear-gradient(180deg, rgba(72, 187, 120, 0.05), transparent 50%);
}

.quiz-results.failed {
    border-top: none;
    background: linear-gradient(180deg, rgba(245, 101, 101, 0.05), transparent 50%);
}

/* Quiz Intro Icon */
.quiz-intro-icon {
    text-align: center;
    margin-bottom: 15px;
}

.quiz-intro-icon i {
    background: linear-gradient(135deg, var(--accent-color), #38b2ac);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Unit Complete Styles */
.unit-complete {
    text-align: center;
    padding: 20px;
}

.unit-complete .complete-icon {
    margin-bottom: 15px;
    animation: bounceIn 0.6s ease;
}

.unit-complete p {
    color: var(--text-primary);
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Quiz Stats Enhanced */
.quiz-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* ==================== ADMIN USER MANAGEMENT ==================== */
.user-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-avatar-small.student {
    background: linear-gradient(135deg, #4299e1, #63b3ed);
    color: white;
}

.user-avatar-small.teacher {
    background: linear-gradient(135deg, #48bb78, #68d391);
    color: white;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.role-badge.student {
    background: rgba(66, 153, 225, 0.15);
    color: #4299e1;
}

.role-badge.teacher {
    background: rgba(72, 187, 120, 0.15);
    color: #48bb78;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936, #f6ad55);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #dd6b20, #ed8936);
    transform: translateY(-1px);
}

.btn-info {
    background: linear-gradient(135deg, #4299e1, #63b3ed);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #3182ce, #4299e1);
    transform: translateY(-1px);
}

/* User Details Popup */
.user-details-popup {
    max-height: 60vh;
    overflow-y: auto;
}

.user-details-popup h4 {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section {
    margin-top: 20px;
    padding: 15px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
}

.detail-section h5 {
    margin: 0 0 12px 0;
    color: var(--accent-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.mini-table th,
.mini-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.mini-table th {
    background: var(--secondary-bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.badge.success {
    background: rgba(72, 187, 120, 0.15);
    color: #48bb78;
}

.badge.warning {
    background: rgba(237, 137, 54, 0.15);
    color: #ed8936;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row span {
    color: var(--text-muted);
}

.stat-row strong {
    color: var(--text-primary);
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* ==================== QUIZ STYLES - MODERN DESIGN ==================== */

/* Quiz Start Screen */
.quiz-start-screen,
.quiz-complete-screen {
    text-align: center;
    padding: 20px 10px;
}

.quiz-start-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent-color), #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-start-icon i {
    font-size: 36px;
    color: white;
}

.quiz-start-screen h3,
.quiz-complete-screen h3 {
    margin: 0 0 10px;
    font-size: 22px;
    color: var(--text-primary);
}

.quiz-start-screen p,
.quiz-complete-screen p {
    color: var(--text-muted);
    margin: 0 0 25px;
    line-height: 1.5;
}

.quiz-info-cards {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--primary-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.info-card .info-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 18px;
}

.info-card .info-text {
    text-align: left;
}

.info-card .info-text strong {
    display: block;
    font-size: 20px;
    color: var(--text-primary);
}

.info-card .info-text span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Complete Animation */
.complete-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.5s ease;
}

.complete-animation i {
    font-size: 48px;
    color: white;
}

@keyframes popIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Quiz Card */
.quiz-card {
    padding: 5px 0;
}

.quiz-progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #764ba2);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.quiz-type-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 10px;
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.quiz-type-indicator i {
    font-size: 16px;
}

.quiz-points-badge {
    margin-left: auto;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quiz-question-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding: 0 5px;
}

.quiz-options-area {
    padding: 0 5px;
}

/* ===== MULTIPLE CHOICE ===== */
.mc-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 18px;
    background: var(--primary-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.mc-option:hover {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: translateX(5px);
}

.mc-option.selected {
    border-color: var(--accent-color) !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15)) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25) !important;
    transform: translateX(5px);
}

.mc-letter {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    color: var(--text-muted);
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.mc-option.selected .mc-letter {
    background: var(--accent-color) !important;
    color: white !important;
}

.mc-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
}

.mc-indicator {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: transparent;
    border-radius: 50%;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.mc-option.selected .mc-indicator {
    background: var(--success-color) !important;
    color: white !important;
}

/* ===== TRUE/FALSE ===== */
.tf-options {
    display: flex;
    gap: 20px;
}

.tf-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px 20px;
    background: var(--primary-bg);
    border: 3px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tf-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.tf-option[data-value="true"]:hover {
    border-color: #48bb78;
}

.tf-option[data-value="false"]:hover {
    border-color: #f56565;
}

.tf-circle {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 32px;
    transition: all 0.3s ease;
}

.tf-circle.true {
    background: rgba(72, 187, 120, 0.12);
    color: #48bb78;
}

.tf-circle.false {
    background: rgba(245, 101, 101, 0.12);
    color: #f56565;
}

.tf-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

/* TRUE Selected */
.tf-option[data-value="true"].selected {
    border-color: #48bb78 !important;
    background: linear-gradient(180deg, rgba(72, 187, 120, 0.15), rgba(72, 187, 120, 0.05)) !important;
    box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.25), 0 10px 30px rgba(72, 187, 120, 0.2) !important;
    transform: translateY(-3px);
}

.tf-option[data-value="true"].selected .tf-circle {
    background: #48bb78 !important;
    color: white !important;
    transform: scale(1.15) !important;
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.5) !important;
}

.tf-option[data-value="true"].selected .tf-text {
    color: #48bb78 !important;
}

/* FALSE Selected */
.tf-option[data-value="false"].selected {
    border-color: #f56565 !important;
    background: linear-gradient(180deg, rgba(245, 101, 101, 0.15), rgba(245, 101, 101, 0.05)) !important;
    box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.25), 0 10px 30px rgba(245, 101, 101, 0.2) !important;
    transform: translateY(-3px);
}

.tf-option[data-value="false"].selected .tf-circle {
    background: #f56565 !important;
    color: white !important;
    transform: scale(1.15) !important;
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.5) !important;
}

.tf-option[data-value="false"].selected .tf-text {
    color: #f56565 !important;
}

/* ===== FILL BLANK ===== */
.fb-container {
    padding: 10px 0;
}

.fb-input-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: var(--primary-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.fb-input-wrap:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.fb-input-wrap i {
    color: var(--accent-color);
    font-size: 20px;
}

.fb-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.fb-input::placeholder {
    color: var(--text-muted);
}

/* ===== MATCHING - Instant Feedback ===== */
.match-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--primary-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.match-row.correct {
    border-color: #48bb78;
    background: linear-gradient(90deg, rgba(72, 187, 120, 0.08), transparent);
}

.match-row.wrong {
    border-color: #f56565;
    background: linear-gradient(90deg, rgba(245, 101, 101, 0.08), transparent);
}

.match-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.match-key {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.match-value {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-center {
    color: var(--text-muted);
    flex-shrink: 0;
    padding: 0 5px;
}

.match-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.match-select {
    width: 100px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--secondary-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.match-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.match-row.correct .match-select {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
}

.match-row.wrong .match-select {
    border-color: #f56565;
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
}

.match-status {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    animation: popIn 0.3s ease;
}

.match-status.correct {
    background: #48bb78;
    color: white;
}

.match-status.wrong {
    background: #f56565;
    color: white;
}

/* Mobile */
@media (max-width: 600px) {
    .tf-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .tf-option {
        padding: 20px 15px;
        flex-direction: row;
        gap: 15px;
    }
    
    .tf-circle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .match-row {
        flex-wrap: wrap;
    }
    
    .match-left {
        width: 100%;
    }
    
    .match-center {
        display: none;
    }
    
    .match-right {
        width: 100%;
        margin-top: 10px;
    }
    
    .match-select {
        flex: 1;
    }
    
    .quiz-info-cards {
        flex-direction: column;
    }
    
    .info-card {
        justify-content: flex-start;
    }
}
.nav-group{margin:5px 0}.nav-group-header{display:flex;align-items:center;padding:12px 20px;cursor:pointer;color:#64748b;border-radius:8px;margin:2px 10px}.nav-group-header:hover{background:rgba(0,0,0,.05)}.nav-group-header i:first-child{margin-right:12px;width:20px;text-align:center}.nav-group-header span{flex:1}.nav-group-arrow{transition:transform .3s;font-size:12px}.nav-group.open .nav-group-arrow{transform:rotate(180deg)}.nav-group-items{max-height:0;overflow:hidden;transition:max-height .3s}.nav-group.open .nav-group-items{max-height:200px}.nav-group-items .sub-item{padding:10px 20px 10px 52px;font-size:13px}

/* ==================== ACTION BUTTONS ==================== */
.td-actions { white-space: nowrap; }
.action-buttons { display: flex; gap: 5px; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.btn-info { background: var(--info-color); color: white; }
.btn-info:hover { background: #3182ce; }
.btn-warning { background: var(--warning-color); color: white; }
.btn-warning:hover { background: #dd6b20; }
.th-actions { width: 100px; text-align: center; }

/* ==================== STATS GRID ==================== */
.stats-grid { display: grid; gap: 20px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: center; gap: 15px; padding: 20px; background: var(--card-bg); border-radius: var(--border-radius); box-shadow: var(--card-shadow); }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-info h3 { font-size: 24px; margin: 0; }
.stat-info p { margin: 0; color: var(--text-secondary); font-size: 13px; }

/* ==================== FORM STYLES ==================== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: var(--secondary-bg);
    font-size: 14px;
    transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.btn-block { width: 100%; }

/* ==================== ANALYTICS TABS ==================== */
.analytics-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    background: var(--card-bg);
    padding: 5px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-sm);
}

.analytics-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.analytics-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-color);
}

.analytics-tab.active {
    background: var(--accent-color);
    color: white;
}

.analytics-tab i {
    font-size: 14px;
}

/* ==================== UNIT ANALYTICS ==================== */
.unit-detail-header {
    margin-bottom: 20px;
}

.unit-info-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
}

.unit-number {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.unit-info-card h2 {
    font-size: 24px;
    margin: 0 0 10px 0;
}

.unit-info-card p {
    margin: 0;
    opacity: 0.9;
}

.unit-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.unit-badge {
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

/* ==================== QUESTION STATS ==================== */
.question-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
}

.question-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.q-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.q-number {
    background: #f0f4f8;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.q-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.q-page {
    font-size: 11px;
    color: var(--text-secondary);
}

.q-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.q-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.q-stats {
    min-width: 100px;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.completed {
    background: #48bb7820;
    color: #48bb78;
}

.status-badge.in-progress {
    background: #ed893620;
    color: #ed8936;
}

/* ==================== STUDENT INFO ==================== */
.student-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* ==================== PROGRESS CELL ==================== */
.progress-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-bar-mini {
    width: 100px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-cell span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== TEXT COLORS ==================== */
.text-success { color: #48bb78; }
.text-danger { color: #f56565; }
.text-warning { color: #ed8936; }
.text-info { color: #4299e1; }

/* ==================== BADGE STYLES ==================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success { background: #48bb7820; color: #48bb78; }
.badge.warning { background: #ed893620; color: #ed8936; }
.badge.danger { background: #f5656520; color: #f56565; }
.badge.info { background: #4299e120; color: #4299e1; }

.badge-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
}

.badge-count i { color: #ecc94b; }

/* ==================== ACTIVITY TIME ==================== */
.activity-time {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==================== SEARCH BOX ==================== */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
}

.search-box input {
    padding: 10px 12px 10px 38px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 250px;
    font-size: 14px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .analytics-tabs {
        flex-wrap: wrap;
    }
    
    .analytics-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
}

/* ==================== CHATBOT EKSTRA STILLER ==================== */
.chat-context {
    background: linear-gradient(135deg, #667eea20, #764ba220);
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-context i {
    color: #667eea;
}

.chat-page-preview {
    background: #f7fafc;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #718096;
    line-height: 1.5;
    margin-bottom: 12px;
    border-left: 3px solid #667eea;
    max-height: 80px;
    overflow: hidden;
}

.chat-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chat-quick-questions .quick-label {
    width: 100%;
    font-size: 12px;
    color: #a0aec0;
    margin-bottom: 4px;
}

.quick-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.quick-btn i {
    font-size: 11px;
}

.chat-message.welcome .message-content {
    background: transparent !important;
    padding: 0 !important;
}

.welcome-header {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-header i {
    color: #667eea;
    font-size: 20px;
}

/* Typing animation */
.chat-message.typing .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #a0aec0;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.chat-message.typing .dot:nth-child(1) { animation-delay: -0.32s; }
.chat-message.typing .dot:nth-child(2) { animation-delay: -0.16s; }
.chat-message.typing .dot:nth-child(3) { animation-delay: 0; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-message.error .message-content {
    background: #fff5f5 !important;
    color: #c53030 !important;
}

.chat-message.error .message-content i {
    margin-right: 6px;
}

/* ==================== v4.2 EKLEMELERI ==================== */

/* #9: Soru Zamanlayici Bar */
.question-timer-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.question-timer-bar .timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    border-radius: 4px;
    width: 100%;
    transition: width 1s linear, background 0.5s ease;
}

.question-timer-bar .timer-text {
    position: absolute;
    right: 0;
    top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    transition: color 0.5s ease;
}

/* #16: Icerik Kopyalama Engeli */
#pdfViewer {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

#pdfViewer canvas {
    pointer-events: auto;
    -webkit-user-drag: none;
}

.popup-body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Sadece input ve textarea'da secime izin ver */
.popup-body input,
.popup-body textarea,
.popup-body select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* #11: Popup baslik bold ek vurgu */
.popup-header .popup-title {
    letter-spacing: 0.3px;
}

/* #21: Unite durum badge'leri */
.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.status-badge.in-progress {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.status-badge.locked-badge {
    background: #f1f5f9;
    color: #94a3b8;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* ==================== v4.0 MOBILE RESPONSIVE ==================== */

/* --- Mobile Top Bar --- */
.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--secondary-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 1000;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.mobile-top-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
}

.mobile-top-logo i {
    font-size: 22px;
}

/* --- Hamburger Menu Button --- */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--card-shadow-sm);
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-menu-btn:hover {
    background: var(--accent-color);
    color: white;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* --- Sidebar Mobile Overlay --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    display: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* --- Body scroll lock when mobile sidebar is open --- */
body.sidebar-open {
    overflow: hidden;
}

/* --- Completed Page Icon in Sidebar --- */
.page-completed-icon {
    color: var(--success-color);
    font-size: 12px;
    margin-left: 4px;
}

/* --- Progress Warning Info Box --- */
.progress-info-box {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1), rgba(99, 179, 237, 0.08));
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-left: 4px solid var(--info-color);
    border-radius: var(--border-radius-sm);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.progress-info-box i {
    color: var(--info-color);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.progress-info-box p {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* --- Unit Detail Cards (Progress Page) --- */
.unit-detail-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-sm);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.unit-detail-card:hover {
    box-shadow: var(--card-shadow);
    transform: translateY(-2px);
}

.unit-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.unit-detail-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.unit-detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.unit-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
}

.unit-stat-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.unit-stat-item .stat-label {
    color: var(--text-secondary);
    font-size: 11px;
    display: block;
}

.unit-stat-item .stat-value {
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

/* --- Question Type Breakdown Mini Chart --- */
.question-type-breakdown {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.q-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-color);
}

.q-type-badge.multiple-choice { background: rgba(72, 187, 120, 0.1); color: #2f855a; }
.q-type-badge.fill-blank { background: rgba(237, 137, 54, 0.1); color: #c05621; }
.q-type-badge.true-false { background: rgba(66, 153, 225, 0.1); color: #2b6cb0; }
.q-type-badge.matching { background: rgba(159, 122, 234, 0.1); color: #6b46c1; }

/* --- Analytics New Sections --- */
.analytics-section-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.analytics-section-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.analytics-section-card h3 i {
    color: var(--accent-color);
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.analytics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.analytics-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
}

.analytics-list-item .label {
    color: var(--text-secondary);
    font-size: 14px;
}

.analytics-list-item .value {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

/* --- Quiz Info Note --- */
.quiz-info-note {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.08), rgba(56, 161, 105, 0.06));
    border: 1px solid rgba(72, 187, 120, 0.25);
    border-left: 4px solid var(--success-color);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

.quiz-info-note i {
    color: var(--success-color);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ==================== TABLET (max-width: 1024px) ==================== */
@media (max-width: 1024px) {
    .mobile-top-bar {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 25px rgba(0,0,0,0.15);
    }
    
    .sidebar-overlay {
        display: block;
        /* Stays invisible/non-interactive via default visibility:hidden + pointer-events:none */
        /* Only becomes interactive when .active class is added */
    }
    
    .main-content {
        margin-left: 0 !important;
        padding-top: 72px !important;
    }
    
    .pdf-viewer-wrapper {
        left: 0 !important;
        width: 100% !important;
    }
    
    .chatbot-sidebar {
        width: 100%;
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        z-index: 999;
    }
    
    .analytics-grid,
    .analytics-charts-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==================== MOBILE (max-width: 768px) ==================== */
@media (max-width: 768px) {
    :root {
        --header-height: 55px;
        --border-radius: 12px;
        --border-radius-sm: 8px;
    }
    
    /* Mobile top bar compact */
    .mobile-top-bar {
        height: 50px;
    }
    
    .main-content {
        padding: 62px 15px 20px 15px !important;
    }
    
    /* Header mobile */
    .header {
        padding: 0 12px;
        height: var(--header-height);
    }
    
    .header-left h2 {
        font-size: 16px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .header-right button,
    .header-right .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Stats grid mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-card .stat-value {
        font-size: 22px;
    }
    
    .stat-card .stat-label {
        font-size: 11px;
    }
    
    /* Units grid mobile */
    .units-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Content area mobile */
    .content-area {
        padding: 12px;
    }
    
    /* Popup mobile - CRITICAL */
    .popup-box,
    .popup-container {
        width: 95vw !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
        border-radius: var(--border-radius) !important;
    }
    
    .popup-header {
        padding: 14px 16px;
    }
    
    .popup-header h3,
    .popup-title {
        font-size: 15px;
    }
    
    .popup-body {
        padding: 16px;
        padding-bottom: 20px;
        max-height: 65vh;
    }
    
    .popup-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .popup-footer button {
        flex: 1;
        min-width: 100px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* PDF Toolbar mobile */
    .pdf-toolbar {
        flex-wrap: wrap;
        height: auto !important;
        padding: 8px 10px !important;
        gap: 6px;
    }
    
    .toolbar-left,
    .toolbar-center,
    .toolbar-right {
        width: 100%;
        justify-content: center;
        gap: 6px;
    }
    
    .toolbar-left .unit-title {
        display: none;
    }
    
    .toolbar-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    
    .page-info {
        font-size: 12px;
    }
    
    /* PDF viewer mobile */
    .pdf-container {
        padding: 10px !important;
    }
    
    .pdf-main-area {
        height: calc(100vh - 130px);
    }
    
    /* Info sidebar mobile */
    .info-sidebar {
        width: 100% !important;
        position: fixed;
        bottom: 0;
        left: 0;
        height: auto;
        max-height: 60vh;
        z-index: 998;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
    }
    
    /* Analytics mobile */
    .analytics-grid,
    .analytics-charts-grid {
        grid-template-columns: 1fr !important;
    }
    
    .analytics-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .chart-container {
        max-width: 100%;
    }
    
    /* Admin grid mobile */
    .admin-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Progress page mobile */
    .progress-overview {
        flex-direction: column;
    }
    
    .unit-detail-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Messaging mobile */
    .messages-container {
        flex-direction: column;
    }
    
    .messages-sidebar,
    .messages-content {
        width: 100% !important;
    }
    
    /* Quick actions mobile */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Self evaluation mobile */
    .self-eval-container {
        padding: 16px;
    }
    
    /* Notifications mobile */
    .notification-panel {
        width: 90vw !important;
        right: 5vw !important;
    }
}

/* ==================== SMALL MOBILE (max-width: 480px) ==================== */
@media (max-width: 480px) {
    /* Compact mobile top bar */
    .mobile-top-bar {
        height: 48px;
        padding: 0 12px;
    }
    
    .mobile-top-logo {
        font-size: 16px;
    }
    
    .main-content {
        padding: 58px 10px 16px 10px !important;
    }
    
    /* Stats 1 column on very small screens */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Even smaller popup */
    .popup-box,
    .popup-container {
        width: 98vw !important;
        max-width: 98vw !important;
        max-height: 92vh !important;
        border-radius: var(--border-radius-sm) !important;
    }
    
    .popup-body {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Smaller header */
    .header {
        padding: 0 8px;
    }
    
    .header-left h2 {
        font-size: 14px;
    }
    
    /* Toolbar compact */
    .toolbar-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    /* Unit detail stats single column */
    .unit-detail-stats {
        grid-template-columns: 1fr;
    }
    
    /* Quick actions single column */
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    /* Footer buttons stack */
    .popup-footer {
        flex-direction: column;
    }
    
    .popup-footer button {
        width: 100%;
    }
    
    /* Question options tighter */
    .question-option {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Badge grid */
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Login card compact */
    .login-card {
        padding: 24px 20px;
    }
}

/* ==================== TOUCH DEVICE OPTIMIZATIONS ==================== */
@media (hover: none) and (pointer: coarse) {
    /* Tüm tıklanabilir elemanlar için touch optimizasyonu */
    button, .btn, .nav-item, .unit-card, .action-btn, .option-label,
    .toolbar-btn, .sidebar-page-item, .icon-btn, .btn-toolbar,
    .mc-option, .tf-option, .tf-option-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Larger touch targets */
    .toolbar-btn,
    .btn-toolbar,
    .sidebar-page-item,
    .icon-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .question-option,
    .option-label {
        min-height: 48px;
        padding: 12px 16px;
    }
    
    /* Disable hover effects on touch */
    .unit-card:hover,
    .action-btn:hover,
    .unit-detail-card:hover {
        transform: none;
    }
    
    /* Smooth scroll */
    .popup-body,
    .sidebar-pages,
    .pdf-container,
    .main-content {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Overlay tıklanmaz olduğunda kesinlikle event almasın */
    .sidebar-overlay:not(.active) {
        pointer-events: none !important;
        visibility: hidden !important;
    }
}

/* ==================== LANDSCAPE MOBILE ==================== */
@media (max-height: 500px) and (orientation: landscape) {
    .popup-box,
    .popup-container {
        max-height: 95vh !important;
    }
    
    .popup-body {
        max-height: 50vh;
    }
    
    .pdf-main-area {
        height: calc(100vh - 80px);
    }
}

/* ==================== ADDITIONAL MOBILE FIXES ==================== */
@media (max-width: 768px) {
    /* Better table handling on mobile */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    table th, table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* Form inputs larger touch targets */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        min-height: 44px;
    }
    
    /* Button minimum touch targets */
    .btn, button {
        min-height: 40px;
        padding: 8px 16px;
    }
    
    /* Welcome section compact */
    .welcome-section h2 {
        font-size: 18px;
    }
    
    /* Continue section compact */
    .continue-card {
        padding: 14px;
    }
    
    /* Terms page compact */
    .terms-card {
        padding: 16px;
        margin: 10px;
    }
    
    .terms-content {
        max-height: 50vh;
        font-size: 13px;
    }
    
    /* Notification badges */
    .notification-badge {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    /* User avatar in header */
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Fix scrolling issues */
    body.popup-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Question text readable */
    .question-text {
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* Question options full width */
    .question-option {
        width: 100%;
    }
    
    /* Progress bar in popup */
    .progress-bar-container {
        height: 6px;
    }
    
    /* Quiz timer */
    .quiz-timer {
        font-size: 14px;
    }
    
    /* Improved scrolling for popup body */
    .popup-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    /* Compact header */
    .header-left h2 span {
        display: none;
    }
    
    /* Even more compact stats */
    .stat-card {
        padding: 10px;
    }
    
    .stat-card .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .stat-card .stat-value {
        font-size: 18px;
    }
    
    /* Sidebar compact on very small screens */
    .sidebar {
        width: 260px;
    }
    
    /* Quiz question compact */
    .question-option {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* ==================== ANALYTICS DETAIL SECTIONS ==================== */
.analytics-section {
    border: 1px solid var(--border-color);
}

.section-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.section-header-flex h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.section-badge.purple { background: #9f7aea15; color: #9f7aea; }
.section-badge.teal { background: #38b2ac15; color: #38b2ac; }
.section-badge.orange { background: #ed893615; color: #ed8936; }

.analytics-mini-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
}

.mini-stat {
    flex: 1;
    min-width: 90px;
    text-align: center;
}

.mini-stat-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.mini-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}

.empty-state-mini {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-state-mini i {
    margin-right: 6px;
    color: var(--info-color);
}

/* Compact table wrapper */
.compact-table-wrapper {
    max-height: 280px;
    overflow-y: auto;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.data-table.compact th,
.data-table.compact td {
    padding: 8px 10px;
    font-size: 13px;
}

/* Item bars for self-evaluation */
.item-bars-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.item-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-bar-label {
    width: 32px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    flex-shrink: 0;
}

.item-bar-track {
    flex: 1;
    height: 14px;
    background: var(--bg-color);
    border-radius: 7px;
    overflow: hidden;
}

.item-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.5s ease;
}

.item-bar-value {
    width: 42px;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
    color: var(--text-primary);
}

/* Survey rating bars */
.survey-rating-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-label {
    width: 120px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
    line-height: 1.3;
}

.rating-bar-track {
    flex: 1;
    height: 10px;
    background: var(--bg-color);
    border-radius: 5px;
    overflow: hidden;
    min-width: 40px;
}

.rating-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.rating-value {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    font-size: 12px;
}

/* Feedback comments */
.feedback-comments {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
}

.feedback-comment {
    padding: 10px 14px;
    background: var(--bg-color);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    border-left: 3px solid #ed8936;
}

.feedback-comment i {
    color: #ed893660;
    font-size: 11px;
    margin-right: 6px;
}

/* Mini analytics cell in unit list */
.mini-analytics-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.mini-analytics-cell small {
    color: var(--text-muted);
    font-size: 11px;
}

.badge.info {
    background: #ed893620;
    color: #c05621;
}

/* Analytics detail grid */
.analytics-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .analytics-mini-stats {
        gap: 8px;
    }
    
    .mini-stat {
        min-width: 70px;
    }
    
    .mini-stat-value {
        font-size: 18px;
    }
    
    .analytics-section .section-card {
        padding: 12px;
    }
    
    .rating-label {
        width: 80px;
        font-size: 11px;
    }
    
    .item-bar-label {
        width: 26px;
        font-size: 11px;
    }
    
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .analytics-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .analytics-section > div[style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    
    .analytics-section > div[style*="grid-template-columns: 1fr 1fr"] > div {
        margin-bottom: 16px;
    }
}

/* ==================== DETAIL TABLE & CHATBOT ANALYTICS ==================== */
.analytics-sub-title {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-table-wrapper {
    max-height: 350px;
    overflow-y: auto;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.detail-table-wrapper .data-table { margin: 0; }
.detail-table-wrapper thead { position: sticky; top: 0; z-index: 1; }

small.text-muted,
.text-muted { color: var(--text-muted, #a0aec0); }

/* Feedback comments with author */
.feedback-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.feedback-comment-header strong { font-size: 13px; color: var(--text-primary); }
.feedback-comment-header small { color: var(--text-muted); font-size: 11px; }

.feedback-comment p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Student mini avatar */
.student-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* Chatbot conversation blocks */
.chatbot-conversations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.chatbot-user-block {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.chatbot-user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-color);
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.chatbot-user-header:hover {
    background: rgba(102, 126, 234, 0.05);
}

.chatbot-expand-icon {
    transition: transform 0.3s;
    color: var(--text-muted);
    font-size: 12px;
}

.chatbot-user-block.expanded .chatbot-expand-icon {
    transform: rotate(180deg);
}

.chatbot-msg-list {
    display: none;
    padding: 12px 16px;
    max-height: 500px;
    overflow-y: auto;
}

.chatbot-user-block.expanded .chatbot-msg-list {
    display: block;
}

.chatbot-msg-pair {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.chatbot-msg-pair:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.chatbot-msg {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
}

.chatbot-msg.user-msg {
    background: #667eea10;
    border-left: 3px solid #667eea;
}

.chatbot-msg.bot-msg {
    background: #f7fafc;
    border-left: 3px solid #a0aec0;
}

.chatbot-msg .msg-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.chatbot-msg .msg-meta i { margin-right: 4px; }

.chatbot-msg p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 768px) {
    .chatbot-user-header { padding: 10px 12px; }
    .chatbot-msg-list { padding: 8px 10px; max-height: 400px; }
    .chatbot-msg p { font-size: 12px; }
    .detail-table-wrapper { max-height: 260px; }
    .student-avatar-sm { width: 28px; height: 28px; font-size: 12px; }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .sidebar,
    .header,
    .pdf-toolbar,
    .chatbot-sidebar,
    .mobile-menu-btn,
    .sidebar-overlay,
    .popup-overlay {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-area {
        padding: 0;
    }
}
