/* Success message styling */
.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #155724;
    color: #155724;
    padding: 15px 20px;
    margin: 20px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* User info styling */
.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.user-info .btn.logout {
    padding: 6px 12px;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 4px;
}

/* Desktop user info styles */
@media (min-width: 768px) {
    .user-info {
        gap: 15px;
        margin-top: 10px;
        font-size: 1rem;
        flex-wrap: nowrap;
    }
    
    .user-info .btn.logout {
        padding: 8px 16px;
        font-size: 0.9rem;
        border-radius: 6px;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    padding: 10px;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: calc(100vh - 20px);
}

/* Desktop styles */
@media (min-width: 768px) {
    body {
        padding: 20px;
    }
    
    .container {
        max-width: 1200px;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: #fff;
    padding: 15px 10px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Header content with logo */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.header-logo {
    height: 80px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.3;
    text-align: center;
}

/* Desktop header styles */
@media (min-width: 768px) {
    .header {
        padding: 25px 20px;
        font-size: 1.5rem;
    }
    
    .header-content {
        gap: 20px;
        margin-bottom: 15px;
        flex-wrap: nowrap;
    }
    
    .header-logo {
        height: 100px;
        border-radius: 6px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
}

/* Mobile header styles */
@media (max-width: 767px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .header-logo {
        height: 70px;
    }
}

.info-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #c3e6ff 100%);
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    margin: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-box b {
    color: #2c3e50;
    font-size: 1rem;
}

.form-section {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border-radius: 8px 8px 0 0;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 1rem;
    margin: 15px 15px 0 15px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

form {
    background: #fff;
    border-radius: 0 0 8px 8px;
    padding: 15px;
    margin: 0 15px 15px 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Form note styling */
.form-note {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #856404;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 0 15px 15px 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-note p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Desktop form styles */
@media (min-width: 768px) {
    .info-box {
        border-radius: 12px;
        padding: 20px 25px;
        margin: 25px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    .info-box b {
        font-size: 1.1rem;
    }
    
    .form-section {
        border-radius: 12px 12px 0 0;
        padding: 15px 25px;
        font-size: 1.2rem;
        margin: 25px 25px 0 25px;
    }
    
    form {
        border-radius: 0 0 12px 12px;
        padding: 25px;
        margin: 0 25px 20px 25px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .form-note {
        border-radius: 8px;
        padding: 15px 25px;
        margin: 0 25px 20px 25px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .form-note p {
        font-size: 0.95rem;
    }
}

.form-note strong {
    font-weight: 600;
}

/* Info box styling */
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #1976d2;
    border-radius: 8px;
    padding: 15px 25px;
    margin: 0 25px 20px 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-box h4 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 1rem;
    font-weight: 600;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
    color: #1976d2;
}

.info-box li {
    margin-bottom: 5px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.info-box li:last-child {
    margin-bottom: 0;
}

.info-box strong {
    font-weight: 600;
}

/* Table header section with download button */
.table-header-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding: 0 15px;
}

.table-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

/* Download button styling */
.btn-download {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

.download-icon {
    font-size: 1rem;
}

/* Download buttons container */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* PDF download button styling */
.btn-download-pdf {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.btn-download-pdf:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Desktop table header styles */
@media (min-width: 768px) {
    .table-header-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 25px;
    }
    
    .table-title {
        font-size: 1.4rem;
        text-align: left;
    }
    
    .download-buttons {
        flex-direction: row;
        width: auto;
        gap: 15px;
    }
    
    .btn-download, .btn-download-pdf {
        padding: 12px 20px;
        font-size: 0.95rem;
        box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
        width: auto;
    }
    
    .btn-download-pdf {
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    }
    
    .btn-download:hover, .btn-download-pdf:hover {
        transform: translateY(-2px);
    }
    
    .btn-download:hover {
        box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
    }
    
    .btn-download-pdf:hover {
        box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
    }
    
    .download-icon {
        font-size: 1.1rem;
    }
}

/* Responsive design for download buttons */
@media (max-width: 768px) {
    .table-header-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .table-title {
        text-align: center;
        font-size: 1.2rem;
    }
    
    .download-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-download, .btn-download-pdf {
        justify-content: center;
        padding: 15px 20px;
    }
}

/* PDF download section styling */
.pdf-download-section {
    margin: 0 15px 15px 15px;
    display: flex;
    justify-content: center;
}

.pdf-download-section .btn-download-pdf {
    width: 100%;
    max-width: none;
    text-align: center;
}

/* Desktop PDF download section styles */
@media (min-width: 768px) {
    .pdf-download-section {
        margin: 0 25px 20px 25px;
    }
}

/* CSS tambahan untuk alignment yang sempurna */
.form-container {
    display: flex;
    flex-direction: column;
}

.form-section-wrapper {
    margin-bottom: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-height: 85px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.3;
    min-height: 40px;
    display: flex;
    align-items: flex-end;
}

input, select {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    height: 45px;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

/* Styling khusus untuk field readonly */
input[readonly] {
    background: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

/* Grid responsive untuk form */
@media (max-width: 1200px) {
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group {
        min-height: 75px;
    }
    
    .form-group label {
        min-height: 35px;
        font-size: 0.85rem;
    }
}

/* Layout form sesuai screenshot - diperbaiki untuk responsivitas */
.form-row-5 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
    align-items: end;
}

.form-row-6 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
    align-items: end;
}

.form-row-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
    max-width: 100%;
}

.form-row-single-field {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
    align-items: end;
}

.form-row-with-button {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
    align-items: end;
}

/* Desktop grid layouts */
@media (min-width: 768px) {
    .form-row-5 {
        grid-template-columns: 2.5fr 1.2fr 1fr 0.8fr 0.8fr;
        gap: 20px;
        margin-bottom: 25px;
    }

    .form-row-6 {
        grid-template-columns: 1fr 1fr 1fr 1.8fr 1.2fr 1.2fr;
        gap: 20px;
        margin-bottom: 25px;
    }

    .form-row-single-field {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
        gap: 20px;
        margin-bottom: 25px;
    }

    .form-row-with-button {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
        gap: 20px;
        margin-bottom: 25px;
    }
}

/* Tablet grid layouts */
@media (min-width: 480px) and (max-width: 767px) {
    .form-row-5 {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .form-row-6 {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .form-row-single-field {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .form-row-with-button {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

.form-row-with-button .form-group {
    grid-column: 1 / 2; /* Field rerata_bmp di kolom pertama */
}

.form-row-with-button .form-group-button {
    grid-column: 2 / 3; /* Tombol di kolom kedua */
    display: flex;
    flex-direction: column;
}

.form-row-with-button .form-group-button label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-row-normal {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row-normal .form-group {
    max-width: 350px;
    width: 100%;
}

.form-group-wide {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Form group styling yang diperbaiki */
.form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.3;
    word-wrap: break-word;
}

.form-group input, .form-group select {
    padding: 12px 14px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Input dengan spinner yang diperbaiki */
.input-with-spinner {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-spinner input {
    padding-right: 40px !important;
    width: 100%;
}

.spinner-buttons {
    position: absolute;
    right: 3px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 6px);
    top: 3px;
    z-index: 2;
}

.spinner-up, .spinner-down {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 0;
    font-size: 10px;
    cursor: pointer;
    width: 28px;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    user-select: none;
}

.spinner-up:hover, .spinner-down:hover {
    background: #e9ecef;
}

.spinner-up {
    border-top-right-radius: 6px;
    border-bottom: none;
}

.spinner-down {
    border-bottom-right-radius: 6px;
    border-top: none;
}

/* Range input styling */
.range-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-input-container input[type="range"] {
    flex: 1;
    height: 8px;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    border-radius: 5px;
    outline: none;
    
}

.range-input-container input[type="range"]::-webkit-slider-thumb {
    
    appearance: none;
    width: 18px;
    height: 18px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-value {
    min-width: 60px;
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 5px;
}

/* Field readonly styling */
input[readonly] {
    background: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed;
    border-color: #e9ecef !important;
}

/* Responsive untuk layout baru */
@media (max-width: 1400px) {
    .form-row-6 {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 1200px) {
    .form-row-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    .form-row-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row-5,
    .form-row-6 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-row-single {
        grid-template-columns: 1fr;
    }
}

.btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f4e79 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn.logout {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn.logout:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.table-container {
    margin: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 12px;
}

.table th {
    padding: 12px 6px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid #ddd;
    vertical-align: middle;
    line-height: 1.2;
}

.table th[style*="background: #3498db"] {
    background: #3498db !important;
    color: white !important;
}

.table th[style*="background: #e74c3c"] {
    background: #e74c3c !important;
    color: white !important;
}

.table th[style*="background: #27ae60"] {
    background: #27ae60 !important;
    color: white !important;
}

.table th[style*="background: #f39c12"] {
    background: #f39c12 !important;
    color: white !important;
}

.table th[style*="background: #ecf0f1"] {
    background: #ecf0f1 !important;
    color: #2c3e50 !important;
    font-size: 10px;
}

.table td {
    padding: 8px 6px;
    border: 1px solid #ddd;
    font-size: 11px;
    vertical-align: middle;
    line-height: 1.3;
}


.table tr:nth-child(even) {
    background: #f8f9fa;
}

.table tr:hover {
    background: #e8f4fd;
    transition: all 0.2s ease;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem;
}

/* Styling khusus untuk header tabel yang kompleks */
.table th[rowspan] {
    writing-mode: horizontal-tb;
    min-width: 80px;
}

/* Responsive untuk tabel */
@media (max-width: 1200px) {
    .table-container {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .table {
        min-width: 1400px;
    }
    
    .table th, .table td {
        font-size: 0.9rem; /* Increased from 0.8rem */
        padding: 8px 6px;
    }
}

.keterangan {
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    border-radius: 0 0 12px 12px;
    padding: 15px 25px;
    font-size: 0.95rem;
    color: #2c3e50;
    margin: 0 25px 20px 25px;
    border-top: 3px solid #3498db;
}

.logout-container {
    margin: 25px;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header {
        font-size: 1.3rem;
        padding: 18px 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 800px;
    }
}

/* Responsive design untuk layout form - diperbaiki */
@media (max-width: 1400px) {
    .form-row-5 {
        grid-template-columns: 2fr 1fr 1fr 0.8fr 0.8fr;
        gap: 15px;
    }
    
    .form-row-6, .form-row-single-field {
        grid-template-columns: 1fr 1fr 1fr 1.5fr 1fr 1fr;
        gap: 15px;
    }
}

@media (max-width: 1200px) {
    .form-row-5 {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 15px;
    }
    
    .form-row-6, .form-row-single-field, .form-row-with-button {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 15px;
    }
    
    .form-row-with-button .form-group {
        grid-column: 1 / 2;
    }
    
    .form-row-with-button .form-group-button {
        grid-column: 2 / 3;
    }
}

@media (max-width: 768px) {
    .form-row-5, .form-row-6, .form-row-single-field, .form-row-with-button {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .form-row-with-button .form-group {
        grid-column: 1 / 2;
    }
    
    .form-row-with-button .form-group-button {
        grid-column: 2 / 3;
    }
    
    .form-row-single, .form-row-normal {
        grid-template-columns: 1fr;
        justify-content: center;
    }
    
    .form-row-normal .form-group {
        max-width: 100%;
    }
    
    .dashboard-container {
        padding: 15px;
        margin: 10px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input, .form-group select {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .form-row-5, .form-row-6, .form-row-single-field, .form-row-with-button {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-row-with-button .form-group,
    .form-row-with-button .form-group-button {
        grid-column: 1 / 2;
    }
    
    .form-row-single, .form-row-normal {
        grid-template-columns: 1fr;
        justify-content: center;
    }
    
    .form-row-normal .form-group {
        max-width: 100%;
    }
    
    .dashboard-container {
        margin: 5px;
        padding: 10px;
    }
    
    h1 {
        font-size: 20px;
    }
}

/* New Table Section Styling with Horizontal Scroll */
.table-section {
    margin: 15px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-scroll-container {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #bdc3c7 #ecf0f1;
}

.table-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
    background: #ecf0f1;
    border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Desktop table section styles */
@media (min-width: 768px) {
    .table-section {
        margin: 25px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .table-scroll-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-scroll-container::-webkit-scrollbar-track {
        border-radius: 4px;
    }
}

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

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

.result-table {
    width: 100%;
    min-width: 2330px; /* Increased from 2280px to accommodate No. column */
    border-collapse: collapse;
    background: white;
    font-size: 13px; /* Increased from 12px */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.table-header th {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px; /* Increased from 11px */
    border: 1px solid #2c3e50;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.table-row td {
    padding: 10px 8px;
    border: 1px solid #ddd;
    font-size: 12px; /* Increased from 11px */
    white-space: nowrap;
}

.table-row:nth-child(even) {
    background-color: #f8f9fa;
}

.table-row:hover {
    background-color: #e3f2fd;
}

/* Column specific widths */
.col-no { width: 50px; min-width: 50px; font-weight: bold; }
.col-jenis { width: 200px; min-width: 200px; }
.col-tipe { width: 120px; min-width: 120px; }
.col-umur { width: 80px; min-width: 80px; }
.col-ja { width: 60px; min-width: 60px; }
.col-frep { width: 60px; min-width: 60px; }
.col-usulan { width: 100px; min-width: 100px; }
.col-indukan { width: 100px; min-width: 100px; }
.col-anakan { width: 100px; min-width: 100px; }
.col-stok { width: 150px; min-width: 150px; }
.col-ikta { width: 120px; min-width: 120px; }
.col-realisasi { width: 120px; min-width: 120px; }
.col-rerata { width: 150px; min-width: 150px; }
.col-audit-panen { width: 180px; min-width: 180px; }
.col-pertimbangan { width: 150px; min-width: 150px; }
.col-realisasi-pertimbangan { width: 150px; min-width: 150px; }
.col-perbandingan-perhitungan { width: 180px; min-width: 180px; }
.col-restocking { width: 120px; min-width: 120px; }
.col-final { width: 120px; min-width: 120px; font-weight: bold; background-color: #e8f5e8; }
.col-aksi { width: 100px; min-width: 100px; }

/* Action buttons styling */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.btn-edit, .btn-delete {
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px; /* Slightly increased from previous size */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f4e79 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-delete {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-edit i, .btn-delete i {
    font-style: normal;
    font-size: 14px;
}

/* Text alignment classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.result-cell {
    background: #fff3cd !important;
    font-weight: bold;
    color: #856404;
}
