/* GENEL LAYOUT STİLLERİ (Tüm sayfalarda geçerli) */
:root {
    --sidebar-width: 15.625rem;
    --sidebar-bg: #2c3e50;
    --primary-color: #3498db;
    --text-color: #333;
    --header-height: 3.75rem;
    --footer-height: 3rem;
}

html {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    background-color: #f5f6fa;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Header - Tüm sayfalarda sabit */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: #2c3e50;
    padding: 0 1.25rem;
    box-shadow: 0 0.125rem 0.313rem rgba(0, 0, 0, 0.5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

    header h1 {
        font-size: 1.2rem;
        margin: 0;
    }

    header nav ul {
        list-style: none;
        display: flex;
        gap: 2.313rem;
        margin: 0;
        padding: 0;
    }

    header nav a {
        color: #ffffff;
        text-decoration: none;
        font-size: 1rem;
        transition: color 0.3s;
    }

        header nav a:hover {
            color: #3498db;
        }

/* Main Content - Tüm sayfalarda ortak */
main {
    flex: 1;
    margin-top: var(--header-height);
    padding: 1.25rem;
    min-height: calc(100vh - var(--header-height) - 3.125rem);
}

/* Footer - Tüm sayfalarda sabit */
footer {
    position: fixed;
    bottom: 0px;
    width: 100%;
    background-color: #2c3e50;
    color: #ffffff;
    text-align: center;
    margin-top: auto;
    height: var(--footer-height);
    justify-content: center;
    align-content: center;
}

    footer p {
        margin: 0px;
    }

/* ANA SAYFA ÖZEL STİLLERİ (sadece ana sayfada) */
.hero-section {
    background: white;
    border-radius: 0.5rem;
    padding: 2.313rem;
    box-shadow: 0 0.125rem 0.938rem rgba(0, 0, 0, 0.1);
}

.feature-card {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 30px;
    transition: transform 0.3s ease;
}

    .feature-card:hover {
        transform: translateY(-5px);
    }

    .feature-card .feature-icon {
        width: 100%;
        height: 60px;
        background: rgba(255,255,255,0.1);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px;
    }

    .feature-card a,
    .feature-card p,
    .feature-card h1,
    .feature-card h2,
    .feature-card h3,
    .feature-card h4,
    .feature-card h5,
    .feature-card h6
    {
        text-align: justify;
    }

    /* ADMIN PANEL ÖZEL STİLLERİ (Sadece admin sayfalarında) */
    .admin-container {
        display: flex;
        margin-top: var(--header-height);
    }

.admin-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: white;
    height: calc(100% - var(--footer-height) - var(--header-height));
    position: fixed;
    left: 0;
    top: var(--header-height);
    overflow-y: hidden;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: 0px;
    padding: 1.875rem;
    background-color: #f1f1f1;
    min-height: calc(100vh - var(--header-height));
}

#paginationContainer a {
    text-decoration: none;
    color: #3498db;
    background-color: white;
    transition: transform 0.3s, background-color 0.3s;
}

    #paginationContainer a:hover {
        transform: translateY(-0.188rem);
        background-color: #f0f0f0; /* Change to your desired hover background color */
    }

/* İçerik Kartları (Hem genel hem admin için) */
.content-card {
    background: white;
    border-radius: 0.5rem;
    padding: 2.313rem;
    box-shadow: 0 0.125rem 0.938rem rgba(0, 0, 0, 0.1);
    margin-bottom: 1.25rem;
}

/* Sidebar Menü Detayları */
.sidebar-header {
    padding: 1.25rem;
    border-bottom: 0.063rem solid #34495e;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sidebar-menu li a {
        color: white;
        text-decoration: none;
        padding: 0.938rem 1.25rem;
        display: block;
        transition: background 0.3s;
    }

        .sidebar-menu li a:hover {
            background-color: #34495e;
        }

    .sidebar-menu li.active a {
        background-color: var(--primary-color);
    }

    .sidebar-menu .fas {
        margin-right: 0.625rem;
        width: 1.25rem;
    }

/* LISTING STYLES */
.data-container {
    margin-top: 1.875rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.938rem rgba(0, 0, 0, 0.1);
}

/* Tablo Stili */
.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .data-table thead {
        background-color: #f8f9fa;
        border-bottom: 0.125rem solid #e9ecef;
    }

    .data-table th {
        padding: 0.938rem;
        text-align: left;
        font-weight: 600;
        color: #2c3e50;
    }

    .data-table td {
        padding: 0.75rem 0.938rem;
        border-bottom: 0.063rem solid #e9ecef;
        vertical-align: top;
    }

        .data-table td.btns {
            text-align: right;
        }

    .data-table tr:hover {
        background-color: #f8f9fa;
    }

/* Kart Stili (Alternatif) */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr));
    gap: 1.25rem;
    padding: 1.25rem;
}

.data-card {
    background: #fff;
    border: 0.063rem solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.938rem;
    transition: transform 0.2s;
}

    .data-card:hover {
        transform: translateY(-0.188rem);
        box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    }

/* Ortak Öğeler */
.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 0.063rem solid #e9ecef;
}

.search-filter {
    display: flex;
    gap: 0.938rem;
    align-items: center;
}

.search-input {
    padding: 0.5rem 0.938rem;
    border: 0.063rem solid #ddd;
    border-radius: 0.25rem;
    width: 15.625rem;
}

.pagination {
    display: flex;
    justify-content: center;
    padding: 1.25rem;
    gap: 0.625rem;
}

.page-item,
#page-item {
    padding: 0.5rem 0.75rem;
    border: 0.063rem solid #ddd;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

    .page-item.active,
    #page-item.active {
        background-color: #3498db;
        color: white;
        border-color: #3498db;
    }

    .page-item:hover:not(.active),
    #page-item:hover:not(.active) {
        background-color: #f8f9fa;
    }

.empty-state {
    text-align: center;
    padding: 2.5rem;
    color: #6c757d;
}

/* Durum Etiketleri */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
}

.success {
    background-color: #d4edda;
    color: #155724;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Butonlar */
.btn-icon {
    padding: 0.375rem;
    border: none;
    background: none;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.3s;
}

    .btn-icon:hover {
        color: #3498db;
    }

    .btn-icon.danger:hover {
        color: #dc3545;
    }

.btn-small {
    padding: 0.313rem 0.625rem;
    border-radius: 0.25rem;
    border: 0.063rem solid #ddd;
    font-size: 0.75rem;
    cursor: pointer;
    margin: 0.125rem;
}

.primary {
    background-color: #3498db;
    color: white;
}

.danger {
    background-color: #dc3545;
    color: white;
}

#exportExcelBtn,
#addAlergenBtn,
#importExcelBtn {
    width: 6.5rem;
}

/* Custom Swals */
.custom-swal-popup {
    padding: 0px;
    font-size: 0.9rem;
}

/* Responsive */
/* Mobil Görünüm */
@media (max-width: 48rem) {
    /*  Mobil (0 - 768px) */
    :root {
        --sidebar-width: 4rem;
        --footer-height: 5rem;
    }

    .admin-sidebar span {
        display: none;
    }

    .admin-sidebar .sidebar-header {
        display: none;
    }

    .data-container {
        margin-top: 0.75rem;
    }

    .data-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .search-filter {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .search-input,
    #exportExcelBtn,
    #addAlergenBtn,
    #importExcelBtn {
        width: 100%;
    }

    .data-table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
        display: block;
        overflow-x: auto;
    }

        .data-table thead {
            display: none;
        }

        .data-table tbody {
            display: block;
            width: 100%;
        }

        .data-table tr {
            display: block;
            margin-bottom: 0.938rem;
            border: 0.063rem solid #ddd;
            padding: 0.625rem;
            background-color: #fff;
        }

        .data-table td {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.625rem;
            border-bottom: 0.063rem solid #e9ecef;
        }

            .data-table td:last-child {
                border-bottom: none;
            }

            .data-table td::before {
                content: attr(data-label);
                font-weight: bold;
                color: #2c3e50;
                width: 30%;
                min-width: 30%;
            }
}

/* Tablet (768px - 960px) */
@media (min-width: 48rem) and (max-width: 60rem) {
    .data-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .search-filter {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .search-input,
    #exportExcelBtn,
    #addAlergenBtn,
    #importExcelBtn {
        width: 100%;
    }

    .data-table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
        display: block;
        overflow-x: auto;
    }

        .data-table thead {
            display: none;
        }

        .data-table tbody {
            display: block;
            width: 100%;
        }

        .data-table tr {
            display: block;
            margin-bottom: 0.938rem;
            border: 0.063rem solid #ddd;
            padding: 0.625rem;
            background-color: #fff;
        }

        .data-table td {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.625rem;
            border-bottom: 0.063rem solid #e9ecef;
        }

            .data-table td:last-child {
                border-bottom: none;
            }

            .data-table td::before {
                content: attr(data-label);
                font-weight: bold;
                color: #2c3e50;
                width: 30%;
                min-width: 30%;
            }
}

@media (max-width: 89.375rem) {
    .alergent-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}
