/**
 * NexLedger - Custom Styles
 */

/* Hover shadow effect */
.hover-shadow {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* Stat card left accent borders */
.border-left-primary { border-left: 4px solid var(--primary-color, #4e73df) !important; }
.border-left-success { border-left: 4px solid var(--success-color, #1cc88a) !important; }
.border-left-info    { border-left: 4px solid var(--info-color, #36b9cc) !important; }
.border-left-warning { border-left: 4px solid var(--warning-color, #f6c23e) !important; }
.border-left-danger  { border-left: 4px solid var(--danger-color, #e74a3b) !important; }

/* Stat card hover lift */
.summary-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Active nav item di sidebar */
.sidebar .nav-link i {
    font-size: 1.1rem;
}

/* Form focus */
.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Status badge */
.badge-status {
    font-size: 0.8rem;
    padding: 5px 10px;
}

/* Print styles */
@media print {
    .navbar, .sidebar, .sidebar-backdrop, .btn, .no-print {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ============================================ */
/* SELECT2 CUSTOM STYLES - NEXLEDGER             */
/* ============================================ */

/* Container */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.select2-container--bootstrap-5 .select2-selection:hover {
    border-color: #cbd5e0;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #4e73df;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.15);
}

/* Placeholder */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Arrow */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 10px;
}

/* Dropdown */
.select2-dropdown {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
    overflow: hidden;
    animation: select2FadeIn 0.2s ease;
}

@keyframes select2FadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search field */
.select2-search--dropdown .select2-search__field {
    border-radius: 8px !important;
    border: 2px solid #e2e8f0 !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #4e73df !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1) !important;
}

/* Results */
.select2-results__option {
    padding: 10px 14px !important;
    font-size: 0.875rem !important;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f7f8fa;
}

.select2-results__option:last-child {
    border-bottom: none;
}

.select2-results__option--highlighted {
    background: linear-gradient(135deg, #4e73df, #5a7de8) !important;
    color: white !important;
}

.select2-results__option--highlighted .coa-code {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
}

.select2-results__option--highlighted .badge {
    background: rgba(255,255,255,0.3) !important;
}

/* Group header */
.select2-results__group {
    font-weight: 700 !important;
    color: #4e73df !important;
    padding: 10px 14px !important;
    font-size: 0.78rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #f8f9fc !important;
    border-bottom: 2px solid #eef0f5;
}

/* CoA Code badge */
.coa-code {
    display: inline-block;
    font-family: 'SF Mono', 'Courier New', 'Consolas', monospace;
    background: #f0f0f5;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 8px;
    letter-spacing: 0.5px;
}

/* Loading */
.select2-container--loading .select2-selection__rendered {
    opacity: 0.6;
}

/* Clear button */
.select2-selection__clear {
    margin-right: 20px !important;
    font-size: 1.1rem !important;
    color: #a0aec0 !important;
    cursor: pointer;
}

.select2-selection__clear:hover {
    color: #e74a3b !important;
}

/* Multiple selection (jika dibutuhkan) */
.select2-selection--multiple .select2-selection__choice {
    background: #4e73df !important;
    border: none !important;
    color: white !important;
    border-radius: 20px !important;
    padding: 2px 10px !important;
    font-size: 0.8rem !important;
}

.select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255,255,255,0.7) !important;
    margin-right: 4px;
}

.select2-selection--multiple .select2-selection__choice__remove:hover {
    color: white !important;
    background: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .select2-dropdown {
        max-width: 90vw !important;
    }
    
    .select2-results__option {
        padding: 12px 10px !important;
        font-size: 0.85rem !important;
    }
}

/* Journal Row Animation */
.journal-row {
    transition: all 0.3s ease;
}

.journal-row:hover {
    background-color: #f8f9ff !important;
}

/* Input focus dalam row */
.journal-row .form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.15);
}

.journal-row .debit-input:focus {
    border-color: #1cc88a;
    box-shadow: 0 0 0 2px rgba(28, 200, 138, 0.15);
}

.journal-row .credit-input:focus {
    border-color: #f6c23e;
    box-shadow: 0 0 0 2px rgba(246, 194, 62, 0.15);
}