/* =============================================
   Kırşehir Bil Koleji Yaz Okulu Karne Sistemi
   Ana Stil Dosyası — Mobile-First Responsive
   ============================================= */

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

/* =============================================
   CSS Değişkenleri (Renk Paleti)
   ============================================= */
:root {
    /* Ana Renkler */
    --primary: #1B3A6B;
    --primary-light: #2A5298;
    --primary-dark: #0F2344;
    --secondary: #E91E7A;
    --secondary-light: #FF4D9A;
    --secondary-dark: #C0105F;

    /* Vurgu Renkleri */
    --accent-yellow: #FFD42A;
    --accent-yellow-light: #FFE066;
    --accent-turquoise: #00BCD4;
    --accent-turquoise-light: #4DD0E1;
    --accent-green: #4CAF50;
    --accent-green-light: #66BB6A;

    /* Durum Renkleri */
    --success: #22C55E;
    --success-light: #DCFCE7;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Arka Plan & Yüzey */
    --bg-body: #F0F7FF;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1B3A6B;

    /* Metin */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-white: #FFFFFF;

    /* Kenarlık */
    --border: #E2E8F0;
    --border-light: #F1F5F9;

    /* Gölge */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.08);

    /* Köşe Yuvarlaklığı */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Geçiş */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;

    /* Font */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =============================================
   Reset & Temel
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   Tipografi
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

/* =============================================
   Butonlar
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 0.938rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    min-width: 44px;
    text-decoration: none;
    line-height: 1.4;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(27, 58, 107, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 6px 16px rgba(27, 58, 107, 0.4);
    color: var(--text-white);
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(233, 30, 122, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 6px 16px rgba(233, 30, 122, 0.4);
    color: var(--text-white);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--accent-green));
    color: var(--text-white);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error), #DC2626);
    color: var(--text-white);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(27, 58, 107, 0.05);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.813rem;
    min-height: 36px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.063rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius);
}

/* =============================================
   Kartlar
   ============================================= */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.card-header h2, .card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 0;
}

/* =============================================
   Form Elemanları
   ============================================= */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 0.938rem;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    min-height: 44px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    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='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

/* =============================================
   Tablolar
   ============================================= */
.table-responsive {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    box-sizing: border-box;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    background: var(--primary);
    color: var(--text-white);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.table th:first-child {
    border-radius: var(--radius) 0 0 0;
}

.table th:last-child {
    border-radius: 0 var(--radius) 0 0;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background: rgba(27, 58, 107, 0.03);
}

.table tbody tr:nth-child(even) {
    background: rgba(240, 247, 255, 0.5);
}

.table tbody tr:nth-child(even):hover {
    background: rgba(27, 58, 107, 0.05);
}

/* =============================================
   Flash Mesajları
   ============================================= */
.flash-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    position: relative;
}

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

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

.flash-warning {
    background: var(--warning-light);
    color: #92400E;
    border-left: 4px solid var(--warning);
}

.flash-info {
    background: var(--info-light);
    color: #1E40AF;
    border-left: 4px solid var(--info);
}

.flash-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 4px;
}

.flash-close:hover {
    opacity: 1;
}

/* =============================================
   Badge / Etiket
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-success {
    background: var(--success-light);
    color: #166534;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400E;
}

.badge-error {
    background: var(--error-light);
    color: #991B1B;
}

.badge-info {
    background: var(--info-light);
    color: #1E40AF;
}

.badge-primary {
    background: rgba(27, 58, 107, 0.1);
    color: var(--primary);
}

/* =============================================
   Modal
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

/* =============================================
   İlerleme Çubuğu
   ============================================= */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--accent-turquoise), var(--success));
    transition: width 0.5s ease;
}

/* =============================================
   Avatar / Fotoğraf
   ============================================= */
.avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border);
    background: var(--bg-body);
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-xl {
    width: 80px;
    height: 80px;
}

/* =============================================
   Boş Durum
   ============================================= */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* =============================================
   Araç İpuçları ve Yardımcılar
   ============================================= */
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.w-100 { width: 100%; }

/* =============================================
   Animasyonlar
   ============================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.animate-fade { animation: fadeIn 0.3s ease; }
.animate-slide { animation: slideDown 0.3s ease; }

/* =============================================
   Loading Spinner
   ============================================= */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }

    .card {
        padding: 16px;
        border-radius: var(--radius);
    }

    .table th, .table td {
        padding: 10px 12px;
        font-size: 0.813rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    .modal {
        margin: 8px;
        max-height: 95vh;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
