/**
 * ============================================
 * ADMIN CUSTOM CSS - KOPERASIQU
 * ============================================
 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: #333;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Card Styles */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0 30px rgba(0,0,0,0.1) !important;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e3e6f0;
}

/* Border Left Cards */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

.border-left-secondary {
    border-left: 0.25rem solid #858796 !important;
}

/* Button Styles */
.btn {
    font-weight: 500;
    transition: all 0.3s;
}

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

.btn-group .btn {
    transform: none;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_length select {
    padding: 5px 10px;
    border: 1px solid #d1d3e2;
    border-radius: 5px;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 5px 10px;
    border: 1px solid #d1d3e2;
    border-radius: 5px;
    margin-left: 5px;
}

table.dataTable thead th {
    background: var(--light-color);
    font-weight: 600;
    border-bottom: 2px solid #e3e6f0;
}

table.dataTable tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Badge Styles */
.badge {
    padding: 5px 10px;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 5px;
}

/* Modal Styles */
.modal-header {
    border-bottom: 2px solid #e3e6f0;
}

.modal-footer {
    border-top: 2px solid #e3e6f0;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

/* Progress Bar */
.progress {
    height: 1.5rem;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    line-height: 1.5rem;
    font-weight: 600;
    font-size: 0.8rem;
}

/* User Avatar */
.user-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 2.5rem;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
}

/* Status Badges */
.status-active {
    background-color: var(--success-color);
    color: white;
}

.status-pending {
    background-color: var(--warning-color);
    color: #333;
}

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

/* Table Responsive */
.table-responsive {
    border-radius: 10px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

.rounded-lg {
    border-radius: 10px !important;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Print Styles */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 5px !important;
        margin-bottom: 5px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/**
 * ============================================
 * CSS CUSTOM - UNIT USAHA MODULE
 * ============================================
 * File CSS tambahan untuk modul Unit Usaha
 * Bisa digabungkan dengan admin.css atau sebagai file terpisah
 */

/* ============================================
   STATISTICS CARDS
============================================ */
.stats-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.stats-card:hover .stats-icon {
    transform: rotate(10deg) scale(1.1);
}

/* Icon Colors */
.stats-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stats-icon.bg-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.stats-icon.bg-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stats-icon.bg-info {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* ============================================
   FILTER SECTION
============================================ */
.card-header {
    border-bottom: 2px solid #f0f0f0;
}

.card-header h5 {
    color: #2c3e50;
    font-weight: 600;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-select,
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-select:focus,
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ============================================
   TABLE STYLING
============================================ */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.table tbody td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Badge Styling */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.badge.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
}

/* ============================================
   BUTTON STYLING
============================================ */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1.25rem;
}

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

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #868f96 0%, #596164 100%);
    border: none;
}

/* Button Group */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group-sm .btn i {
    font-size: 0.875rem;
}

/* ============================================
   MODAL STYLING
============================================ */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.modal-header.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.modal-header.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.modal-header.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.modal-header h5 {
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 2px solid #f0f0f0;
    padding: 1rem 1.5rem;
}

/* ============================================
   BREADCRUMB
============================================ */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

.breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ============================================
   PAGE HEADER
============================================ */
.container-fluid h2 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.container-fluid h2 i {
    font-size: 1.75rem;
    vertical-align: middle;
}

/* ============================================
   LOADING SPINNER
============================================ */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* ============================================
   DATATABLE CUSTOM
============================================ */
div.dataTables_wrapper div.dataTables_length select {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

div.dataTables_wrapper div.dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: #667eea !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: #667eea !important;
    color: white !important;
}

/* ============================================
   ALERT CUSTOM
============================================ */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-info {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    color: #00695c;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
============================================ */
@media (max-width: 768px) {
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .btn-group-sm {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group-sm .btn {
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* ============================================
   ANIMATION
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease;
}

/* ============================================
   SCROLLBAR CUSTOM
============================================ */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
    .btn, .modal, .sidebar, .top-navbar, .breadcrumb {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* ============================================
   UTILITY CLASSES
============================================ */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 5px 15px rgba(0,0,0,0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}