/* public/css/dashboard.css */
body {
    background-color: #F6F8ED;
}

.dashboard {
    background-color: #F6F8ED;
}

.btn-tab {
    background-color: #EAEDDE;
    color: #000;
    border: 1px solid #EAEDDE;
}

.btn-tab.active {
    background-color: #75C566;
    color: #fff;
    border-color: #75C566;
}

.text-bg-default {
    background-color: #E9EFCE;
    color: #000;
}

.text-bg-approved {
    background-color: #2CAE4A;
    color: #fff;
}

.text-bg-review {
    background-color: #D9E74C;
    color: #000;
}

.text-bg-draft {
    background-color: #F6F8ED;
    color: #000;
}

.text-bg-achieved {
    background-color: #9EFFB0;
    color: #000;
}

.text-bg-achieve {
    background-color: #9EFFB0;
    color: #000;
}

.text-bg-unachieved {
    background-color: #FDBABC;
    color: #000;
}

/*
 * ===================================================================
 *  STATUS COLORING - Bootstrap Standard Classes
 *  For consistent status badge styling across the application
 * ===================================================================
 */

/* Uncreated Status - Abu (Gray) */
.text-bg-uncreated {
    background-color: #6c757d;
    color: #fff;
}

/* Draft Status - Abu (Gray) */
.text-bg-draft-custom {
    background-color: #6c757d;
    color: #fff;
}

/* Employee Confirmation Status - Kuning Semu (Yellowish) */
.text-bg-employee-confirmation {
    background-color: #ffc107;
    color: #000;
}

/* Submitted Status - Orange */
.text-bg-submitted {
    background-color: #fd7e14;
    color: #fff;
}

/* Approved Status - Hijau (Green) */
.text-bg-approved-custom {
    background-color: #198754;
    color: #fff;
}

/* Additional utility classes for status variations */
.text-bg-warning-subtle {
    background-color: #fd7e14;
    color: #fff;
}

/* Standard Bootstrap status badge classes for KPI status indicators */
.text-bg-secondary {
    background-color: #6c757d;
    color: #fff;
}

.text-bg-warning {
    background-color: #ffc107;
    color: #000;
}

.text-bg-success {
    background-color: #198754;
    color: #fff;
}

.table-performance {
    width: 100%;
    border-collapse: collapse;
}

.table-performance tr td {
    background-color: #F6F8ED;
}

.form-control {
  background-color: #EAEDDE; /* Default beige color */
  border: none;
  border-radius: 20px; 
  width: 100%;
  color: #00203F; /* Dark text color for good contrast */
  box-sizing: border-box; /* Ensures padding doesn't affect the total width */
  transition: background-color 0.2s ease-in-out;
}

.form-control:focus {
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 32, 63, 0.2);
}

.form-control--target {
  background-color: #E9EFCE;
}

.form-control--realization {
  background-color: #BAC879;
  color: #FFFFFF;
}

/*
 * ===================================================================
 *  CUSTOM SELECT2 STYLING to match .form-control
 *  Color Scheme: Default (#EAEDDE)
 * ===================================================================
 */

/* --- The Main Selection Box --- */
.select2-container--default .select2-selection--single {
  background-color: #EAEDDE;
  border: none; /* Remove default border */
  border-radius: 20px; /* Match the pill shape */
  box-sizing: border-box;
}

/* --- The Selected Text --- */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #00203F; /* Dark blue text color */
  padding-left: 20px; /* Match form-control padding */
  padding-right: 40px; /* Leave space for the custom arrow */
}

/* --- The Dropdown Arrow --- */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  position: absolute;
  top: 1px;
  right: 15px; /* Position arrow on the right */
  width: 20px;
}

/* Remove the default arrow and use a custom SVG background image */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: transparent; /* Hide the default triangle */
  border-style: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2300203F' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1em;
  width: 100%;
  height: 100%;
  margin: 0;
  top: 0;
  left: 0;
}

/* --- Focus State --- */
.select2-container--default.select2-container--focus .select2-selection--single {
  /* Use box-shadow for a modern focus ring, matching other inputs */
  box-shadow: 0 0 0 3px #B0B8C8;
}

/* --- The Dropdown Panel --- */
.select2-container--default .select2-dropdown {
  background-color: #EAEDDE; /* Match the input background */
  border: 1px solid #B0B8C8; /* A soft border for the dropdown */
  border-radius: 10px; /* Softer radius for the dropdown */
  margin-top: 5px; /* Add some space between the input and dropdown */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Search Box inside the Dropdown --- */
.select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #F8F9F5; /* A slightly different background for the search */
  border: 1px solid #B0B8C8;
  border-radius: 10px;
  color: #00203F;
  outline: none; /* Remove outline on focus */
}

/* --- Dropdown Options --- */
.select2-container--default .select2-results__option {
  color: #00203F;
}

/* Highlighted/Hover option */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #BAC879; /* Use the 'realization' green for hover */
  color: #FFFFFF; /* White text for contrast */
}

/* Selected option in a multi-select */
.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: #E9EFCE; /* Use the 'target' green for selected */
  color: #00203F;
}

.badge {
  font-size: 14px !important;
}

/*
 * ===================================================================
 *  KPI TARGET INPUT TABLE STYLING
 *  For improved monthly period target input layout
 * ===================================================================
 */

/* Monthly period target table improvements */
.table_input_target {
    width: 100%;
    border-collapse: collapse;
}

.table_input_target td {
    background-color: #F6F8ED;
    vertical-align: top;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
}

.table_input_target .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #495057;
}

.table_input_target .form-control {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
}

/* Responsive improvements for monthly tables */
@media (max-width: 1200px) {
    .table_input_target td {
        padding: 0.25rem;
    }
    
    .table_input_target .form-label {
        font-size: 0.75rem;
    }
    
    .table_input_target .form-control {
        font-size: 0.75rem;
        padding: 0.25rem 0.375rem;
    }
}

/* Target container specific styles */
.target_input_container .table-responsive {
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/*
 * ===================================================================
 *  KPI DETAIL COLLAPSE STYLING
 *  For subordinate KPI detail collapse in table rows
 * ===================================================================
 */

/* KPI Detail collapse container */
.collapse-row {
    border: none !important;
    background: transparent !important;
}

.collapse-row td {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.kpi-detail-container {
    min-height: 50px;
    animation: fadeIn 0.4s ease-in-out;
    width: 100%;
}

.kpi-detail-container .card-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 
        inset 0 1px 3px rgba(0,0,0,0.1),
        0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #dee2e6;
    margin: 8px;
    padding: 1.5rem;
}

/* Manual collapse styles - no Bootstrap */
.collapse {
    display: none;
    transition: all 0.35s ease;
}

.collapse.show {
    display: block !important;
}

/* Smooth animations for collapse */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Style for the collapse content */
.kpi-detail-container .table {
    margin-bottom: 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.kpi-detail-container .table th {
    background-color: #f1f3f4;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-weight: 600;
}

.kpi-detail-container .table td {
    background-color: white;
    border-color: #f8f9fa;
    vertical-align: middle;
}

.kpi-detail-container .card {
    border: 1px solid #e3e6f0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    border-radius: 10px;
}

.kpi-detail-container .card-header {
    background: linear-gradient(135deg, #01814E 0%, #A8CB5E 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

h6.mb-0 {
    color: white !important;
}

/* Button state changes for better UX */
.btn-detailkpi {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-detailkpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-detailkpi:hover::before {
    left: 100%;
}

.btn-detailkpi.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Loading spinner improvements */
.kpi-detail-container .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.3em;
}

/* Enhanced modern UI for KPI detail content */
.kpi-detail-modern-container {
    padding: 0 !important;
    margin: 0 !important;
}

/* Simple KPI Detail Container Styles */
.kpi-detail-wrapper {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 8px;
    padding: 0;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.kpi-detail-container {
    padding: 0;
    margin: 0;
}

.kpi-detail-container .card {
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.kpi-detail-container .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 16px;
}

.kpi-detail-container .card-body {
    padding: 16px;
}

.kpi-detail-container .table {
    margin-bottom: 0;
}

.kpi-detail-container .table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f4;
}

.kpi-detail-container .table tbody tr:hover {
    background-color: #f8f9fa;
}

.kpi-detail-container .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kpi-detail-container {
        font-size: 0.875rem;
    }
    
    .kpi-detail-container .card-body {
        padding: 12px;
    }
    
    .kpi-detail-container .table {
        font-size: 0.8rem;
    }
    
    .kpi-detail-container .table td {
        padding: 6px 8px;
    }
}
    
    .kpi-detail-modern-container .card-body {
        padding: 16px;
    }
    
    .kpi-detail-modern-container .table {
        font-size: 0.8rem;
    }
    
    .info-item {
        margin-bottom: 16px !important;
    }

.card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  }