/* ==========================================================================
   GLOBAL CSS - FCM MEMBERSHIP SYSTEM
   ========================================================================== */

/* 1. Temel Sayfa İskeleti */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    height: 100vh;
    background-color: #f4f6f9;
}

.main-content {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    max-height: 100vh;
}

.content-area {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

/* 2. Sidebar (Yan Menü) Stilleri */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #343a40;
    color: white;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar h2 {
    text-align: center;
    padding: 15px 0;
    margin: 0;
    border-bottom: 1px solid #4f5962;
    letter-spacing: 2px;
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.menu li {
    border-bottom: 1px solid #4f5962;
}

.menu li a {
    display: block;
    padding: 15px 20px;
    color: #c2c7d0;
    text-decoration: none;
}

.menu li a:hover {
    background: #4f5962;
    color: white;
}

/* 3. Header (Üst Bar) Stilleri */
.header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.header .title {
    font-size: 20px;
    font-weight: bold;
    color: #343a40;
    display: flex;
    align-items: center;
    gap: 15px;
}

.role-badge {
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Hamburger Menü Butonu (Sadece mobilde görünür) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #343a40;
    padding: 0;
}

/* 4. Profile Widget (Sağ Alt) Stilleri */
.profile-widget {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    z-index: 999;
}

.profile-widget:hover {
    background: #f8f9fa;
}

/* 5. Bildirim (Alert) Stilleri */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* 6. Form ve Ortak Eleman Stilleri */
.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #343a40;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.btn-submit, .btn-primary {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.btn-submit:hover, .btn-primary:hover {
    background-color: #0056b3;
}

/* 7. Tablo (Table) Stilleri */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}

th {
    background-color: #343a40;
    color: white;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* 8. Mobil Uyumluluk (Responsive / Media Queries) */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 990;
}

@media (max-width: 768px) {
    /* Sidebar'ı gizle ve mobilde çekmece menü yap */
    .sidebar {
        position: fixed;
        height: 100%;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .overlay.active {
        display: block;
    }

    .hamburger-btn {
        display: inline-block;
    }

    /* Content alanının padding'ini düşür */
    .content-area {
        padding: 15px;
    }

    .header {
        padding: 15px;
    }

    /* Form satırlarını alt alta al */
    .form-row {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .profile-widget {
        bottom: 15px;
        right: 15px;
        padding: 8px 15px;
    }
    
    /* Modal'lar %90 genişliğe */
    #actionModal > div, .modal-content {
        width: 90% !important;
    }
    /* Info gruplarını mobilde alt alta al */
    .info-group, .info-row {
        flex-direction: column !important;
        gap: 5px;
    }
    .info-label {
        width: 100% !important;
        margin-bottom: 5px;
    }
}

/* Leave space for the fixed profile/logout control below page actions. */
.main-content > .content-area { padding-bottom: 110px; }
