/* Efe Bobinaj - Motor Takip Sistemi CSS */
/* Modern, Responsive, Mobile-First Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.title h1 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 5px;
}

.title p {
    color: #7f8c8d;
    font-size: 14px;
}

.btn-new {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.btn-new:active {
    transform: scale(0.95);
    background: #2980b9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filters {
    background: white;
    padding: 15px 30px;
    margin-top: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filters-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.table-container {
    max-width: 1400px;
    margin: 20px auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.motor-table {
    width: 100%;
    border-collapse: collapse;
}

.motor-table thead {
    background: #f8f9fa;
}

.motor-table th {
    padding: 15px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    border-bottom: 2px solid #ecf0f1;
}

.motor-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
}

.motor-table tbody tr:hover {
    background: #f8f9fa;
}

.motor-table tbody tr {
    transition: background 0.2s ease;
}

.motor-table tbody tr:active {
    background: #e8f4f8;
}

/* Mobilde tiklanabilir satirlar icin daha fazla alan */
@media (max-width: 768px) {
    .motor-table tbody tr[style*="cursor: pointer"] {
        min-height: 60px;
    }
    
    .motor-table tbody tr td {
        padding: 14px 8px;
    }
}

.barkod {
    color: #2c3e50;
    font-weight: 600;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-geldi {
    background: #fff3cd;
    color: #856404;
}

.status-teklif {
    background: #d1ecf1;
    color: #0c5460;
}

.status-fatura {
    background: #f8d7da;
    color: #721c24;
}

.status-onay {
    background: #d4edda;
    color: #155724;
}

.status-hazir {
    background: #28a745;
    color: white;
}

.status-gitti {
    background: #6f42c1;
    color: white;
}

.status-teslim_edildi {
    background: #16a085;
    color: white;
}

.price {
    color: #27ae60;
    font-weight: 700;
}

.actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.btn-icon:active {
    transform: scale(0.9);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .btn-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        min-width: 40px;
        min-height: 40px;
    }
}

.btn-view {
    background: #8b4513;
    color: white;
}

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-teklif {
    background: #9b59b6;
    color: white;
}

.btn-view-teklif {
    background: #9b59b6;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 6px;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

.manual-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.manual-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 6px;
}

.btn-add {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.photo-upload {
    border: 2px dashed #3498db;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    background: #f8f9fa;
}

.photo-preview {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.photo-item {
    position: relative;
    width: 80px;
    height: 80px;
}

.photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.photo-x {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
}

.btn-save {
    background: #27ae60;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

.total-display {
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-top: 20px;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #ddd;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    max-height: 150px;
    overflow-y: auto;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-items div:hover {
    background: #e9e9e9;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e9 50%, #e8eaf6 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(46, 49, 145, 0.15), 0 8px 25px rgba(46, 139, 87, 0.1);
    width: 90%;
    max-width: 440px;
    border: none;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2E8B57 0%, #2E3191 100%);
}

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo img {
    height: 140px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.login-logo h1 {
    background: linear-gradient(135deg, #2E8B57 0%, #2E3191 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.login-logo p {
    color: #6c757d;
    font-size: 15px;
    font-weight: 500;
}

.login-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.login-tab {
    flex: 1;
    padding: 14px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.login-tab:hover {
    border-color: #2E8B57;
    background: #f0fff4;
    color: #2E8B57;
    transform: translateY(-2px);
}

.login-tab.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.login-tab.admin-tab.active {
    background: linear-gradient(135deg, #2E3191 0%, #1a1d5a 100%);
    border-color: #2E3191;
}

.login-tab.calisan-tab.active {
    background: linear-gradient(135deg, #2E8B57 0%, #1e6e42 100%);
    border-color: #2E8B57;
}

.login-tab.musteri-tab.active {
    background: linear-gradient(135deg, #3CB371 0%, #2E8B57 100%);
    border-color: #3CB371;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.login-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.login-input:focus {
    outline: none;
    border-color: #2E8B57;
    background: white;
    box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.1);
}

.login-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn.admin {
    background: linear-gradient(135deg, #2E3191 0%, #1a1d5a 100%);
    box-shadow: 0 4px 15px rgba(46, 49, 145, 0.4);
}

.login-btn.calisan {
    background: linear-gradient(135deg, #2E8B57 0%, #1e6e42 100%);
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
}

.login-btn.musteri {
    background: linear-gradient(135deg, #3CB371 0%, #2E8B57 100%);
    box-shadow: 0 4px 15px rgba(60, 179, 113, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.login-select {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 16px;
    background: #fafafa;
    cursor: pointer;
}

.login-select:focus {
    outline: none;
    border-color: #2E8B57;
    background: white;
}

.user-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.user-badge.admin {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    color: #2E3191;
}

.user-badge.calisan {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2E8B57;
}

.user-badge.musteri {
    background: linear-gradient(135deg, #e8f5e9 0%, #a5d6a7 100%);
    color: #2E8B57;
}

.btn-logout {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #2E3191;
}

.hide-price .price,
.hide-price .price-cell,
.hide-price [data-price-info] {
    display: none !important;
}

.hide-price .total-display {
    display: none !important;
}

.hide-price .price-column {
    display: none !important;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 15mm 25mm;
    }

    * {
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    html,
    body {
        width: 210mm !important;
        min-height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        font-size: 12pt !important;
    }

    body>* {
        display: none !important;
        visibility: hidden !important;
    }

    #reportModal {
        display: block !important;
        visibility: visible !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 210mm !important;
        min-height: 297mm !important;
        background: white !important;
        overflow: visible !important;
    }

    #reportModal * {
        visibility: visible !important;
    }

    .modal {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        background: white !important;
        padding: 0 !important;
        width: 210mm !important;
    }

    .modal-content {
        width: 210mm !important;
        max-width: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        background: white !important;
    }

    #reportButtons {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
    }

    #reportContent {
        width: 194mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    #reportContent>div {
        width: 100% !important;
        padding: 8mm !important;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
    }

    #reportContent table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    #reportContent img {
        max-width: 100% !important;
        height: auto !important;
    }

    table {
        page-break-inside: avoid !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }

    td,
    th {
        padding: 6px 8px !important;
    }

    img {
        display: block !important;
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid !important;
    }

    img[alt="Efe Logo"] {
        height: 150px !important;
        width: auto !important;
        max-height: 150px !important;
        display: block !important;
        margin: 0 auto !important;
    }

    img[alt="Kase"] {
        max-width: 120px !important;
        max-height: 60px !important;
    }

    div {
        page-break-inside: avoid !important;
    }

    /* Fotograflari kesinlikle 2. sayfaya tasi */
    div > div > h3:contains("Fotograflar") {
        page-break-before: always !important;
    }

    div[style*="page-break-before: always"] {
        page-break-before: always !important;
        margin-top: 0 !important;
        padding-top: 20px !important;
    }
}

/* ============================================
   MOBIL UYUMLULUK - TABLET & BUYUK TELEFONLAR
   ============================================ */
@media (max-width: 768px) {
    /* Header optimizasyonu */
    .header {
        padding: 12px 15px;
    }

    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
    }

    .logo-section {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1;
    }

    .logo-img {
        height: 100px;
    }
    
    /* Login ekranindaki logo kucuk kalsin */
    .login-logo img {
        height: 80px !important;
    }

    .title h1 {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .title p {
        font-size: 11px;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .btn-new {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        margin-top: 8px;
        border-radius: 10px;
        order: 3;
        flex-basis: 100%;
    }

    .user-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Filtreler */
    .filters {
        padding: 12px 15px;
    }

    .filters-content {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .filter-input,
    .filter-select {
        width: 100%;
        font-size: 16px;
        padding: 14px;
        border-radius: 10px;
    }

    /* Tablo - KOMPAKT LISTE GORUNUMU */
    .table-container {
        margin: 8px;
        border-radius: 12px;
        overflow: hidden;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .motor-table {
        min-width: unset;
        width: 100%;
    }

    .motor-table thead {
        display: none;
    }

    .motor-table tbody {
        display: flex;
        flex-direction: column;
    }

    .motor-table tbody tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        padding: 12px 14px;
        border-bottom: 1px solid #eee;
        background: white;
        gap: 4px 10px;
        align-items: center;
    }

    .motor-table tbody tr:last-child {
        border-bottom: none;
    }

    .motor-table tbody tr:active {
        background: #f5f9ff;
    }

    .motor-table td {
        padding: 0;
        border: none;
        font-size: 13px;
    }

    .motor-table td::before {
        display: none;
    }

    /* Barkod - Sol ust */
    .motor-table td[data-label="Barkod"] {
        grid-column: 1;
        grid-row: 1;
        font-weight: 700;
        font-size: 14px;
        color: #2c3e50;
    }

    /* Musteri (Firma) - Barkod yaninda */
    .motor-table td[data-label="Musteri"] {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        margin-left: 95px;
        font-size: 13px;
        font-weight: 600;
        color: #34495e;
    }

    /* Guc + Cihaz Tipi - Sol alt */
    .motor-table td[data-label="Guc"] {
        grid-column: 1;
        grid-row: 2;
        font-size: 12px;
        color: #7f8c8d;
        display: block !important;
    }

    .motor-table td[data-label="Cihaz Tipi"] {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        margin-left: 55px;
        font-size: 11px;
    }

    /* Fiyat - Sag ust */
    .motor-table td[data-label="Fiyat"] {
        grid-column: 2;
        grid-row: 1;
        font-weight: 700;
        font-size: 14px;
        color: #27ae60;
        text-align: right;
    }

    /* Durum - Sag alt */
    .motor-table td[data-label="Durum"] {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    /* Gizle - Gereksiz alanlar */
    .motor-table td[data-label="Kullanim Yeri"],
    .motor-table td[data-label="Devir"],
    .motor-table td[data-label="Tarih"] {
        display: none;
    }

    /* Actions - Mobilde goster */
    .motor-table td.actions {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex !important;
        justify-content: flex-start;
        gap: 8px;
        padding-top: 8px;
        margin-top: 5px;
        border-top: 1px solid #eee;
    }
    
    .motor-table td.actions .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    /* Mobil satirlar tiklanabilir */
    .motor-table tbody tr {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }
    
    .motor-table tbody tr:active {
        background-color: #e8f4f8;
    }

    .status-badge {
        padding: 3px 8px;
        font-size: 10px;
        border-radius: 10px;
    }

    .barkod {
        font-size: 14px;
    }

    .price {
        font-size: 14px;
    }

    /* Modal */
    .modal-content {
        padding: 20px 15px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .modal.active {
        align-items: flex-end;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-input,
    .form-select {
        font-size: 16px;
        padding: 14px;
        border-radius: 10px;
        border: 2px solid #e0e0e0;
    }

    .form-input:focus,
    .form-select:focus {
        border-color: #3498db;
        outline: none;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .checkbox-group {
        padding: 14px;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    .checkbox-group input {
        width: 22px;
        height: 22px;
        margin-right: 12px;
    }

    .btn-save {
        font-size: 16px;
        padding: 16px;
        border-radius: 12px;
        font-weight: 700;
    }

    .btn-cancel {
        font-size: 15px;
        padding: 14px;
        border-radius: 12px;
    }

    /* Login ekrani */
    .login-box {
        padding: 30px 20px;
        margin: 15px;
        width: calc(100% - 30px);
        max-width: 90%;
        border-radius: 16px;
    }

    .login-logo img {
        height: 100px;
    }

    .login-logo h1 {
        font-size: 26px;
    }

    .login-logo p {
        font-size: 14px;
    }

    .login-tabs {
        gap: 8px;
    }

    .login-tab {
        padding: 14px;
        font-size: 14px;
        border-radius: 10px;
    }

    .login-input,
    .login-select {
        padding: 16px;
        font-size: 16px;
        border-radius: 10px;
    }

    .login-btn {
        padding: 16px;
        font-size: 16px;
        border-radius: 10px;
    }

    /* Empty state */
    .empty-state {
        padding: 40px 15px;
    }

    /* Photo upload */
    .photo-upload {
        padding: 20px;
        font-size: 14px;
        border-radius: 12px;
    }

    .photo-preview {
        gap: 10px;
    }

    .photo-item {
        width: 80px;
        height: 80px;
        border-radius: 10px;
    }

    /* Total display */
    .total-display {
        font-size: 22px;
        padding: 18px;
        border-radius: 12px;
    }

    /* Manual items */
    .manual-box {
        padding: 15px;
        border-radius: 12px;
    }

    .manual-item {
        padding: 12px;
        font-size: 14px;
        flex-wrap: wrap;
        border-radius: 10px;
    }

    .btn-add {
        font-size: 14px;
        padding: 12px 20px;
        border-radius: 10px;
    }

    .btn-remove {
        font-size: 14px;
        padding: 8px 14px;
        border-radius: 8px;
    }

    /* Report Modal */
    #reportModal .modal-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
        padding: 10px !important;
        overflow-y: auto !important;
    }
    
    #reportModal #reportContent {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    #reportButtons {
        flex-wrap: wrap;
        gap: 10px;
    }

    #reportButtons button {
        flex: 1;
        min-width: 100px;
        padding: 12px;
        font-size: 14px;
    }
}

/* ============================================
   MOBIL UYUMLULUK - KUCUK TELEFONLAR
   ============================================ */
@media (max-width: 480px) {
    /* Header */
    .header {
        padding: 10px;
    }

    .logo-img {
        height: 35px;
    }

    .title h1 {
        font-size: 16px;
    }

    .title p {
        font-size: 11px;
    }

    .btn-new {
        font-size: 14px;
        padding: 12px 16px;
    }

    .user-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    /* Login */
    .login-box {
        padding: 25px 15px;
        width: calc(100% - 20px);
        margin: 10px;
    }

    .login-logo img {
        height: 70px;
    }

    .login-logo h1 {
        font-size: 22px;
    }

    .login-logo p {
        font-size: 13px;
    }

    .login-tab {
        padding: 12px 8px;
        font-size: 12px;
    }

    .login-input,
    .login-select,
    .login-btn {
        font-size: 15px;
        padding: 14px;
    }

    /* Kompakt liste - Kucuk ekran */
    .motor-table tbody tr {
        padding: 10px 12px;
    }

    .motor-table td {
        font-size: 12px;
    }

    .motor-table td[data-label="Barkod"] {
        font-size: 13px;
    }

    .motor-table td[data-label="Cihaz Tipi"] {
        margin-left: 80px;
        font-size: 11px;
        padding: 2px 6px;
    }

    .motor-table td[data-label="Fiyat"] {
        font-size: 13px;
    }

    .status-badge {
        padding: 2px 6px;
        font-size: 9px;
    }

    .barkod {
        font-size: 13px;
    }

    /* Modal */
    .modal-content {
        padding: 15px 12px;
        max-height: 92vh;
    }

    .form-input,
    .form-select {
        font-size: 15px;
        padding: 12px;
    }

    .form-label {
        font-size: 12px;
    }

    /* Butonlar */
    .btn-save {
        font-size: 15px;
        padding: 14px;
    }

    .btn-cancel {
        font-size: 14px;
        padding: 12px;
    }

    .btn-add,
    .btn-remove {
        font-size: 13px;
        padding: 10px 14px;
    }

    /* Photo */
    .photo-item {
        width: 65px;
        height: 65px;
    }

    .photo-upload {
        padding: 15px;
        font-size: 13px;
    }

    /* Total */
    .total-display {
        font-size: 20px;
        padding: 14px;
    }

    /* Checkbox */
    .checkbox-group {
        padding: 12px 10px;
        font-size: 13px;
    }

    .checkbox-group input {
        width: 20px;
        height: 20px;
    }

    /* Status badge */
    .status-badge {
        padding: 5px 12px;
        font-size: 11px;
    }

    .price {
        font-size: 15px;
    }
}

/* ========================================
   TEKLIF FORMU MOBIL RESPONSIVE
   ======================================== */

/* Teklif ve Motor Detay modal icerigi mobil uyumu */
@media screen and (max-width: 768px) {
    /* Report Modal */
    #reportModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }
    
    #reportContent {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Modal icerigi */
    #reportContent > div {
        padding: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* Logo */
    #reportContent img[alt="Efe Logo"] {
        height: 45px !important;
        max-height: 45px !important;
        display: block !important;
        margin: 0 auto 10px auto !important;
    }
    
    /* Bilgi grid - 2 SUTUN */
    #reportContent > div > div[style*="grid-template-columns"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px 12px !important;
    }
    
    /* Tablolar */
    #reportContent table {
        width: 100% !important;
        table-layout: fixed !important;
    }
    
    #reportContent table th,
    #reportContent table td {
        padding: 6px 8px !important;
        word-wrap: break-word !important;
    }
    
    /* Toplam tutar */
    #reportContent > div > div[style*="linear-gradient"] {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 12px !important;
    }
    
    /* Fotograflar */
    #reportContent div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
}

@media screen and (max-width: 480px) {
    #reportContent > div {
        padding: 6px !important;
    }
    
    /* Logo */
    #reportContent img[alt="Efe Logo"] {
        height: 35px !important;
        max-height: 35px !important;
    }
    
    /* 2 sutun koru */
    #reportContent > div > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 2px 6px !important;
    }
    
    #reportContent > div > div[style*="grid-template-columns"] span {
        font-size: 8px !important;
    }
    
    #reportContent > div > div[style*="grid-template-columns"] span[style*="font-weight"] {
        font-size: 10px !important;
    }
    
    #reportContent table {
        font-size: 10px !important;
    }
    
    #reportContent table th,
    #reportContent table td {
        font-size: 10px !important;
        padding: 4px 3px !important;
    }
}

/* Rapor butonlari mobil */
@media screen and (max-width: 768px) {
    .report-buttons,
    #reportModal .modal-content > div:last-child {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 10px !important;
    }
    
    .report-buttons button,
    #reportModal button {
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
    }
}

/* Print stilleri - mobil stillerini kaldir */
@media print {
    #reportContent > div {
        padding: 10mm !important;
    }
    
    #reportContent > div > div:first-child img {
        height: 150px !important;
    }
    
    #reportContent > div > div:first-child > div {
        font-size: 18pt !important;
    }
    
    #reportContent table td {
        display: table-cell !important;
    }
    
    #reportContent > div > div[style*="display: flex"] > div[style*="flex: 1"] {
        max-width: 45% !important;
        background: transparent !important;
    }
}

/* ============================================
   SIFIR MOTOR & TAMIR HESAPLA MOBIL
   ============================================ */

/* Header butonlari mobil */
@media (max-width: 768px) {
    .header-right {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end;
    }
    
    .header-right .btn-musteri,
    .header-right .btn-settings {
        font-size: 11px !important;
        padding: 8px 10px !important;
        margin-right: 0 !important;
    }
    
    .header-right .btn-logout {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    
    .user-badge {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .header-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-right .btn-musteri,
    .header-right .btn-settings {
        font-size: 10px !important;
        padding: 8px !important;
        flex: 1;
        min-width: 0;
        text-align: center;
    }
    
    .logo-section {
        justify-content: center;
    }
}

/* Sifir Motor Modal - Mobil */
@media (max-width: 768px) {
    #sifirMotorModal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 15px !important;
        margin: 10px;
    }
    
    #sifirMotorModal h2 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    #sifirMotorModal table {
        font-size: 12px;
    }
    
    #sifirMotorModal table th,
    #sifirMotorModal table td {
        padding: 8px 6px !important;
    }
    
    #sifirMotorModal table th:nth-child(2),
    #sifirMotorModal table td:nth-child(2) {
        max-width: 100px;
        word-break: break-word;
    }
    
    #sifirMotorModal table td:last-child {
        font-size: 13px !important;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    #sifirMotorModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px 12px 0 0 !important;
        margin: 0;
        position: fixed;
        bottom: 0;
        max-height: 85vh !important;
    }
    
    #sifirMotorModal h2 {
        font-size: 16px !important;
    }
    
    #sifirMotorModal > .modal-content > div:first-of-type {
        flex-direction: column !important;
    }
    
    #sifirMotorModal select {
        width: 100% !important;
    }
    
    #sifirMotorModal table {
        font-size: 11px;
    }
    
    #sifirMotorModal table th:nth-child(1),
    #sifirMotorModal table td:nth-child(1) {
        padding-left: 4px !important;
    }
    
    #sifirMotorModal table th:nth-child(2),
    #sifirMotorModal table td:nth-child(2) {
        font-size: 10px !important;
        max-width: 80px;
    }
    
    #sifirMotorModal table th:nth-child(3),
    #sifirMotorModal table td:nth-child(3) {
        width: 40px;
        text-align: center;
    }
    
    #sifirMotorModal table td:last-child {
        font-size: 12px !important;
        padding-right: 4px !important;
    }
}

/* Tamir Hesapla Modal - Mobil */
@media (max-width: 768px) {
    #tamirHesaplaModal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 15px !important;
    }
    
    #tamirHesaplaModal h2 {
        font-size: 18px !important;
    }
    
    #musteriTasks label {
        font-size: 13px !important;
        padding: 12px 8px !important;
    }
    
    #musteriTasks label span:last-child {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    #tamirHesaplaModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px 12px 0 0 !important;
        position: fixed;
        bottom: 0;
        margin: 0;
        max-height: 90vh !important;
    }
    
    #tamirHesaplaModal h2 {
        font-size: 16px !important;
        padding-bottom: 10px !important;
    }
    
    #tamirHesaplaModal .form-label {
        font-size: 12px !important;
    }
    
    #tamirHesaplaModal .form-input {
        font-size: 14px !important;
        padding: 10px !important;
    }
    
    #musteriTasks {
        max-height: 200px !important;
    }
    
    #musteriTasks label {
        font-size: 12px !important;
        padding: 10px 6px !important;
    }
    
    #musteriTasks label input {
        width: 20px !important;
        height: 20px !important;
    }
    
    #musteriTasks label span:last-child {
        font-size: 11px !important;
    }
}

/* Admin Modal - Mobil */
@media (max-width: 768px) {
    #adminModal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 15px !important;
    }
    
    #adminModal h2 {
        font-size: 18px !important;
    }
    
    #adminModal h3 {
        font-size: 14px !important;
    }
    
    #adminModal .admin-section {
        padding: 15px !important;
    }
    
    #adminModal button {
        font-size: 13px !important;
        padding: 10px 16px !important;
    }
    
    #stokKontrol {
        flex-direction: column !important;
    }
    
    #stokKontrol > div {
        width: 100% !important;
        text-align: center;
    }
    
    #stokKontrol > div:last-child {
        justify-content: center !important;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    #adminModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px 12px 0 0 !important;
        position: fixed;
        bottom: 0;
        margin: 0;
        max-height: 90vh !important;
    }
    
    #adminModal h2 {
        font-size: 16px !important;
    }
    
    #adminModal .admin-section > div[style*="flex"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    #adminModal .admin-section label {
        width: 100% !important;
        font-size: 13px !important;
    }
    
    #adminModal .admin-section input[type="number"] {
        width: 100% !important;
    }
    
    #adminModal #stokTip,
    #adminModal #stokKw,
    #adminModal #stokDevir {
        min-width: 100% !important;
        margin-bottom: 8px;
    }
    
    #adminModal > .modal-content > .admin-section > div:last-child {
        flex-direction: column !important;
    }
    
    #adminModal > .modal-content > .admin-section > div:last-child button {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 8px;
    }
}

/* Bireysel Musteri Alanlari */
#bireyselMusteriGroup {
    background: #f0f9ff;
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

/* Bitti Butonu - Atolye */
.btn-bitti {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-bitti:hover {
    background: linear-gradient(135deg, #219a52 0%, #27ae60 100%);
}

.btn-bitti:active {
    transform: scale(0.98);
}

/* Gitti Butonu - Yonetici */
.btn-gitti {
    background: #9b59b6;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

#bireyselMusteriGroup .form-group {
    margin-bottom: 10px;
}

#bireyselMusteriGroup .form-group:last-child {
    margin-bottom: 0;
}

#bireyselMusteriGroup .form-label {
    color: #2980b9;
    font-weight: 600;
}

#bireyselMusteriGroup .form-input {
    border: 2px solid #3498db;
}

@media (max-width: 768px) {
    #bireyselMusteriGroup {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    #bireyselMusteriGroup .form-input {
        font-size: 16px;
        padding: 14px;
    }
}
/* AI Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   BELGE BUTONLARI - MOBIL UYUMLU
   ============================================ */

#belgeButonlari {
    display: none;
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    flex-direction: column;
    gap: 8px;
}

#belgeButonlari button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    white-space: nowrap;
}

#belgeButonlari button:hover {
    background: #1e8449;
    transform: scale(1.02);
}

#belgeButonlari button:active {
    transform: scale(0.98);
}

/* MOBIL - Butonlar alta */
@media (max-width: 768px) {
    #belgeButonlari {
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        transform: none !important;
        flex-direction: row !important;
        justify-content: center;
        gap: 5px;
        padding: 10px;
        background: rgba(255,255,255,0.95);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #e0e0e0;
    }
    
    #belgeButonlari button {
        flex: 1;
        max-width: 120px;
        padding: 10px 8px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    /* Alt bar için body padding */
    body.has-belge-bar {
        padding-bottom: 70px;
    }
    
    /* Motor listesi mobilde daha fazla padding */
    .motor-table-container {
        padding-bottom: 80px;
    }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    #belgeButonlari {
        left: 5px;
    }
    
    #belgeButonlari button {
        padding: 10px 12px;
        font-size: 12px;
    }
}
