/* ============================================
   İYİLİK UYGULAMASI - ANA STİL DOSYASI
   Tema: Mavi (#0156C0) & Turuncu (#F68B2F)
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

/* CSS Değişkenleri */
:root {
    --primary: #0156C0;
    --primary-dark: #00408F;
    --accent: #F68B2F;
    --accent-dark: #E67A1F;
    --bg: #FCFCFA;
    --white: #FFFFFF;
    --light-blue: #E8F0FE;
    --light-orange: #FFF3E6;
    --success: #2E7D32;
    --error: #C62828;
    --error-light: #FFEBEE;
    --gray: #9E9E9E;
    --gray-light: #F5F5F5;
    --text: #00408F;
    --text-light: #666666;
    --border: #E0E0E0;
    --shadow: 0 2px 12px rgba(1, 86, 192, 0.08);
    --shadow-lg: 0 8px 32px rgba(1, 86, 192, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== HEADER ========== */
.header {
    background: var(--primary);
    color: var(--white);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(1, 86, 192, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    opacity: 0.9;
}

/* Navigasyon */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ========== ANA İÇERİK ========== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 64px - 60px);
}

/* ========== FLASH MESAJLAR ========== */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.flash-success {
    background: #E8F5E9;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.flash-error {
    background: var(--error-light);
    color: var(--error);
    border-left: 4px solid var(--error);
}

.flash-warning {
    background: #FFF8E1;
    color: #F57F17;
    border-left: 4px solid #F57F17;
}

.flash-info {
    background: var(--light-blue);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

/* ========== KARTLAR ========== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* ========== BUTONLAR ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(1, 86, 192, 0.3);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
}

.btn-accent:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 12px rgba(246, 139, 47, 0.3);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover {
    background: #B71C1C;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ========== FORM ELEMANLARI ========== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(1, 86, 192, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ========== TABLO ========== */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th {
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.table tr:hover {
    background: var(--light-blue);
}

.table tr:last-child td {
    border-bottom: none;
}

/* ========== GRID SİSTEMİ ========== */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ========== İSTATİSTİK KARTLARI ========== */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--light-blue);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 1s ease;
}

/* ========== ROZETLER ========== */
.badge-icon {
    font-size: 2rem;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.badge-earned {
    background: var(--light-orange);
    border: 3px solid var(--accent);
}

.badge-locked {
    background: var(--gray-light);
    border: 3px solid var(--gray);
    opacity: 0.5;
    filter: grayscale(100%);
}

/* ========== MODAL ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 1rem 2rem;
    font-size: 0.85rem;
}

/* ========== LOGIN SAYFASI ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0156C0 0%, #00408F 50%, #002855 100%);
    padding: 1rem;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 440px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.login-logo h1 {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary);
}

.login-logo p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
    font-family: inherit;
}

.btn-login:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(246, 139, 47, 0.4);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
        flex-wrap: wrap;
        height: auto;
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal {
        width: 95%;
        padding: 1.5rem;
    }
}

/* ========== YARDIMCI SINIFLAR ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-gray { color: var(--text-light); }