/**
 * Koperasi Clean Theme - Bootstrap 5 Enterprise
 * Standardized styling adhering to pure Bootstrap 5 design principles.
 * Eliminates artificial gradients, erratic shadows, and non-standard overrides.
 */

:root {
    --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --kp-border-color: #e2e8f0;
    --kp-border-light: #f1f5f9;
    --kp-table-head-bg: #f8fafc;
    --kp-card-bg: #ffffff;
    --kp-text-muted: #64748b;
    --kp-text-heading: #0f172a;
}

/* Global Font & Baseline */
body {
    font-family: var(--bs-font-sans-serif) !important;
    background-color: #f8fafc !important;
    color: #334155;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tabular Numbers for Money & Numerical Data */
.font-tabular,
table td,
.amount-text,
.fs-3, .fs-4, .fs-5, .fs-6 {
    font-variant-numeric: tabular-nums;
}

/* Card Styling - Clean Solid Bootstrap 5 */
.card {
    background-color: var(--kp-card-bg);
    border: 1px solid var(--kp-border-color);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 1.25rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--kp-border-light);
    padding: 1rem 1.25rem;
}

.card-header h5,
.card-header .h5 {
    color: var(--kp-text-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.25rem;
}

/* Tables - Clean & High Legibility */
.table-responsive {
    border-radius: 0.375rem;
}

.table {
    color: #334155;
    border-color: var(--kp-border-light);
    margin-bottom: 0;
}

.table thead th,
.table-light th {
    background-color: var(--kp-table-head-bg) !important;
    color: var(--kp-text-muted) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--kp-border-color) !important;
    padding: 0.75rem 0.85rem;
    vertical-align: middle;
}

.table tbody td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--kp-border-light);
    vertical-align: middle;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Forms & Inputs */
.form-control,
.form-select {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    color: var(--kp-text-heading);
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: 0;
}

.form-control-sm,
.form-select-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
    border-radius: 0.25rem;
}

/* Badges - Standard Soft Bootstrap 5 */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge.bg-light-success,
.badge.bg-success-subtle {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0;
}

.badge.bg-light-warning,
.badge.bg-warning-subtle {
    background-color: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fde68a;
}

.badge.bg-light-danger,
.badge.bg-danger-subtle {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca;
}

.badge.bg-light-primary,
.badge.bg-primary-subtle {
    background-color: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe;
}

.badge.bg-light-info,
.badge.bg-info-subtle {
    background-color: #f0f9ff !important;
    color: #075985 !important;
    border: 1px solid #bae6fd;
}

.badge.bg-light-secondary,
.badge.bg-secondary-subtle {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1;
}

/* Buttons */
.btn {
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.45rem 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.15s ease-in-out;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

/* Avatars & Icons */
.avtar {
    width: 42px;
    height: 42px;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.avtar-sm {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
}

.avtar.bg-light-primary {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe;
}

.avtar.bg-light-success {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0;
}

.avtar.bg-light-warning {
    background-color: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fde68a;
}

.avtar.bg-light-danger {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca;
}

.avtar.bg-light-info {
    background-color: #f0f9ff !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd;
}

/* Modals - Clean Solid Header */
.modal-content {
    border-radius: 0.5rem;
    border: 1px solid var(--kp-border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid var(--kp-border-light);
    padding: 1rem 1.25rem;
}

.modal-header.bg-primary {
    background-color: #2563eb !important;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    border-top: 1px solid var(--kp-border-light);
    padding: 0.85rem 1.25rem;
}

/* Pagination */
.pagination .page-link {
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* Utility Helpers */
.cursor-pointer {
    cursor: pointer;
}
