
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fa;
}

.header { background: #f0f2f5; padding: 15px; text-align: center; }

.container { max-width: 1700px; margin: 20px auto; display: flex; gap: 20px; padding: 0 10px; }

.form-box {padding: 20px; border-radius: 8px; height: fit-content; }

input, select { width: 100%; padding: 8px; margin: 5px 0 15px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
button { background: #8B0000; color: white; padding: 10px; border: none; width: 100%; cursor: pointer; border-radius: 4px; font-weight: bold; }
button:hover { background: #a00000; }

.result-box { flex: 1; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
table { border-collapse: collapse; width: 100%; margin: 15px 0; }
th { background: #8B0000; color: white; padding: 8px; text-align: left; font-size: 12px; }
td { padding: 6px 8px; border: 1px solid #ddd; font-size: 12px; }
tr:nth-child(even) { background: #f9f9f9; }

.tabs { display: flex; flex-wrap: wrap; border-bottom: 2px solid #8B0000; margin-bottom: 15px; }
.tab { padding: 8px 12px; cursor: pointer; background: #eee; border: 1px solid #ccc; border-bottom: none; margin-right: 2px; font-size: 12px; }
.tab.active { background: #8B0000; color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin: 20px 0; }
.chart-box { border: 2px solid #8B0000; padding: 10px; background: #fffef5; }
.chart-box h4 { margin: 0 0 10px 0; text-align: center; color: #8B0000; font-size: 14px; }
pre { background: #f5f5f5; padding: 10px; border-radius: 4px; overflow-x: auto; font-size: 11px; }
.loader { text-align: center; padding: 40px; color: #8B0000; font-weight: bold; }
h3 { color: #8B0000; border-bottom: 2px solid #8B0000; padding-bottom: 5px; margin-top: 25px; }
h4 { color: #555; margin: 15px 0 5px 0; }
.svg-chart { width: 100%; height: auto; }



#leftbar{
    width: 380px;
    z-index: 3;
}
#main{
    margin-left: 400px;
    margin-right: 20px;
    transition: all 0.3s ease;
}
@media screen and (max-width: 769px){
    #leftbar{
        width: 100% !important;
        max-width: 100%;
    }
    #main{
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

}


@media screen and (max-width: 600px){
    #leftbar{
        width: 100vw !important;
    }
    #main{
        width: 100vw !important;
    }

}

.scroll-container {
overflow-x: auto;        /* enables horizontal scroll */
-webkit-overflow-scrolling: touch; /* on mobile */
white-space: nowrap;     /* prevents wrapping */
max-width: 100%;         /* restricts to browser width */
}
.scroll-container::-webkit-scrollbar {
height: 8px;/* optional: style scrollbar */
}
.scroll-container::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 4px;
}
.scroll-wrapper {
position: relative;
max-width: 100%;
}
/* Scroll buttons */
.scroll-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: #007bff;
color: #fff;
border: none;
font-size: 20px;
padding: 5px 10px;
cursor: pointer;
border-radius: 4px;
opacity: 0.8;
transition: opacity 0.3s;
z-index: 5;
}
.scroll-btn:hover {
opacity: 1;
}
.scroll-btn.left { left: 5px; }
.scroll-btn.right { right: 5px; }
.table-scroll {
overflow-x: scroll;  /* */
-webkit-overflow-scrolling: touch;
white-space: nowrap;
max-width: 100%;
position: relative;
}

.table-scroll::-webkit-scrollbar {
height: 8px;/* optional: style scrollbar */
}

.table-scroll::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 4px;
}

.table-scroll table {
border-collapse: collapse;
width: max-content; /* allow table to expand naturally */
min-width: 100%; /* at least full width */
}

.table-scroll th{
background: #8B0000; color: white;
}

.table-scroll th,
.table-scroll td {
padding: 8px 12px;
border: 1px solid #ccc;
white-space: nowrap;
}

/* Sticky first column for ANY table */
.table-scroll th:first-child{
position: sticky;
left: 0;
background: #880000;  
z-index: 2;  
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}
/* Sticky first column for ANY table */
.table-scroll td:first-child {
position: sticky;
left: 0;
background: #f9f9f9;
z-index: 2;
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}
/* Sticky header row */
/*.table-scroll th {
position: sticky;
top: 0;
background: #eaeaea;
z-index: 3;
}*/


.tripataki td { text-align: center; padding: 8px; border: 1px solid #ccc; }
.tripataki.malefic { background: #ffebee; color: #c62828; }
.tripataki.benefic { background: #e8f5e9; color: #2e7d32; }

.tripataki { width: 100%; border-collapse: collapse; margin: 8px 0; }
.tripataki td,.tripataki th { text-align: center; padding: 8px; border: 1px solid #ddd; }
.tripataki td.malefic { background: #ffebee; color: #c62828; font-weight: 600; }
.tripataki td.benefic { background: #e8f5e9; color: #2e7d32; font-weight: 600; }

.tripataki-details { margin-top: 8px; }
.tripataki-details h5 { margin: 12px 0 4px; }
.tripataki-details.data-table { width: 100%; font-size: 0.9em; }
.tripataki-details.malefic-row { background: #fff5f5; }
.tripataki-details.benefic-row { background: #f1f8f4; }

.strong { background: #e8f5e9; }
.medium { background: #fff9c4; }
.weak { background: #ffebee; 

#saham-map { margin: 16px 0; border: 1px solid #ddd; padding: 10px; background: #fafafa; }
#saham-map svg { display: block; margin: 0 auto; }


.data-table {width:100%; border-collapse:collapse; margin:15px 0;}
.data-table th, .data-table td {border:1px solid #ddd; padding:8px; text-align:left;}
.data-table th {background:#f1f1f1; font-weight:bold;}
.data-table tr.strong {background:#e8f5e9;}
.data-table tr.weak {background:#ffebee;}
.data-table tr:hover {background:#f5f5f5


#yoga-guide .w3-table td {vertical-align: top;}
#yoga-guide h5 {margin-top: 0;}

#saham-guide .w3-table td {vertical-align: top;}
#saham-guide h5 {margin-top: 0;}
