/* audit/static/audit/css/style.css - OLMASI GEREKEN TAM HALİ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #007bff;
    --accent-orange: #fd7e14;
    --accent-yellow: #ffc107;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --text-color: #495057;
    --white: #ffffff;
    --success-green: #28a745;
    --danger-red: #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

h1, h2, h3 {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

h1 {
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--medium-gray);
}

.main-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.main-header nav a {
    color: var(--white);
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.main-header nav a:hover {
    opacity: 0.8;
}

.main-header .user-info {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.task-table th, .task-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

.task-table thead {
    background-color: var(--dark-gray);
    color: var(--white);
}

.task-table th {
    font-weight: 600;
}

.task-table tbody tr:hover {
    background-color: var(--light-gray);
}

/* BU DOĞRU BLOK İLE DEĞİŞTİRİN */
.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    display: inline-block;
}

/* Veritabanı değerleriyle eşleşen doğru CSS sınıfları */
.status-delayed { background-color: var(--danger-red); }
.status-completed { background-color: var(--success-green); }
.status-pending_approval { background-color: var(--accent-orange); }
.status-in_progress { background-color: var(--primary-blue); }
.status-rejected { background-color: #6c757d; } /* Reddedildi durumu için stil eklendi */

/* Sarı gibi açık renkli arka planlar için özel metin rengi */
.status-pending { background-color: var(--accent-yellow); color: var(--dark-gray); }

.traceability-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--medium-gray);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.traceability-header h1 {
    margin-bottom: 0.5rem;
    border-bottom: none;
}

.subtitle {
    color: #6c757d;
}

.progress-container {
    min-width: 250px;
    text-align: right;
}

.progress-bar {
    background-color: var(--medium-gray);
    border-radius: 20px;
    height: 25px;
    width: 100%;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-bar-fill {
    background-color: var(--primary-blue);
    height: 100%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: width 0.5s ease-in-out;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-item {
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s ease;
}

.step-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.button:hover {
    opacity: 0.85;
}

.button-primary { background-color: var(--primary-blue); }
.button-secondary { background-color: #6c757d; }
.button-danger { background-color: var(--danger-red); }

.logout-button {
    background: none;
    border: none;
    color: white;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}

.logout-button:hover {
    text-decoration: none;
}

/* style.css DOSYASININ EN SONUNA EKLEYİN */

/* Gelişmiş İstatistik Kartı Stilleri */
.stat-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--primary-blue);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.stat-card-header h2 {
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--medium-gray);
    font-size: 1.25rem;
}

.stat-card-header a {
    text-decoration: none;
    color: inherit;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background-color: var(--light-gray);
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-item .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.stat-item .stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
}

/* İstatistik Renkleri */
.stat-item.completed .stat-value { color: var(--success-green); }
.stat-item.delayed .stat-value { color: var(--danger-red); }
.stat-item.pending .stat-value { color: var(--accent-orange); }
.stat-item.incomplete .stat-value { color: var(--primary-blue); }

/* YENİ EKLENEN/GÜNCELLENEN BADGE STİLLERİ */
.status-badge.status-pending { background-color: var(--accent-yellow); color: var(--dark-gray); }
.status-badge.status-completed { background-color: var(--success-green); }
.status-badge.status-delayed { background-color: var(--danger-red); }

/* style.css DOSYASININ EN SONUNA EKLEYİN */

/* =============================================== */
/* RESPONSIVE TASARIM (MOBİL UYUMLULUK) */
/* =============================================== */

@media (max-width: 768px) {
    /* Ana yapı ve başlıklar için daha az dolgu */
    .container {
        padding: 1rem;
        margin: 1rem auto;
    }

    h1 {
        font-size: 1.8rem;
    }

    /* Header (Menü) yapısını mobil için düzenle */
    .main-header {
        flex-direction: column;
        padding: 1rem;
    }

    .main-header .logo {
        margin-bottom: 1rem;
    }

    .main-header nav {
        margin-bottom: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding: 0.5rem 0;
        width: 100%;
        text-align: center;
    }

    .main-header nav a {
        display: block;
        margin: 0.5rem 0;
    }

    /* Tabloları mobil için kart görünümüne çevirme */
    .task-table thead {
        display: none; /* Tablo başlığını gizle */
    }

    .task-table, .task-table tbody, .task-table tr, .task-table td {
        display: block;
        width: 100%;
    }

    .task-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--medium-gray);
        border-radius: 8px;
        padding: 1rem;
    }

    .task-table td {
        text-align: right; /* İçeriği sağa yasla */
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid var(--medium-gray);
        margin-bottom: 0.5rem;
    }

    .task-table td:last-child {
        border-bottom: none;
    }

    /* data-label kullanarak gizlediğimiz başlıkları her hücrenin başına etiket olarak ekle */
    .task-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        text-align: left;
        font-weight: 600;
        color: var(--dark-gray);
    }
}

/* style.css DOSYASININ EN SONUNA EKLEYİN */

/* Tablo içindeki eylem hücrelerinin içeriğini hizalamak için */
.action-cell {
    display: flex;
    justify-content: flex-start; /* İçeriği sola yasla */
    align-items: center;       /* İçeriği dikey olarak ortala */
    min-height: 35px;          /* Hücrenin minimum yüksekliğini butonlarla eşitle */
}