/* Modern ve Profesyonel Tasarım */
:root {
    --primary: #0d6efd;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --info-gradient: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar */
.navbar {
    background: var(--primary-gradient) !important;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    font-weight: 600;
}

.card-header.bg-success {
    background: var(--success-gradient) !important;
}

.card-header.bg-info {
    background: var(--info-gradient) !important;
}

/* Form Controls */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}

.btn-info {
    background: var(--info-gradient);
    box-shadow: 0 4px 15px rgba(13, 202, 240, 0.3);
}

/* Customer List */
.customer-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.customer-item {
    background: white;
    border: 2px solid #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.customer-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.customer-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.customer-item:hover::before {
    transform: scaleY(1);
}

.customer-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.customer-info h6 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.customer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.customer-actions .btn {
    border-radius: 8px;
    border-width: 2px;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.customer-actions .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.customer-actions .btn-outline-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* Invoice Styles */
.invoice-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.invoice-item {
    background: white;
    border: 2px solid #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.invoice-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--info-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.invoice-item:hover {
    border-color: var(--info);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.invoice-item:hover::before {
    transform: scaleY(1);
}

.invoice-avatar {
    width: 60px;
    height: 60px;
    background: var(--info-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.invoice-info h6 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.invoice-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.invoice-actions .btn {
    border-radius: 8px;
    border-width: 2px;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.invoice-actions .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.invoice-actions .btn-outline-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* Tab Navigation */
.nav-link.btn {
    background: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link.btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.nav-link.btn.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
    font-weight: 600;
}

/* Invoice List Scrollbar */
.invoice-list::-webkit-scrollbar {
    width: 6px;
}

.invoice-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.invoice-list::-webkit-scrollbar-thumb {
    background: var(--info);
    border-radius: 3px;
}

.invoice-list::-webkit-scrollbar-thumb:hover {
    background: #0a8cc8;
}

/* Badges */
.badge {
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Image Preview */
.image-preview {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Stats Cards */
.stat-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    opacity: 0.9;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Toast */
.toast {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Input Group */
.input-group .form-control {
    border-right: none;
}

.input-group-text {
    background: white;
    border-left: none;
    border-color: #e9ecef;
    color: var(--primary);
}

/* Detail Info */
.detail-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 120px;
}

.detail-value {
    color: #2c3e50;
    font-weight: 500;
    text-align: right;
    flex-grow: 1;
}

/* Scrollbar */
.customer-list::-webkit-scrollbar {
    width: 6px;
}

.customer-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.customer-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.customer-list::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Responsive */
@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .customer-item {
        padding: 1rem;
    }
    
    .customer-avatar {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

/* File Upload */
.form-control[type="file"] {
    padding: 0.6rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Success States */
.form-control.is-valid {
    border-color: var(--success);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

/* Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print Styles - Koyu Gri (Siyah Kartuş Olmadan Yazdırma) */
@media print {
    * {
        color: #333333 !important; /* Koyu gri - siyaha benzer */
        background: white !important;
        box-shadow: none !important;
        text-shadow: none !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
    
    body {
        font-family: 'Times New Roman', serif !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
        color: #333333 !important;
        background: white !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #222222 !important; /* Çok koyu gri başlıklar */
        font-weight: bold !important;
    }
    
    .modal-content,
    .modal-body,
    .card,
    .card-body {
        background: white !important;
        border: 1px solid #333333 !important;
        box-shadow: none !important;
    }
    
    .detail-label {
        color: #222222 !important;
        font-weight: bold !important;
    }
    
    .detail-value {
        color: #333333 !important;
    }
    
    .badge {
        color: #333333 !important;
        border: 1px solid #333333 !important;
        background: white !important;
    }
    
    .btn {
        display: none !important;
    }
    
    .navbar,
    .modal-header,
    .modal-footer {
        display: none !important;
    }
    
    .image-preview {
        max-width: 100% !important;
        height: auto !important;
        border: 2px solid #333333 !important;
    }
    
    .text-muted {
        color: #444444 !important; /* Orta koyu gri */
    }
    
    .form-text {
        color: #444444 !important;
    }
}

/* A4 Print Format Özel Stiller - Koyu Gri */
@media print {
    @page {
        size: A4;
        margin: 2cm;
    }
    
    .print-header {
        color: #222222 !important;
        font-size: 18pt !important;
        font-weight: bold !important;
        text-align: center !important;
        border-bottom: 3px solid #333333 !important;
        padding-bottom: 10pt !important;
        margin-bottom: 20pt !important;
    }
    
    .print-content {
        color: #333333 !important;
        font-size: 11pt !important;
    }
    
    .print-image {
        border: 2px solid #333333 !important;
        max-width: 8cm !important;
        height: auto !important;
        display: block !important;
        margin: 10pt auto !important;
    }
    
    .print-table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 10pt 0 !important;
    }
    
    .print-table td,
    .print-table th {
        border: 1px solid #333333 !important;
        padding: 8pt !important;
        color: #333333 !important;
    }
    
    .print-table th {
        background-color: white !important;
        font-weight: bold !important;
        color: #222222 !important;
    }
}
