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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Kutu Stilleri */
.login-box,
.scanner-box,
.attendance-box,
.admin-panel,
.attendance-list,
.create-session-box {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Başlıklar */
h1 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

/* Header Bölümü */
.header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    margin: 0;
    text-align: left;
    flex: 1;
}

.header p {
    color: #666;
    margin: 5px 0;
}

.logout-btn {
    background: #dc3545;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c82333;
}

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

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Butonlar */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    display: inline-block;
    background: #667eea;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #5568d3;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Mesaj Kutuları */
.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.info-box {
    background: #e7f3ff;
    color: #004085;
    border: 1px solid #bee5eb;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

/* Ders Bilgileri */
.course-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.course-info p {
    margin: 8px 0;
    color: #333;
}

/* Manual Entry */
.manual-entry {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.manual-entry p {
    color: #666;
    margin-bottom: 10px;
}

/* Tablo Stilleri */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table thead {
    background: #667eea;
    color: white;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table code {
    background: #f4f4f4;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: monospace;
}

/* İstatistik Kutuları */
.stats-box {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 150px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-item.success {
    border-left-color: #28a745;
}

.stat-item.failed {
    border-left-color: #dc3545;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 14px;
}

/* Durum Badge'leri */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-failed {
    background: #dc3545;
    color: white;
}

/* Tablo Satır Durumları */
.status-success {
    background: #f8fff8;
}

.status-failed {
    background: #fff8f8;
}

/* QR Kod Display */
#qrcode-display {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

#qrcode {
    margin: 0 auto;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .login-box,
    .scanner-box,
    .attendance-box,
    .admin-panel,
    .attendance-list {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .logout-btn {
        margin-top: 10px;
    }

    .stats-box {
        flex-direction: column;
    }

    .data-table {
        font-size: 14px;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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