/**
 * Keşif CRM - Minimal Full-Width Tasarım
 * WhatsApp yanında kullanım için optimize edilmiş
 */

:root {
    --primary-color: #0066FF;
    --primary-color-dark: #0052CC;
    --primary-color-darker: #003D99;
    --secondary-color: #4A4A4A;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f1f5f9;
    --border-color: #e2e8f0;
    --bg-color: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --border-radius: 6px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--dark-color);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
}

/* Responsive: Küçük ekran (WhatsApp yanında) - Minimize */
@media (max-width: 1200px) {
    .container {
        padding: 8px;
    }
    
    header {
        margin-bottom: 8px;
        padding: 8px 12px;
    }
    
    header > div {
        flex-direction: column;
        gap: 10px;
    }
    
    header h1 {
        display: none; /* PACKDOOR PORTAL başlığını küçük ekranda gizle */
    }
    
    .search-form {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        margin: 0;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 6px;
    }
    
    .header-right .btn {
        flex: 1;
        justify-content: center;
        padding: 6px 8px;
        font-size: 11px;
        min-width: 0;
    }
    
    .search-input {
        font-size: 12px;
        padding: 8px 30px 8px 28px;
    }
    
    .export-buttons {
        gap: 4px !important;
        margin-bottom: 8px !important;
        flex-wrap: wrap;
    }
    
    .export-buttons .btn-sm {
        padding: 4px 6px !important;
        font-size: 10px !important;
        min-width: 32px;
        flex: 0 0 auto;
    }
    
    .export-buttons span[style*="|"] {
        display: none !important; /* Mobilde ayırıcıyı gizle */
    }
    
    .filter-container {
        margin-bottom: 8px;
    }
    
    .filter-row {
        gap: 8px;
    }
    
    .form-select {
        font-size: 11px;
        padding: 4px 6px;
    }
    
    .stats-box {
        gap: 6px;
        margin-bottom: 8px;
    }
    
    .stat-item {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .stat-label {
        font-size: 8px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .kesif-card {
        padding: 6px;
        margin-bottom: 6px;
    }
    
    .kesif-card-header {
        gap: 6px;
    }
    
    .kesif-tel,
    .kesif-adi {
        font-size: 11px;
    }
    
    .durum-select,
    .atanan-select,
    .arayan-select {
        padding: 2px 4px;
        font-size: 7px;
        min-width: 45px;
    }
    
    .atanan-select,
    .arayan-select {
        max-width: 55px;
    }
    
    .kesif-value {
        font-size: 11px;
        padding: 2px 4px;
    }
}

/* Responsive: Büyük ekran - Küçük ekran tasarımını koru, sadece padding artır */
@media (min-width: 1201px) {
    .container {
        max-width: 100%;
        padding: 12px;
    }
    
    header h1 {
        display: block;
        font-size: 18px;
    }
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    margin: 0;
}

header {
    padding: 12px 16px;
    background: white;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 16px;
}

header > div {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    flex-wrap: wrap;
}

header h1 {
    color: var(--dark-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex-shrink: 0;
}

header h1 i {
    margin-right: 6px;
    color: var(--primary-color);
}

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

.search-form {
    flex: 1;
    max-width: 400px;
    min-width: 250px;
    margin: 0 15px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-box i.fa-search {
    position: absolute;
    left: 10px;
    color: var(--secondary-color);
    font-size: 13px;
    z-index: 1;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 35px 10px 32px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: white;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.search-clear:hover {
    color: var(--danger-color);
}

.stats-box {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3px 4px;
    background: var(--light-color);
    border-radius: 3px;
    border: 1px solid var(--border-color);
    min-width: 50px;
    flex: 1;
}

.stat-label {
    font-size: 7px;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 1px;
    line-height: 1.2;
}

.stat-value {
    font-size: 10px;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
}

.stat-bekleme .stat-value {
    color: var(--warning-color);
}

.stat-tekrar .stat-value {
    color: #06b6d4;
}

.stat-ileri .stat-value {
    color: #8b5cf6;
}

.stat-isalindi .stat-value {
    color: var(--success-color);
}

.stat-olumsuz .stat-value {
    color: var(--danger-color);
}

/* Filtre Container */
.filter-container {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.stats-container {
    margin-bottom: 12px;
}

/* Başarı Oranı Container */
.success-rate-container {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.success-rate-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    min-width: 70px;
}

.success-rate-label {
    font-size: 9px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.success-rate-value {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.success-rate-value.positive {
    color: var(--primary-color);
}

.success-rate-value.negative {
    color: #e74c3c;
}

.filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: nowrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 120px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-group label i {
    color: var(--primary-color);
    font-size: 10px;
}

.filter-select {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 13px;
    font-family: inherit;
    background: white;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

/* Butonlar - Kompakt */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-color-dark);
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 10px;
}

.btn-whatsapp {
    background: var(--primary-color);
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: white;
}

.kesif-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.action-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-email {
    background: #3b82f6;
    color: white;
}

.btn-email:hover {
    background: #2563eb;
}

.bulk-select-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: white;
    transition: all 0.2s;
}

.bulk-select-checkbox:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.bulk-select-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.bulk-select-checkbox input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Notlar Bölümü */
.notes-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notes-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notes-list {
    max-height: 200px;
    overflow-y: auto;
}

.note-item {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 6px;
}

.note-text {
    font-size: 12px;
    color: var(--dark-color);
    margin-bottom: 6px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--secondary-color);
    gap: 8px;
}

.note-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 10px;
}

.note-delete:hover {
    color: #dc2626;
}

/* Dosyalar Bölümü */
.files-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.files-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-upload-area {
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 11px;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 102, 255, 0.05);
}

.file-upload-input {
    display: none;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-item {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-item a:hover {
    text-decoration: underline;
}

.file-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 10px;
}

.file-delete:hover {
    color: #dc2626;
}

/* WhatsApp Modal */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.modal-content-whatsapp {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--light-color);
    color: var(--dark-color);
}

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-edit {
    background: var(--warning-color);
    color: white;
    padding: 4px 10px;
    font-size: 11px;
}

.btn-edit:hover {
    background: #d97706;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
    padding: 4px 10px;
    font-size: 11px;
}

.btn-delete:hover {
    background: #dc2626;
}

/* Alert Mesajları - Kompakt */
.alert {
    padding: 10px 12px;
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 3px solid var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid var(--danger-color);
}

/* Keşif Listesi - Kompakt */
.kesif-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kesif-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.kesif-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.kesif-card-header {
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--light-color);
    transition: var(--transition);
}

.kesif-card-header:hover {
    background: #e2e8f0;
}

.kesif-info {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.kesif-main-info {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.kesif-status-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.kesif-tel,
.kesif-adi {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 12px;
}

.copy-kesif-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 4px;
}

.copy-kesif-btn:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.copy-kesif-btn i {
    font-size: 11px;
}

.kesif-tel i,
.kesif-adi i {
    color: var(--primary-color);
    font-size: 10px;
}

.kesif-durum,
.kesif-atanan,
.kesif-arayan {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.kesif-value {
    min-width: 100px;
    padding: 2px 4px;
    border-radius: 3px;
    outline: none;
}

.kesif-value:focus {
    background: #fff3cd;
    border: 1px solid var(--primary-color);
}

.kesif-textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.4;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    margin: 0;
    box-sizing: border-box;
    background: var(--light-color);
    color: var(--dark-color);
}

.kesif-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
    background: #fff;
}

.kesif-mesaj {
    white-space: normal !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 4px 8px !important;
    font-size: 11px;
    line-height: 1.3 !important;
    display: block !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.kesif-mesaj:empty {
    min-height: 0 !important;
    height: auto !important;
    padding: 4px 8px !important;
    display: block !important;
    margin: 0 !important;
}

.kesif-mesaj:empty:before {
    content: '';
    display: none !important;
}

.kesif-mesaj * {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    display: inline !important;
    vertical-align: baseline !important;
    border: none !important;
    background: transparent !important;
}

.kesif-mesaj br {
    display: block !important;
    content: "" !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    height: 0 !important;
    font-size: 0 !important;
}

.kesif-mesaj p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
}

.kesif-mesaj p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

.kesif-mesaj p:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.kesif-mesaj p:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.kesif-mesaj div {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    display: inline !important;
    min-height: 0 !important;
    height: auto !important;
}

.kesif-mesaj div:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

.kesif-mesaj span {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    display: inline !important;
}

.durum-select,
.atanan-select,
.arayan-select {
    padding: 2px 4px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--secondary-color);
    color: white;
    cursor: pointer;
    outline: none;
    line-height: 1.2;
}

/* Durum renkleri */
.durum-select[data-field="durum1"],
.durum-select-inline[data-field="durum1"],
.durum-select[data-field="durum2"],
.durum-select-inline[data-field="durum2"] {
    background: #6b7280; /* Default gri */
}

.durum-select option[value="Bekleme"],
.durum-select-inline option[value="Bekleme"] {
    background: #f59e0b; /* Sarı/Turuncu */
    color: white;
}

.durum-select option[value="Keşif"],
.durum-select-inline option[value="Keşif"] {
    background: #3b82f6; /* Mavi */
    color: white;
}

.durum-select option[value="İş Alındı"],
.durum-select-inline option[value="İş Alındı"] {
    background: #10b981; /* Yeşil */
    color: white;
}

.durum-select option[value="Olumsuz"],
.durum-select-inline option[value="Olumsuz"] {
    background: #ef4444; /* Kırmızı */
    color: white;
}

.durum-select option[value="İleri Tarih"],
.durum-select-inline option[value="İleri Tarih"] {
    background: #8b5cf6; /* Mor */
    color: white;
}

/* Selected duruma göre renk - JavaScript ile dinamik */
.durum-select[data-selected="Bekleme"],
.durum-select-inline[data-selected="Bekleme"] {
    background: #f59e0b !important;
}

.durum-select[data-selected="Keşif"],
.durum-select-inline[data-selected="Keşif"] {
    background: #3b82f6 !important;
}

.durum-select[data-selected="İş Alındı"],
.durum-select-inline[data-selected="İş Alındı"] {
    background: #10b981 !important;
}

.durum-select[data-selected="Olumsuz"],
.durum-select-inline[data-selected="Olumsuz"] {
    background: #ef4444 !important;
}

.durum-select[data-selected="İleri Tarih"],
.durum-select-inline[data-selected="İleri Tarih"] {
    background: #8b5cf6 !important;
}

.durum-select option[value="T. ARA"],
.durum-select-inline option[value="T. ARA"],
.durum-select option[value="Tekrar Aranacak"],
.durum-select-inline option[value="Tekrar Aranacak"] {
    background: #06b6d4; /* Cyan */
    color: white;
}

.durum-select[data-selected="T. ARA"],
.durum-select-inline[data-selected="T. ARA"],
.durum-select[data-selected="Tekrar Aranacak"],
.durum-select-inline[data-selected="Tekrar Aranacak"] {
    background: #06b6d4 !important;
}

.atanan-select {
    background: #6366f1;
    min-width: 50px;
    max-width: 60px;
    padding: 2px 4px;
    font-size: 8px;
}

.arayan-select {
    background: #8b5cf6;
    min-width: 50px;
    max-width: 60px;
    padding: 2px 4px;
    font-size: 8px;
}

.atanan-select option,
.arayan-select option {
    padding: 4px 6px;
    font-size: 10px;
    background: white;
    color: var(--dark-color);
}

.durum-select:hover,
.atanan-select:hover,
.arayan-select:hover {
    opacity: 0.9;
}

.durum-select:focus,
.atanan-select:focus,
.arayan-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2);
}

.durum-select option {
    background: white;
    color: var(--dark-color);
    text-transform: none;
    padding: 4px 6px;
    font-size: 11px;
}

.toggle-details {
    background: none;
    border: none;
    font-size: 10px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 2px 4px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 28px;
    min-height: 28px;
    position: relative;
}

/* FontAwesome ikon bazen görünmeyebiliyor; ok'u CSS ile garanti çiz */
.toggle-details i {
    display: none !important;
}

.toggle-details::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg); /* aşağı ok */
    display: block;
}

.toggle-details.active::after {
    transform: rotate(-135deg); /* yukarı ok */
}

.toggle-details:hover {
    transform: scale(1.1);
}

.toggle-details.active i {
    transform: rotate(180deg);
}

/* Keşif Detayları - Kompakt */
.kesif-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.kesif-details.active {
    max-height: 8000px;
    padding: 8px 10px;
    border-top: 1px solid var(--border-color);
}

.detail-grid,
.kesif-details .detail-grid,
div.detail-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-item.full-width {
    grid-column: 1 / -1 !important;
}

/* Mesaj alanı full width - detail-item içinde, mesaj div'i değil */
.detail-item.full-width {
    grid-column: 1 / -1 !important;
}

.detail-item label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    text-transform: uppercase;
}

.detail-item label i {
    color: var(--primary-color);
    font-size: 9px;
}

.detail-item div {
    color: var(--dark-color);
    padding: 4px 8px;
    background: var(--light-color);
    border-radius: 3px;
    font-size: 11px;
    min-height: 28px;
    display: flex;
    align-items: flex-start;
}

.detail-item .kesif-textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.4;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    margin: 0;
    box-sizing: border-box;
    background: var(--light-color);
    color: var(--dark-color);
}

.detail-item .kesif-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
    background: #fff;
}

/* Genişlik/Yükseklik input'ları için küçük stil */
.detail-item .genislik-input,
.detail-item .yukseklik-input {
    padding: 3px 6px !important;
    font-size: 10px !important;
    min-height: 22px !important;
    height: 22px !important;
    line-height: 1.2 !important;
}

.detail-item .metrekare-display {
    font-size: 10px !important;
    min-width: 45px !important;
}

.detail-item .kesif-mesaj {
    background: var(--light-color) !important;
    padding: 4px 8px !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-wrap: break-word;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    display: block !important;
}

.detail-item div:empty {
    min-height: 0;
    padding: 4px 8px;
}

.detail-item .kesif-mesaj:empty {
    min-height: 0 !important;
    padding: 4px 8px !important;
    display: block !important;
    margin: 0 !important;
    height: auto !important;
}

.detail-item .kesif-mesaj:empty:before {
    content: '';
    display: none !important;
}

.detail-item .kesif-mesaj * {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    display: inline !important;
    vertical-align: baseline !important;
    border: none !important;
    background: transparent !important;
}

.detail-item .kesif-mesaj br {
    display: block !important;
    content: "" !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    height: 0 !important;
    font-size: 0 !important;
}

.detail-item .kesif-mesaj p {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    min-height: 0 !important;
    height: auto !important;
}

.detail-item .kesif-mesaj p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

.detail-item .kesif-mesaj p:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.detail-item .kesif-mesaj p:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.detail-item .kesif-mesaj div {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    min-height: 0 !important;
    height: auto !important;
}

.detail-item .kesif-mesaj div:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

.detail-item .kesif-mesaj span {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

/* Resim Yükleme Alanı */
.image-upload-container {
    width: 100%;
}

.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: var(--light-color);
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 102, 255, 0.05);
}

.image-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 102, 255, 0.1);
}

.image-upload-area i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

.image-upload-area p {
    margin: 0;
    font-size: 11px;
    color: var(--secondary-color);
}

.image-url-input {
    margin-top: 8px;
    font-size: 10px;
    padding: 4px 6px;
}

.image-url-input:empty:before {
    content: attr(placeholder);
    color: #999;
}

/* Resim Önizleme */
.image-preview-container {
    margin-bottom: 8px;
    position: relative;
}

.image-preview-small {
    max-width: 150px;
    max-height: 150px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    object-fit: cover;
    display: block;
}

.image-preview-small:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
    animation: fadeIn 0.3s;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    margin-top: 5%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s;
}

.image-modal-close:hover {
    color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Google Calendar Modal */
#calendarModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.calendar-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.calendar-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.calendar-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-modal-header .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.calendar-modal-header .modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.calendar-modal-body {
    padding: 20px;
    flex: 1;
    overflow: auto;
    position: relative;
}

.calendar-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.calendar-loading i {
    font-size: 24px;
    margin-right: 10px;
    color: var(--primary-color);
}

.calendar-container {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.calendar-fallback {
    padding: 40px 20px;
    text-align: center;
}

.calendar-fallback p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.durum-select-inline {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
    background: var(--light-color);
    color: var(--dark-color);
    cursor: pointer;
    outline: none;
    width: 100%;
}

.durum-select-inline:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2);
}

.kesif-input {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
    background: var(--light-color);
    color: var(--dark-color);
    outline: none;
    width: 100%;
}

.kesif-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2);
    background: white;
}

.image-preview {
    margin-bottom: 6px;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.image-preview-small {
    margin-top: 6px;
}

.image-preview-small img {
    max-width: 150px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.kesif-actions {
    display: flex;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

/* Form Stilleri - Kompakt ve Hızlı */
.form-container {
    width: 100%;
    max-width: 100%;
}

.kesif-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 11px;
}

.required {
    color: var(--danger-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
    width: 100%;
}

.form-select {
    background-color: white;
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-group small {
    color: var(--secondary-color);
    font-size: 11px;
}

/* Form satırları - yan yana - ÇOK ÖNEMLİ - ASLA DEĞİŞTİRME */
.form-row,
.kesif-form .form-row,
.form-container .form-row,
div.form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

.form-row .form-group,
.kesif-form .form-row .form-group,
.form-container .form-row .form-group,
div.form-row .form-group {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

/* Empty State - Kompakt */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 48px;
    color: var(--border-color);
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 16px;
}

/* Hatırlatmalar Sayfası */
.reminder-section {
    margin-bottom: 24px;
}

.reminder-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.reminder-title.today {
    color: #dc2626;
}

.reminder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reminder-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    transition: all 0.3s ease;
}

.reminder-card.urgent {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

.reminder-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reminder-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reminder-time,
.reminder-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.reminder-customer {
    font-size: 13px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.reminder-details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--secondary-color);
}

.reminder-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.reminder-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-calendar {
    background: #007AFF;
    color: white;
}

.btn-calendar:hover {
    background: #0051D5;
}

/* Hatırlatma Bildirimi */
.reminder-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #f59e0b;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    flex-wrap: wrap;
}

.reminder-notification i {
    font-size: 18px;
}

.reminder-notification span {
    flex: 1;
    font-size: 13px;
}

.reminder-link {
    color: white;
    text-decoration: underline;
    font-size: 12px;
    font-weight: 600;
}

.reminder-mark-read {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.reminder-mark-read:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
}

.reminder-mark-read i {
    font-size: 11px;
}

.reminder-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.reminder-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive - Mümkün olduğunca geniş */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }

    header {
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    
    header > div {
        flex-direction: column;
        gap: 8px;
    }

    header h1 {
        font-size: 16px;
        display: none;
    }
    
    .search-form {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
    }
    
    .header-right {
        width: 100%;
        display: flex;
        gap: 6px;
    }
    
    .header-right .btn {
        flex: 1;
        padding: 8px 6px;
        font-size: 11px;
        justify-content: center;
    }
    
    .export-buttons {
        gap: 4px !important;
        margin-bottom: 8px !important;
    }
    
    .export-buttons .btn-sm {
        padding: 5px 6px !important;
        font-size: 10px !important;
        min-width: 36px;
    }
    
    .export-buttons span[style*="|"] {
        display: none !important;
    }

    .filter-row {
        flex-wrap: wrap;
    }
    
    .filter-group {
        min-width: calc(33.333% - 8px);
        flex: 1 1 calc(33.333% - 8px);
    }

    .kesif-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Mobilde detay açma ikonunu büyüt (kullanıcı dokunabilsin) */
    .toggle-details {
        font-size: 16px;
        padding: 10px 10px;
        line-height: 1;
        touch-action: manipulation;
        min-width: 44px;
        min-height: 44px;
    }

    .kesif-card-header {
        touch-action: manipulation;
    }

    /* Form-row'lar her zaman yan yana kalsın - mobilde bile */
    .form-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .detail-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .kesif-actions {
        flex-direction: column;
    }
}

/* Dashboard Styles */
.dashboard-page {
    background: #f8fafc;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-subtitle {
    color: var(--secondary-color);
    font-size: 14px;
    margin: 0;
}

.dashboard-header-right .btn {
    padding: 10px 20px;
    font-size: 14px;
}

/* Stats Grid */
.dashboard-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid;
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-stat-card.stat-primary {
    border-left-color: #3b82f6;
}

.dashboard-stat-card.stat-success {
    border-left-color: #10b981;
}

.dashboard-stat-card.stat-danger {
    border-left-color: #ef4444;
}

.dashboard-stat-card.stat-warning {
    border-left-color: #f59e0b;
}

.dashboard-stat-card.stat-info {
    border-left-color: #8b5cf6;
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-primary .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-success .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-danger .stat-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-info .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-label {
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 8px 0;
}

.stat-percentage {
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
}

/* Charts Grid */
.dashboard-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-chart-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.chart-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.chart-card-body {
    height: 300px;
    position: relative;
}

/* Section Card */
.dashboard-section-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 32px;
}

.section-card-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.section-card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.section-card-body {
    padding-top: 8px;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.comparison-item {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.comparison-item.comparison-change {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-color: #3b82f6;
}

.comparison-label {
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 12px;
}

.comparison-main-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.comparison-main-value.positive {
    color: #10b981;
}

.comparison-main-value.negative {
    color: #ef4444;
}

.comparison-sub-value {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.comparison-detail {
    font-size: 13px;
    color: var(--secondary-color);
}

.comparison-detail.positive {
    color: #10b981;
    font-weight: 600;
}

.comparison-detail.negative {
    color: #ef4444;
    font-weight: 600;
}

/* Person Stats Grid */
.person-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.person-stat-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.person-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.person-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.person-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

.person-total-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.person-stat-numbers {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.person-stat-number {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
}

.person-stat-number.success {
    border-top: 3px solid #10b981;
}

.person-stat-number.danger {
    border-top: 3px solid #ef4444;
}

.person-stat-number i {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.person-stat-number.success i {
    color: #10b981;
}

.person-stat-number.danger i {
    color: #ef4444;
}

.person-stat-number span {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.person-stat-number small {
    display: block;
    font-size: 11px;
    color: var(--secondary-color);
}

.person-stat-progress {
    margin-top: 12px;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-label {
    font-size: 12px;
    color: var(--secondary-color);
    text-align: right;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 16px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-card-body {
        height: 250px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .person-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .btn,
    .toggle-details,
    .kesif-actions {
        display: none;
    }
    
    .kesif-details {
        max-height: none !important;
        padding: 8px !important;
    }
}
