/* Kurban ve Bağış Yönetim Sistemi - Özel Tasarım Stilleri */

/* Renk Değişkenleri ve Temel Ayarlar */
:root {
    --primary-color: #0d5c3a;       /* Zümrüt Yeşili */
    --primary-hover: #0a472c;
    --secondary-color: #d4af37;     /* Altın Sarısı */
    --secondary-hover: #bda030;
    --accent-color: #e9ecef;
    --bg-color: #f4f6f9;            /* Açık gri arka plan */
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-muted: #6c757d;
    --sidebar-bg: #093f28;          /* Daha koyu yeşil sidebar */
    --sidebar-text: #e0f2f1;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Genel Sınıflar ve Sıfırlama */
body {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Düzen Yapısı (Layout) */
.app-container {
    display: flex;
    flex: 1;
    position: relative;
}

.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: 260px; /* Sidebar genişliği kadar boşluk */
    transition: margin-left var(--transition-speed) ease;
    padding-bottom: 5rem; /* Mobil alt bar için alt boşluk */
}

/* Masaüstü Sidebar (Yan Menü) */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-speed) ease;
}

.sidebar-brand {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar-brand img {
    max-height: 50px;
    margin-bottom: 0.5rem;
}

.sidebar-brand h5 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 0.5px;
}

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

.sidebar-menu li {
    margin: 0.2rem 0.8rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.sidebar-menu a i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 10px;
    text-align: center;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-menu li.active a {
    background-color: var(--secondary-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.15);
    font-size: 0.85rem;
    text-align: center;
}

/* Üst Bar (Topbar - Mobil için önemli) */
.topbar {
    background-color: #ffffff;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sidebar-toggler {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    display: none; /* Masaüstünde gizli */
}

/* Mobil Alt Menü (Bottom Navigation) */
.mobile-bottom-nav {
    display: none; /* Masaüstünde gizli */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background-color: #ffffff;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.08);
    z-index: 1040;
    justify-content: space-around;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    width: 20%;
    height: 100%;
    transition: color 0.2s ease;
}

.mobile-bottom-item i {
    font-size: 1.4rem;
    margin-bottom: 3px;
}

.mobile-bottom-item:hover, .mobile-bottom-item.active {
    color: var(--primary-color);
}

.mobile-bottom-item.active i {
    transform: translateY(-2px);
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

/* Büyük Ortak Buton (PWA tarzı kurban/bağış ekleme butonu gibi durabilir) */
.mobile-bottom-item.highlight-btn {
    position: relative;
    top: -12px;
    background-color: var(--secondary-color);
    color: #ffffff !important;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    border: 3px solid #ffffff;
}

.mobile-bottom-item.highlight-btn i {
    font-size: 1.5rem;
    margin: 0;
}

/* Kart Tasarımları (Glassmorphism & Soft Shadow) */
.card {
    background-color: var(--card-bg);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

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

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.2rem 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* İstatistik Kartları (Dashboard) */
.stat-card {
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--primary-color);
}

.stat-card.secondary {
    border-left-color: var(--secondary-color);
}

.stat-card.danger {
    border-left-color: #dc3545;
}

.stat-card.info {
    border-left-color: #0dcaf0;
}

.stat-card.success {
    border-left-color: #198754;
}

.stat-icon {
    position: absolute;
    right: 15px;
    bottom: 10px;
    font-size: 3.5rem;
    opacity: 0.15;
    transform: rotate(-10deg);
}

/* Buton Tasarımları */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(13, 92, 58, 0.25);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.25);
}

/* Form Tasarımları */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.65rem 1rem;
    border: 1px solid #ced4da;
    background-color: #fdfdfd;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 92, 58, 0.15);
    background-color: #ffffff;
}

/* Tablolar */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: -8px;
}

.table tr {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.table th {
    border: none;
    font-weight: 600;
    color: var(--text-muted);
    padding: 1rem;
}

.table td {
    padding: 1.2rem 1rem;
    vertical-align: middle;
    border-top: 1px solid #f2f2f2;
    border-bottom: 1px solid #f2f2f2;
}

.table td:first-child {
    border-left: 1px solid #f2f2f2;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table td:last-child {
    border-right: 1px solid #f2f2f2;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Badge (Durum Etiketleri) */
.badge {
    padding: 0.5em 0.8em;
    border-radius: 6px;
    font-weight: 600;
}

/* Giriş Sayfası (Login Page) */
.login-body {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

/* Kurban Hisse Kutusu */
.share-box {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.share-box:hover {
    border-color: var(--primary-color);
    background-color: rgba(13, 92, 58, 0.02);
}

.share-box.occupied {
    border-style: solid;
    border-color: var(--primary-color);
    background-color: rgba(13, 92, 58, 0.05);
}

/* Çevrimdışı Uyarı (Offline Banner) */
.offline-banner {
    background-color: #ffc107;
    color: #212529;
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2000;
    display: none;
}

/* Responsive Kurallar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }
    
    .sidebar-toggler {
        display: block;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
}
