/* ================== Detail Container ================== */
/* 🚫 Cegah keclap sidebar */
.sidebar-hide-temp .main-sidebar {
  visibility: hidden !important;
}

.detail-container {
    position: relative;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.detail-header h4 {
  text-align: center;
  width: 100%;
  font-weight: bold;
  font-size: 24px;
  text-transform: uppercase;
}

/* ================== Info Section ================== */
.info-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
    row-gap: 10px;
    margin-bottom: 20px;
}

.info-group {
    display: grid;
    grid-template-columns: 200px 20px 1fr;
    align-items: center;
}

.info-group .label {
    font-weight: bold;
}

.info-group .colon {
    text-align: right;
    padding-right: 5px;
}

/* Khusus untuk Invoice */
.invoice-group {
    grid-template-columns: 200px 20px max-content;
}

.invoice-group .invoice-input {
    width: 180px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ================== Table ================== */
.table, 
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th, 
.table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: left;
}

.table th {
    background-color: #f8f9fa;
    text-align: center;
    vertical-align: middle;
}

tr:hover {
    background-color: #f1f1f1;
}

/* ================== Produk Item ================== */
.produk-item input,
.produk-item select {
    height: 38px;
    font-size: 14px;
}

.produk-item .form-control {
    padding: 0.35rem 0.5rem;
}

.produk-item input.subtotal {
    font-weight: bold;
    background-color: #f8f9fa;
}

/* ================== Buttons ================== */
.btn-submit,
.btn-cancel {
    padding: 10px 20px;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-submit {
    background: #28a745;
}
.btn-submit:hover {
    background: #218838;
}

.btn-cancel {
    background: #dc3545;
    margin-left: 10px;
}
.btn-cancel:hover {
    background: #c82333;
}

.btn-close-x {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.btn-close-x:hover {
    color: #dc3545;
}

.btn-action {
    margin: 0 2px;
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: transparent;
}

.btn-view { color: #28a745; }
.btn-edit { color: #007bff; }
.btn-delete { color: #dc3545; }
.btn-print {
    float: right;
    margin-bottom: 10px;
}

/* ================== Forms ================== */
select.form-control, 
input.form-control {
    padding: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.form-action-buttons {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-action-buttons form {
    margin: 0;
}

/* Perbaikan akun pembayaran */
select.akun-pembayaran {
    max-width: 300px;
    min-width: 200px;
    width: 100%;
    display: block;
}

.info-group.akun-pembayaran-group .value {
    max-width: 320px;
}

/* ================== Detail Transaksi Supplier ================== */
.detail-transaksi-container {
    min-height: 70vh;
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.print-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    padding: 6px 10px;
    border-radius: 50%;
}

/* ================== Table Utility ================== */
.text-success { 
    color: green; 
    font-weight: bold; 
}
.text-danger { 
    color: red; 
    font-weight: bold; 
}
.text-center { 
    text-align: center; 
}

.status-draft { 
    font-size: 13px; 
    color: #ffc107; 
    font-weight: bold; 
}
.status-saved { 
    font-size: 13px; 
    color: #28a745; 
    font-weight: bold; 
}

#searchInput {
    width: 100%;
    max-width: 350px;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* ================== Summary Table ================== */
.summary-table {
    width: auto;
    border-collapse: collapse;
    margin-top: 20px;
    margin-left: 0;
}

.summary-table th,
.summary-table td {
    border: none;
    font-size: 15px;
    padding: 4px 10px;
    white-space: nowrap;
}

.summary-table th {
    text-align: left;
    font-weight: normal;
    min-width: 180px; /* agar lebar kolom label tetap seragam */
}

.summary-table td.colon {
    width: 10px;      /* kolom khusus titik dua */
    text-align: center;
    padding: 0;
}

.summary-table td:last-child {
    text-align: left;
    font-weight: bold;
}


/* ================== Responsive ================== */
@media (max-width: 768px) {
    .table th, 
    .table td {
        font-size: 13px;
        padding: 6px;
    }
    #searchInput {
        width: 100%;
    }
}

/* ================== Print ================== */
@media print {
    body * {
        visibility: hidden;
    }

    /* Tampilkan hanya area print */
    #printArea, 
    #printArea * {
        visibility: visible;
    }

    #printArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Sembunyikan tombol */
    .btn, 
    .btn-back, 
    .btn-print {
        display: none !important;
    }

    .table thead th {
        color: #000 !important; /* warna teks hitam */
        background-color: #f8f9fa !important; /* latar abu muda */
    }
}

/* ================== Layout Umum ================== */
.detail-header h4 {
    flex: 1;
    text-align: center;
}

.detail-header {
    position: relative;
}

.btn-print {
    position: absolute;
    right: 0;
}

/* ================== Tanda Tangan ================== */
.ttd-section {
    margin-top: 60px;
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.ttd-box {
    width: 30%;
}

.ttd-box p {
    margin-bottom: 80px;
}

.ttd-name {
    text-decoration: underline;
    font-weight: bold;
}


