/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #2c3e50;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.75rem;
}

h5 {
    color: #34495e;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

h6 {
    color: #34495e;
    font-weight: 600;
    font-size: 1rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    background: white;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 0.875rem;
    color: #7f8c8d;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

/* Table Styles */
.table-responsive {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.5rem;
    overflow-x: auto;
}

.table {
    background-color: white;
    font-size: 0.875rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.table thead {
    background-color: #34495e;
    color: white;
}

.table thead th {
    border: none;
    padding: 1rem 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: fit-content;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #ecf0f1;
    white-space: normal;
    word-wrap: break-word;
}

/* Specific column widths */
.table thead th:nth-child(1),
.table tbody td:nth-child(1) {
    min-width: 80px;
}

.table thead th:nth-child(2),
.table tbody td:nth-child(2) {
    min-width: 200px;
}

.table thead th:nth-child(3),
.table tbody td:nth-child(3) {
    min-width: 180px;
}

.table thead th:nth-child(4),
.table thead th:nth-child(5),
.table thead th:nth-child(6) {
    min-width: 80px;
}

.table thead th:nth-child(7),
.table tbody td:nth-child(7) {
    min-width: 200px;
}

.table thead th:nth-child(8) {
    min-width: 130px;
}

.table thead th:nth-child(9),
.table tbody td:nth-child(9) {
    min-width: 120px;
}

.table thead th:nth-child(10),
.table thead th:nth-child(11) {
    min-width: 120px;
    white-space: nowrap;
}

.table tbody td:nth-child(10),
.table tbody td:nth-child(11) {
    min-width: 120px;
    white-space: nowrap;
}

.table thead th:nth-child(12),
.table tbody td:nth-child(12) {
    min-width: 150px;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-bordered {
    border: none;
}

/* Priority Cell Colors */
.priority-cell {
    font-weight: bold;
}

.priority-cell[data-priority="1"],
.priority-cell[data-priority="2"],
.priority-cell[data-priority="3"],
.priority-cell[data-priority="4"] {
    background-color: #9CCC65 !important;
}

.priority-cell[data-priority="5"],
.priority-cell[data-priority="6"],
.priority-cell[data-priority="7"],
.priority-cell[data-priority="8"],
.priority-cell[data-priority="9"] {
    background-color: #FFEB3B !important;
}

.priority-cell[data-priority="10"],
.priority-cell[data-priority="11"],
.priority-cell[data-priority="12"],
.priority-cell[data-priority="13"],
.priority-cell[data-priority="14"] {
    background-color: #FF9800 !important;
}

.priority-cell[data-priority="15"],
.priority-cell[data-priority="16"],
.priority-cell[data-priority="17"],
.priority-cell[data-priority="18"],
.priority-cell[data-priority="19"],
.priority-cell[data-priority="20"],
.priority-cell[data-priority="21"],
.priority-cell[data-priority="22"],
.priority-cell[data-priority="23"],
.priority-cell[data-priority="24"],
.priority-cell[data-priority="25"] {
    background-color: #EF5350 !important;
    color: white;
}

/* Status Select Styles */
.status-select {
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    background-color: white;
    min-width: 130px;
    text-overflow: clip;
    white-space: nowrap;
}

.status-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* Status badge colors */
.status-terbuka {
    background-color: #E3F2FD;
    color: #0D47A1;
    border-color: #90CAF9;
}

.status-dalam-proses {
    background-color: #FFF9C4;
    color: #F57F17;
    border-color: #FFF176;
}

.status-ditutup {
    background-color: #C8E6C9;
    color: #1B5E20;
    border-color: #81C784;
}

/* Matrix Table Colors */
.bg-success {
    background-color: #9CCC65 !important;
}

.bg-warning {
    background-color: #FFEB3B !important;
}

.bg-orange-light {
    background-color: #FFB74D !important;
}

.bg-orange {
    background-color: #FF9800 !important;
}

.bg-danger {
    background-color: #EF5350 !important;
    color: white;
}

/* Risk Matrix Styling */
.risk-matrix-container {
    display: inline-block;
    position: relative;
    margin-left: 80px;
}

.risk-matrix-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.y-axis-label {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: #5a6c7d;
    white-space: nowrap;
}

.x-axis-label {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: #5a6c7d;
    margin-top: 0.75rem;
    text-align: center;
}

.risk-matrix-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.risk-matrix-table thead th {
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    padding: 0.75rem;
    font-weight: 600;
    color: #34495e;
}

.risk-matrix-table tbody td {
    border: 2px solid #bdc3c7;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.risk-matrix-table .matrix-corner {
    background-color: #bdc3c7;
    border: 2px solid #bdc3c7;
}

.risk-matrix-table .matrix-row-label {
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    font-weight: 700;
    color: #34495e;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-dark {
    background-color: #2c3e50;
    color: white;
}

.btn-dark:hover {
    background-color: #1a252f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #229954;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39,174,96,0.3);
}

.btn-primary {
    background-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #ecf0f1;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

.modal-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #ecf0f1;
    padding: 1.5rem;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: #34495e;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #b2bec3;
}

/* Range Slider */
.form-range::-webkit-slider-thumb {
    background-color: #1f77b4;
}

.form-range::-moz-range-thumb {
    background-color: #1f77b4;
}

/* Footer */
footer {
    margin-top: 3rem;
    background-color: white;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .table {
        font-size: 0.8rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
}

/* Chart Container */
#scatterChart {
    min-height: 500px;
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Section Containers */
.section-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

/* Header Section */
.header-section {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-section h1 {
    font-size: 1.5rem;
}

.header-section .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.header-section .badge {
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

.header-section .d-flex {
    gap: 0.5rem;
}

/* Divider */
hr {
    border: none;
    border-top: 1px solid #ecf0f1;
    margin: 2rem 0;
}

/* Badge Styles */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Guide Table */
.guide-table {
    font-size: 0.875rem;
}

.guide-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #34495e;
    padding: 0.75rem;
    border: none;
}

.guide-table td {
    padding: 0.75rem;
    border: none;
}

/* Risk Matrix Table - No borders */
.guide-table.table-bordered {
    border: none !important;
}

.guide-table.table-bordered th,
.guide-table.table-bordered td {
    border: 1px solid #fff !important;
}

.guide-table.table-bordered thead th {
    border-bottom: 2px solid #dee2e6 !important;
}

.guide-table.table-bordered tbody tr:last-child td {
    border-bottom: 1px solid #fff !important;
}

/* Download Section */
.download-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

/* Info Text */
.info-text {
    color: #7f8c8d;
    font-size: 0.875rem;
}

/* Icon Styles */
.bi {
    vertical-align: -0.125em;
}
