/* Modern ve Clean Stil */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-color);
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 600;
}

main {
    min-height: calc(100vh - 120px);
}

.card {
    border: none;
    border-radius: 8px;
}

.card-header {
    border-radius: 8px 8px 0 0;
    padding: 1.25rem;
}

.card-body {
    padding: 2rem;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.alert {
    border: none;
    border-radius: 6px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.img-thumbnail {
    border-radius: 6px;
    border: 2px solid var(--primary-color);
}

#invoicePreview {
    background-color: white;
    border-radius: 6px;
    padding: 2rem;
}

.footer {
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    #invoicePreview {
        padding: 1rem;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Badge stilleri */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

/* Dosya input styling */
.form-control[type="file"] {
    cursor: pointer;
}

.form-control[type="file"]::file-selector-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.form-control[type="file"]::file-selector-button:hover {
    background-color: #0b5ed7;
}

/* ================================================
   MOBIL UYUMLULUĞU (Mobile-First)
   ================================================ */

/* Tüm cihazlar için temel ayarlar */
html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* Mobil (< 576px) */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1rem;
    }

    main {
        min-height: calc(100vh - 60px);
        padding: 0.5rem;
    }

    .card {
        margin-bottom: 1rem;
        border-radius: 6px;
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        min-height: 44px;
        font-size: 1rem;
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px;
        padding: 0.75rem;
        border-radius: 4px;
    }

    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    #logoPreview {
        max-width: 150px;
        margin: 0 auto;
        display: block;
    }

    .img-thumbnail {
        padding: 0.25rem;
        border: 1px solid #dee2e6;
    }

    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .footer {
        font-size: 0.85rem;
        padding: 0.75rem 0 !important;
    }

    .text-muted {
        font-size: 0.85rem;
    }

    h4 {
        font-size: 1.25rem;
    }
}

/* Tablet (576px - 768px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .col-lg-8 {
        max-width: 100%;
    }

    main {
        padding: 1rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .btn {
        min-height: 42px;
        font-size: 0.95rem;
    }

    .form-control,
    .form-select {
        min-height: 42px;
        font-size: 15px;
    }
}

/* Büyük ekranlar (≥ 768px) */
@media (min-width: 768px) {
    main {
        padding: 2rem;
    }

    .card-body {
        padding: 2rem;
    }

    .btn {
        min-height: 40px;
    }

    .form-control,
    .form-select {
        min-height: 38px;
        font-size: 14px;
    }
}

/* Touch-friendly ayarlamalar */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        min-width: 48px;
        font-size: 1.05rem;
    }

    .form-control,
    .form-select,
    input[type="file"] {
        min-height: 48px;
        padding: 0.875rem;
    }

    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Landscape modu */
@media (max-height: 500px) and (orientation: landscape) {
    main {
        min-height: auto;
        padding: 0.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Yüksek DPI ekranlar (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Açılır menü ve dropdown'lar mobil uyumlu */
.dropdown-menu {
    border-radius: 4px;
}

/* Input focus états mobil uyumlu */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Spinner loading mobil görseli */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Responsive container */
.container, .container-fluid {
    /* Bootstrap varsayılanı kullan */
}

/* Logo Önizlemesi - Responsive */
#logoPreview {
    max-width: 150px !important;
    max-height: 150px !important;
}

/* Tablet ve daha büyük ekranlarda */
@media (min-width: 768px) {
    #logoPreview {
        max-width: 150px !important;
        max-height: 150px !important;
    }
}

/* Masaüstü ekranlarda */
@media (min-width: 992px) {
    #logoPreview {
        max-width: 160px !important;
        max-height: 160px !important;
    }
}
