/* admin_style.css - Nihai Sürüm */
:root {
    --primary-color: #0093E9;
    --secondary-color: #0d6efd;
    --bg-dark: #2c3034;
    --bg-darker: #212529;
    --border-color: #495057;
    --text-light: #f8f9fa;
    --text-muted: #adb5bd;
    --row-hover-bg: #3a3f44;
    --gradient-start: #0093E9;
    --gradient-end: #80D0C7;
}

/* =================================================================== */
/* DİETRİCH BİLİŞİM
/* =================================================================== */


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-darker);
    color: var(--text-light);
    display: flex;
}

.sidebar {
    width: 80px;
    background-color: var(--bg-dark);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid var(--border-color);
    z-index: 100;
    transition: width 0.3s ease-in-out;
    overflow-x: hidden;
}

.sidebar:hover {
    width: 250px;
}

/* GÜNCELLENDİ: 'border-bottom' kuralı kaldırıldı. */
.sidebar-header {
    text-align: center;
    padding: 20px;
    white-space: nowrap;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.2s 0.1s ease-in-out;
}

.sidebar:hover .sidebar-header h3 {
    opacity: 1;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 30px;
    transition: all 0.2s ease-in-out;
    border-left: 4px solid transparent;
    white-space: nowrap;
}

.sidebar-menu li a:hover {
    background-color: var(--bg-darker);
    color: var(--text-light);
}

.sidebar-menu li.active a {
    background-color: var(--bg-darker);
    color: var(--primary-color);
    font-weight: bold;
    border-left-color: var(--primary-color);
}

.sidebar-menu li a .fa {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-menu .menu-text {
    opacity: 0;
    transition: opacity 0.2s 0.1s ease-in-out;
    margin-left: 15px;
}

.sidebar:hover .sidebar-menu .menu-text {
    opacity: 1;
}

.main-content {
    margin-left: 80px;
    padding: 40px;
    width: calc(100% - 80px);
    transition: all 0.3s ease-in-out;
}

.sidebar:hover ~ .main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
}

.page-header {
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.page-header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-light);
}
.page-header h1 small {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
}

/* KONTROL BARI (FİLTRE & SIRALAMA) STİLLERİ */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-dark);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.search-control {
    position: relative;
    flex-grow: 1;
    min-width: 250px;
}

.search-control .fa-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-control input[type="text"] {
    width: 100%;
    padding: 12px 15px 12px 40px;
    box-sizing: border-box;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.2s ease-in-out;
}

.search-control input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 147, 233, 0.2);
}

.search-control input[type="text"]::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.sort-control {
    display: flex;
    align-items: center;
}

.sort-control label {
    margin-right: 10px;
    color: var(--text-muted);
    font-size: 14px;
    white-space: nowrap;
}

.sort-control select {
    background-color: var(--bg-darker);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 11px;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 30px;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23adb5bd%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: .65em auto;
}

.sort-control select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Modern Tablo Tasarımı */
.table-wrapper {
    background-color: var(--bg-dark);
    border-radius: 12px;
    padding: 10px 20px 20px 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    position: relative;
    min-height: 150px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.data-table th, .data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table thead th {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
}

.data-table tbody tr:hover {
    background-color: var(--row-hover-bg);
}

.data-table a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

/* YÜKLENİYOR ANİMASYONU STİLLERİ */
.table-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 48, 52, 0.7);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: opacity 0.3s;
    opacity: 0;
}

.table-wrapper.table-loading .table-loader {
    display: flex;
    opacity: 1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =================================================================== */
/* 2. GİRİŞ SAYFASI STİLLERİ (AÇIK TEMA)
/* =================================================================== */

/* Sadece giriş sayfasında çalışacak özel body stili */
body.login-page-body {
    font-family: 'Roboto', sans-serif;
    display: flex; /* 'flex' değerini koru */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f4; /* Varsayılan arka plan */
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.login-box {
    text-align: center;
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.login-box h2 {
    color: #333;
    margin-bottom: 25px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8em;
}

.login-box .error-message {
    background-color: #ffecec;
    color: #c51212;
    padding: 10px;
    border: 1px solid #ffc2c2;
    border-radius: 5px;
    margin-bottom: 20px;
}

.login-box .input-group {
    position: relative;
    margin-bottom: 30px;
}

.login-box .input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.login-box .input-group input:focus {
    border-color: #007bff;
}

.login-box .input-group label {
    position: absolute;
    top: 12px;
    left: 15px;
    color: #999;
    font-size: 1em;
    pointer-events: none;
    transition: all 0.2s ease-out;
}

.login-box .input-group input:focus + label,
.login-box .input-group input:valid + label {
    top: -10px;
    left: 10px;
    font-size: 0.8em;
    color: #007bff;
    background-color: #fff;
    padding: 0 5px;
}

.login-box .form-group.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-left: 5px;
}

.login-box .form-group.remember-me input[type="checkbox"] {
    margin-right: 10px;
}

.login-box .form-group.remember-me label {
    font-size: 0.9em;
    color: #555;
    user-select: none;
}

.btn-login-submit {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    width: 100%;
    transition: background-color 0.3s ease;
}

.btn-login-submit:hover {
    background-color: #0056b3;
}
/* Butonları bir arada tutmak ve hizalamak için */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px; /* Butonlar arası boşluk */
}
.header-actions .btn .fa {
    margin-right: 8px; /* İkon ile yazı arası boşluk */
}
.btn {
    display: inline-block;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 10px 25px; /* Biraz daha geniş padding */
    font-size: 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease-in-out; /* Yumuşak geçiş efekti */
}

/* Ana Eylem Butonu (Mavi, Gradient) */
.btn-primary {
    color: #fff;
    background-image: linear-gradient(45deg, var(--primary-color) 0%, var(--gradient-end) 100%);
    box-shadow: 0 4px 15px rgba(0, 147, 233, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px); /* Üzerine gelince hafifçe yukarı kalkma efekti */
    box-shadow: 0 6px 20px rgba(0, 147, 233, 0.3);
}

/* İkincil Buton (İptal, Geri vb. için) */
.btn-secondary {
    color: var(--text-muted);
    background-color: transparent;
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--row-hover-bg);
    color: var(--text-light);
    border-color: var(--text-muted);
}

/* =================================================================== */
/* 3. MOBİL UYUMLULUK
/* =================================================================== */

@media (max-width: 768px) {
    /* Yönetim Paneli Mobilde Sidebar'ı Gizle */
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .page-header h1 {
        font-size: 24px;
    }

    /* Tabloyu Kart Görünümüne Çevir */
    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        display: block;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
    }

    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .responsive-table td:last-child {
        border-bottom: none;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        color: var(--text-muted);
        margin-right: 10px;
    }
}

@media (max-width: 600px) {
    /* Giriş Sayfası Mobilde Daha İyi Görünsün */
    body.login-page-body {
        align-items: flex-start;
        padding-top: 20px;
    }

    .login-container {
        margin: 20px;
        padding: 20px;
    }
}