/* Genel sayfa yapısı */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Container */
.container {
    max-width: 1300px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.login-container {
    max-width: 1000px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Başlık */
.container h2 {
    margin-bottom: 25px;
    font-size: 28px;
    color: #1a73e8;
    text-align: center;
}
.login-container h2 {
    margin-bottom: 25px;
    font-size: 28px;
    color: #1a73e8;
    text-align: center;
}

/* Form alanı */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

label {
    font-weight: 600;
}

input[type="text"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    border-color: #1a73e8;
    outline: none;
}

input[type="submit"] {
    background-color: #1a73e8;
    color: white;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #125ab6;
}

/* Radio butonlar */
.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Hata ve başarı mesajları */
.error {
    color: red;
    font-weight: bold;
    margin-top: 10px;
    background-color: #ffe0e0;
    padding: 10px;
    border-radius: 5px;
}

.success-box {
    background-color: #e6ffe6;
    padding: 15px;
    border-left: 6px solid #4CAF50;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Tablo stilleri */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 12px;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background-color: #1a73e8;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

.export-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    margin-top: 20px;
}

#yilFiltre {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.summary-container {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    margin-top: 25px;
    background-color: #e9f5ff;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    color: #1a73e8;
}

.yil-tablosu p {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 6px;
    font-style: italic;
}

.firma-bilgi {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}
.firma-bilgi h3 {
    margin: 0;
}
.firma-bilgi img {
    max-width: 40px;
    max-height: 40px;
}

.filter-menu {
    position: relative;
    display: inline-block;
}

.filter-btn {
    background-color: #184cd1;
    color: white;
    padding: 10px 16px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.filter-btn:hover {
    background-color: #121892;
}

.filter-container {
    display: none; 
    position: absolute;
    top: 0;              
    left: 100%;          
    background-color: #184cd1;
    min-width: 220px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px;
    z-index: 1000;    
    align-items: center;
    gap: 10px;
}

.filter-container label {
    font-weight: bold;
    font-size: 14px;
}

.filter-container select,
.filter-container input[type="date"] {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: auto;
}

.filter-menu.show .filter-container {
    display: flex;
}
.reset-filters {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
}

.reset-filters:hover {
    background-color: #c0392b;
}

.header-bar {
    display: flex;
    flex-direction: column; /* başlık ve firma bilgilerini dikey sıralar */
    align-items: stretch;
    margin-bottom: 20px;
}

.header-bar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; /* başlık ve firma bilgileri arasındaki boşluk */
}

.header-bar-top h2 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
}

.export-buttons {
    display: flex;
    gap: 8px;
}

.export-buttons button {
    background-color: #1a73e8;
    color: white;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.export-buttons button:hover {
    background-color: #125ab6;
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.company-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.company-left img {
    max-height: 30px;
}

.company-left .firma-adi {
    font-size: 18px;
    font-weight: bold;
}

.company-right {
    font-size: 16px;
    color: #333;
}


.loading-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media print {
    body * {
        visibility: hidden;
    }
    .container, .container * {
        visibility: visible;
    }
    .container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    table {
        width: 100% !important;
        border-collapse: collapse;
        font-size: 11px;
        page-break-inside: auto;
        table-layout: fixed; /* Sütunlar sayfaya sığsın */
    }
    th, td {
        border: 1px solid #000;
        padding: 4px;
        word-break: break-word; /* Uzun yazıları kır */
        white-space: normal;    /* Satır içine sığdır */
    }
    tr {
        page-break-inside: avoid;
    }  
    @page {
        size: A4 landscape;
        margin: 10mm;
    }
    html, body {
        overflow: hidden !important; /* Gereksiz scroll’u engelle */
    }
}


.logout-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px;
}

.logout-btn:hover {
    background-color: #c0392b;
}
.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 10; /* modal içeriğin üstünde kalması için */
}

.close-modal:hover {
    background-color: #c0392b;
}

/* Modal arka plan */
.modal {
    display: none; /* başlangıçta gizli */
    position: fixed; /* fixed yaparak ekran ortasında kalmasını sağlıyoruz */
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Modal kutusu */
.modal-content {
    position: relative; /* çarpı butonunun konumu için gerekli */
    background: #fff;
    padding: 30px; /* biraz daha büyük padding */
    border-radius: 12px;
    width: 450px; /* genişliği artırdım */
    max-width: 90%;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: fadeInScale 0.3s ease;
}

.modal-content h4 {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.modal-content button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 10px;
}

.modal-content button:hover {
    background-color: #0056b3;
}

.modal-content button:active {
    transform: scale(0.98);
}
.modal-content label {
    display: block;
    margin: 8px 0;
    font-weight: 500;
}

.modal-content button {
    margin-top: 12px;
    width: 100%;
    padding: 12px; /* biraz daha büyük buton */
    font-size: 16px;
    font-weight: 500;
}

.modal-content .message {
    margin-top: 10px;
    font-size: 14px;
}

/* Kod doğrulama bölümü */
.code-section {
    display: none;
    margin-top: 20px;
    text-align: center;
}

.code-section input[type="text"] {
    padding: 10px;
    font-size: 16px;
    width: 160px; /* biraz genişlettim */
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-right: 10px;
}

.code-section button {
    padding: 12px 24px;
    font-size: 16px;
}

 .spinner {
            border: 3px solid #f3f3f3;
            border-top: 3px solid #007bff;
            border-radius: 50%;
            width: 16px;
            height: 16px;
            display: inline-block;
            margin-left: 8px;
            vertical-align: middle;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0%   { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

/* Modal animasyon */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        padding: 25px;
    }
    .code-section input[type="text"] {
        width: 140px;
        margin-bottom: 10px;
    }
}


/* ---------------- RESPONSIVE TASARIM ---------------- */
@media (max-width: 1200px) {
    .container, .login-container {
        max-width: 95%;
        margin: 20px auto;
        padding: 20px;
    }

    .header-bar h2 {
        font-size: 24px;
    }

    .company-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .company-right {
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .summary-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }

    .firma-bilgi {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .export-buttons {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container h2,
    .login-container h2 {
        font-size: 22px;
    }

    form {
        gap: 10px;
    }

    .radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .company-header {
        text-align: center;
        align-items: center;
    }

    .company-left .firma-adi {
        font-size: 16px;
    }

    .summary-container {
        font-size: 14px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .container, .login-container {
        padding: 15px;
    }

    .header-bar h2 {
        font-size: 20px;
    }

    input[type="text"],
    input[type="submit"],
    select,
    button {
        font-size: 14px;
        padding: 8px;
    }

    .filter-btn, 
    .reset-filters,
    .export-buttons button,
    .logout-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    table th, table td {
        padding: 6px;
        font-size: 11px;
    }
}
