/* General Body & Layout */
body { 
    font-family: 'Inter', sans-serif; 
    background-color: #f4f7f6; 
    color: #333; 
    margin: 0;
    display: flex;
}

.sidebar {
    width: 240px;
    background-color: #2c3e50;
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: width 0.3s ease;
    z-index: 1000;
    overflow-x: hidden;
}

.sidebar .sidebar-header {
    padding: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border-bottom: 1px solid #34495e;
}

.sidebar .sidebar-header .logo-text {
    display: block;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sidebar nav li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
}

.sidebar nav li a .icon {
    min-width: 30px;
    font-size: 18px;
    margin-right: 15px;
}

.sidebar nav li a:hover, .sidebar nav li a.active {
    background-color: #3498db;
    color: white;
}

.main-content {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 20px;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h1 {
    margin: 0;
}

.card { 
    background: white; 
    padding: 25px; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    margin-bottom: 20px; 
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
    width: 70px;
}
.sidebar.collapsed .sidebar-header .logo-text {
    display: none;
}
.sidebar.collapsed nav li a .link-text {
    display: none;
}

/* Responsive (Tablet & Desktop) */
@media (min-width: 769px) {
    .sidebar:not(:hover).collapsed {
        width: 70px;
    }
    .sidebar:not(:hover).collapsed .sidebar-header .logo-text {
        display: none;
    }
    .sidebar:not(:hover).collapsed nav li a .link-text {
        display: none;
    }
    .main-content.collapsed-main {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
}

/* Mobile Responsive */
.mobile-menu-button {
    display: none;
    background: #3498db;
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .sidebar {
        width: 240px;
        left: -240px;
    }
    .sidebar.active {
        left: 0;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 70px;
    }
    .mobile-menu-button {
        display: block;
    }
}

/* === LARAVEL-LIKE TABLE STYLE === */
.excel-table-wrapper {
    overflow-x: auto;
}
table.excel-style {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.excel-style th {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}
table.excel-style th .fas {
    margin-right: 8px;
}
table.excel-style td {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 15px;
    white-space: nowrap;
}
table.excel-style tbody tr:last-child td {
    border-bottom: none;
}
table.excel-style tbody tr:hover {
    background-color: #f5f8ff;
}

/* === RESPONSIVE TABLE STYLE === */
@media (max-width: 992px) {
    .responsive-table thead {
        display: none;
    }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
        display: block;
        width: 100%;
    }
    .responsive-table tr {
        margin-bottom: 15px;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        overflow: hidden;
    }
    .responsive-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        white-space: normal;
        border-bottom: 1px solid #f0f0f0;
    }
    .responsive-table td:last-child {
        border-bottom: 0;
    }
    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 25px);
        padding-right: 10px;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
        color: #2c3e50;
    }
    .responsive-table td.expand-cell, .responsive-table td.action-cell {
        padding-left: 15px;
        text-align: left;
    }
    .responsive-table td.expand-cell::before, .responsive-table td.action-cell::before {
        display: none;
    }
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.btn-filter {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}
.btn-filter:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}
.btn-filter.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Action Button Style */
.btn-aksi {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 5px;
    text-decoration: none;
    color: #3498db;
    background-color: #eaf5ff;
    border: 1px solid #aedcff;
    transition: all 0.2s ease;
}
.btn-aksi:hover {
    background-color: #3498db;
    color: white;
}

/* Other elements */
.btn { display: inline-block; text-decoration: none; text-align: center; padding: 10px 15px; border: none; border-radius: 6px; background-color: #3498db; color: white; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.3s; }
.btn:hover { background-color: #2980b9; }

.status { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; display: inline-block; }
.status-berjalan, .status-disetujui, .status-lunas { background-color: #dcfce7; color: #166534; }
.status-selesai { background-color: #fee2e2; color: #b91c1c; }
.status-ditunda, .status-draft, .status-belum-lunas { background-color: #fef3c7; color: #92400e; }
.status-dibatalkan, .status-ditolak { background-color: #fee2e2; color: #991b1b; }
.status-baru, .status-penawaran, .status-terkirim { background-color: #e0e7ff; color: #3730a3; }

/* Form styles */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #4b5563; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; box-sizing: border-box; }
.btn-danger { background-color: #e74c3c; }
.btn-danger:hover { background-color: #c0392b; }
.btn-success { background-color: #2ecc71; }
.btn-success:hover { background-color: #27ae60; }
.login-container { width: 100%; max-width: 400px; margin: 50px auto; padding: 30px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.login-container h1 { text-align: center; margin-bottom: 25px; }
.alert { padding: 15px; margin-bottom: 20px; border-radius: 6px; color: #ffffff; }
.alert-danger { background-color: #e74c3c; }

/* Preview Panel */
#preview-panel {
    position: fixed;
    top: 0;
    right: -50%;
    width: 50%;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}
#preview-panel.visible {
    right: 0;
}
.preview-header {
    padding: 15px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.preview-header h3 {
    margin: 0;
    font-size: 18px;
}
#close-preview-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}
.preview-content {
    flex-grow: 1;
    padding: 0;
}
.preview-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}
@media (max-width: 768px) {
    #preview-panel {
        width: 95%;
        right: -95%;
    }
}

/* Lampiran Link */
.lampiran-link {
    color: #3498db;
    font-size: 18px;
    text-decoration: none;
}
.lampiran-link:hover {
    color: #2980b9;
}
.lampiran-link.disabled {
    color: #bdc3c7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Details Dropdown */
.details-row {
    display: none;
}
.details-row td {
    padding: 0 !important;
    border: 0 !important;
    background-color: #f9fafb;
}
.details-content {
    padding: 15px;
    background-color: #f9fafb;
}
.details-content table {
    width: 100%;
    background-color: white;
    border: 1px solid #e5e7eb;
}
.expand-btn {
    cursor: pointer;
    font-size: 16px;
    color: #3498db;
}
.expand-btn.disabled {
    color: #bdc3c7;
    cursor: not-allowed;
}

/* Alert Message */
.alert-msg {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 500;
}
.alert-msg.success {
    background-color: #2ecc71;
}
.alert-msg.error {
    background-color: #e74c3c;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2999;
    display: none;
    justify-content: center;
    align-items: center;
}
.modal-overlay.visible {
    display: flex;
}
.modal {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.modal-header h2 {
    margin: 0;
    font-size: 20px;
    border: none;
}
.close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* Calculator */
.calculator-icon {
    color: #3498db;
    cursor: pointer;
    margin-left: 10px;
    transition: color 0.2s;
    font-size: 18px;
}
.calculator-icon:hover {
    color: #2980b9;
}
.calc-result {
    font-weight: bold;
    font-size: 1.2em;
    color: #2c3e50;
    margin-top: 10px;
    background-color: #f4f7f6;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}
.form-group-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* DataTables x Tailwind tweaks */
.dataTable thead th { font-weight:600; }
.dataTable tbody td, .dataTable thead th, .dataTable tfoot th { padding: .75rem 1rem; }
.dataTable tbody tr:nth-child(even) { background: rgba(148,163,184,.08); } /* slate-300/20 */
.dataTable .dt-input { border-radius: .5rem; border:1px solid #cbd5e1; padding:.5rem .75rem; }
.dataTable .dt-button { border-radius:.5rem; padding:.5rem .75rem; background:#2563eb; color:#fff; }
.dataTable .dt-button:hover { background:#1d4ed8; }

            