﻿/* ==========================================
   ZEN SALES - Document Upload Styling
   ========================================== */

.zen-sales-documents {
    padding: 1rem 0;
}

.zen-sales-doc-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

    .zen-sales-doc-card:hover {
        border-color: #667eea;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
        transform: translateY(-2px);
    }

.zen-sales-doc-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .zen-sales-doc-header i {
        font-size: 1.25rem;
        color: #667eea;
    }

    .zen-sales-doc-header span {
        font-weight: 600;
        color: #495057;
        font-size: 0.95rem;
    }

.zen-sales-doc-body {
    padding: 1.5rem;
    /* min-height: 200px; */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.zen-sales-file-input {
    display: none;
}

.zen-sales-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    gap: 0.5rem;
}

    .zen-sales-upload-label:hover {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.05);
    }

    .zen-sales-upload-label i {
        font-size: 2rem;
        color: #667eea;
    }

    .zen-sales-upload-label span {
        color: #495057;
        font-weight: 500;
        font-size: 0.9rem;
    }

.zen-sales-file-types {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 400;
}

.zen-sales-preview {
    display: none;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

    .zen-sales-preview.active {
        display: block;
    }

/* File Preview Styles */
.zen-sales-file-preview {
    display: flex;
    align-items: center;
    padding: 4.21rem;
    gap: 1rem;
}

.zen-sales-file-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 2rem;
    flex-shrink: 0;
    /* color: white; */
}

    .zen-sales-file-icon.pdf {
        background: linear-gradient(135deg, #732828 0%, #ff0000 100%);
        color: white;
    }

    .zen-sales-file-icon.word {
        background: linear-gradient(135deg, #0e203d 0%, #0050ff 100%);
        color: white;
    }

    .zen-sales-file-icon.excel {
        background: linear-gradient(135deg, #112921 0%, #059669 100%);
        color: white;
    }

    .zen-sales-file-icon.image {
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
        color: white;
    }

.zen-sales-file-info {
    flex: 1;
    min-width: 0;
}

.zen-sales-file-name {
    font-weight: 600;
    color: #212529;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zen-sales-file-size {
    color: #6c757d;
    font-size: 0.8rem;
}

.zen-sales-file-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.zen-sales-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

    .zen-sales-action-btn.download {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
    }

        .zen-sales-action-btn.download:hover {
            background: #667eea;
            color: white;
            transform: scale(1.1);
        }

    .zen-sales-action-btn.remove {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }

        .zen-sales-action-btn.remove:hover {
            background: #ef4444;
            color: white;
            transform: scale(1.1);
        }

/* Image Preview */
.zen-sales-preview img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 300px;
    object-fit: contain;
    padding: 1rem;
}

.zen-sales-image-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.zen-sales-image-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

    .zen-sales-image-btn.view {
        background: rgba(102, 126, 234, 0.9);
        color: white;
    }

        .zen-sales-image-btn.view:hover {
            background: #667eea;
            transform: scale(1.1);
        }

    .zen-sales-image-btn.remove {
        background: rgba(239, 68, 68, 0.9);
        color: white;
    }

        .zen-sales-image-btn.remove:hover {
            background: #ef4444;
            transform: scale(1.1);
        }

/* SweetAlert Image Custom Style */
.zen-sales-swal-image {
    max-height: 80vh !important;
    object-fit: contain !important;
}

/* Responsive */
@media (max-width: 768px) {
    .zen-sales-doc-card {
        margin-bottom: 1rem;
    }

    .zen-sales-doc-body {
        min-height: 180px;
        padding: 1rem;
    }

    .zen-sales-upload-label {
        padding: 1.5rem 1rem;
    }

    .zen-sales-file-preview {
        padding: 1rem;
    }

    .zen-sales-file-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}
/* ==========================================
   ZEN SALES - File Viewer Popup
   ========================================== */

.zen-sales-viewer-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    animation: zenFadeIn 0.25s ease;
}

.zen-sales-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.zen-sales-viewer-container {
    position: relative;
    width: 95%;
    height: 95vh;
    max-width: 1600px;
    margin: 2.5vh auto;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: zenSlideUp 0.3s ease;
}

.zen-sales-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #158db1 0%, #1c89b0 100%);
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.zen-sales-viewer-title {
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 1rem;
}

.zen-sales-viewer-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.zen-sales-viewer-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

    .zen-sales-viewer-btn.download {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

        .zen-sales-viewer-btn.download:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }

    .zen-sales-viewer-btn.close {
        background: rgba(255, 255, 255, 0.15);
        color: white;
        padding: 0.5rem 0.75rem;
    }

        .zen-sales-viewer-btn.close:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        .zen-sales-viewer-btn.close i {
            font-size: 1.1rem;
        }

.zen-sales-viewer-content {
    flex: 1;
    overflow: hidden;
    background: #2a2a2a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PDF Viewer */
.zen-sales-pdf-viewer-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Image Viewer */
.zen-sales-image-viewer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #000;
}

    .zen-sales-image-viewer img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 4px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

/* Animations */
@keyframes zenFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zenSlideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Thumbnail Preview for Images */
.zen-sales-thumbnail-preview {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
}

    .zen-sales-thumbnail-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        in;
        */
    }

.zen-sales-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.zen-sales-thumbnail-preview:hover .zen-sales-thumbnail-overlay {
    background: rgba(0, 0, 0, 0.6);
    opacity: 1;
}

.zen-sales-overlay-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

    .zen-sales-overlay-btn:hover {
        transform: scale(1.15);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
    }

.zen-sales-file-info-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 0.5rem;
}

    .zen-sales-file-info-compact .zen-sales-file-name {
        flex: 1;
        min-width: 0;
        font-weight: 500;
        color: #495057;
        font-size: 0.85rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-bottom: 0;
    }

.zen-sales-file-actions-compact {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* View Button for Files */
.zen-sales-action-btn.view {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

    .zen-sales-action-btn.view:hover {
        background: #667eea;
        color: white;
        transform: scale(1.1);
    }

/* Responsive */
@media (max-width: 1200px) {
    .zen-sales-viewer-container {
        width: 98%;
        height: 98vh;
        margin: 1vh auto;
    }
}

@media (max-width: 768px) {
    .zen-sales-viewer-container {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .zen-sales-viewer-header {
        padding: 0.875rem 1rem;
    }

    .zen-sales-viewer-title {
        font-size: 0.9rem;
    }

    .zen-sales-viewer-btn.download span {
        display: none;
    }

    .zen-sales-viewer-btn {
        padding: 0.5rem 0.75rem;
    }

    .zen-sales-image-viewer {
        padding: 1rem;
    }

    .zen-sales-thumbnail-preview {
        height: 150px;
    }

    .zen-sales-overlay-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .zen-sales-viewer-header {
        padding: 0.75rem;
    }

    .zen-sales-viewer-btn i {
        font-size: 1rem;
    }

    .zen-sales-thumbnail-preview {
        height: 120px;
    }
}

/* Body scroll lock when popup is open */
body.zen-viewer-open {
    overflow: hidden;
}

/* Loading state */
.zen-sales-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
}
/* ========================================
       ZEN OFFER SECTION - FIRSAT ���NDE TEKL�F
       ======================================== */
.zen-offer-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.zen-offer-create-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.zen-offer-banner-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

    .zen-offer-banner-content i {
        font-size: 48px;
        opacity: 0.9;
    }

    .zen-offer-banner-content h5 {
        margin: 0 0 5px 0;
        font-size: 20px;
        font-weight: 700;
    }

    .zen-offer-banner-content p {
        margin: 0;
        opacity: 0.9;
        font-size: 14px;
    }

.zen-offer-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.zen-machine-selection {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.zen-offer-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}
/* ========================================
   ZEN UPDATE HISTORY - G�NCELLEME GE�M���
   ======================================== */

.zen-update-history-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    min-height: 400px;
}

.zen-update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.zen-update-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .zen-update-title i {
        font-size: 28px;
        color: #667eea;
    }

    .zen-update-title h4 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        color: #2d3748;
    }

.zen-update-add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

    .zen-update-add-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

    .zen-update-add-btn i {
        font-size: 18px;
    }

.zen-update-timeline {
    position: relative;
    padding-left: 40px;
}

    .zen-update-timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(to bottom, #667eea, #764ba2);
    }

.zen-update-item {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

    .zen-update-item:hover {
        /* transform: translateX(5px); */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        border-left-color: #667eea;
    }

    .zen-update-item::before {
        content: '';
        position: absolute;
        left: -35px;
        top: 24px;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: white;
        border: 3px solid #667eea;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

.zen-update-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.zen-update-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.zen-update-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.zen-update-user-details {
    flex: 1;
    min-width: 0;
}

.zen-update-username {
    font-weight: 600;
    color: #2d3748;
    font-size: 15px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zen-update-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-size: 13px;
    margin-top: 2px;
}

    .zen-update-datetime i {
        font-size: 12px;
    }

.zen-update-description {
    color: #4a5568;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.zen-update-empty {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

    .zen-update-empty i {
        font-size: 64px;
        margin-bottom: 20px;
        opacity: 0.5;
    }

    .zen-update-empty h5 {
        font-size: 18px;
        color: #718096;
        margin-bottom: 10px;
    }

    .zen-update-empty p {
        font-size: 14px;
        color: #a0aec0;
    }

/* Loading State */
.zen-update-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #667eea;
}

    .zen-update-loading i {
        font-size: 48px;
        animation: zen-spin 1s linear infinite;
    }

    .zen-update-loading p {
        margin-top: 15px;
        font-size: 14px;
        color: #718096;
    }

@keyframes zen-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .zen-update-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .zen-update-add-btn {
        width: 100%;
        justify-content: center;
    }

    .zen-update-timeline {
        padding-left: 30px;
    }

    .zen-update-item::before {
        left: -24px;
    }

    .zen-update-item-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================
   ZEN UPDATE DIALOG - A�IKLAMA G�R�� D�YALOG
   ======================================== */

.zen-update-dialog {
    border-radius: 16px !important;
}

    .zen-update-dialog .swal2-html-container {
        margin: 20px 0 !important;
    }

.zen-update-confirm-btn,
.zen-update-cancel-btn {
    padding: 12px 32px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
}

    .zen-update-confirm-btn:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    }

    .zen-update-cancel-btn:hover {
        transform: translateY(-2px) !important;
    }

/* Textarea stil iyile�tirmesi */
.zen-update-dialog .swal2-textarea:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}
