/* portal-surface — custom yang Radzen gak punya, dipakai lebih dari satu halaman.
   Warna/hirarki pakai token rz-* di markup, bukan class di sini. */

/* DataGrid header + hover tipis */
.portal-grid .rz-grid-table thead th,
.portal-grid .rz-data-grid-data thead th {
    background: var(--rz-primary-lighter) !important;
    color: var(--rz-text-color);
}

.portal-grid .rz-grid-table tbody tr:hover > td {
    background: color-mix(in srgb, var(--rz-primary) 5%, transparent);
}

/* Tabel checklist HTML */
.portal-doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.portal-doc-table th,
.portal-doc-table td {
    border: 1px solid var(--rz-border-color-lighter);
    padding: 0.35rem 0.45rem;
    vertical-align: middle;
    text-align: left;
}

.portal-doc-table th {
    background: var(--rz-primary-lighter);
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--rz-text-color);
    white-space: nowrap;
}

/* Badge di dalam FormField — rata kanan biar gak tabrakan floating label */
.portal-form-badge {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    padding: 0.35rem 0.5rem;
    box-sizing: border-box;
}

/* Section panel di atas RadzenCard — header tint + body pad */
.portal-section-card.rz-card,
.rz-card.portal-section-card {
    padding: 0;
}

.portal-section-card__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--rz-primary-lighter);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--rz-text-color);
}

.portal-section-card__title .rzi,
.portal-section-card__title .rz-icon {
    color: var(--rz-primary);
    vertical-align: middle;
}

.portal-section-card__body {
    padding: 0.75rem;
}

/* Icon tile kecil — ukuran/layout aja; warna dari rz-color-* / rz-background-color-*-lighter di markup */
.portal-icon-tile {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

/* Dua metrik di activity / summary card */
.portal-summary-metrics {
    display: flex;
    gap: 1.25rem;
    flex-shrink: 0;
}

.portal-summary-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 4.5rem;
}

.portal-summary-metric__label {
    font-size: 0.6875rem;
    color: var(--rz-text-secondary-color);
    margin-bottom: 0.1rem;
}

.portal-summary-metric__value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Loading tipis di dalam section card */
.portal-panel-loading {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.35rem 0 0.15rem;
}

.portal-panel-loading__text {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
}

/* Baris news klikable (dashboard / list ringkas) */
.portal-news-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.25rem 0.55rem;
    text-align: left;
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--rz-border-color-lighter, #f3f4f6);
    border-radius: 0.35rem;
    cursor: pointer;
}

.portal-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Zebra — slate soft biar tiap entry lebih kebeda */
.portal-news-item:nth-child(even) {
    background: #e8edf3;
}

.portal-news-item:hover,
.portal-news-item:nth-child(even):hover {
    background: color-mix(in srgb, var(--rz-primary) 5%, transparent);
}

.portal-news-item__media {
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--rz-border-color-lighter, #e5e7eb);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    background-color: var(--rz-base-100, #f8f9fa);
    aspect-ratio: 16 / 9;
    max-height: 9.5rem;
}

.portal-news-item__thumb {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.portal-news-item__row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
}

.portal-news-item__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-news-item__body {
    flex: 1 1 auto;
    min-width: 0;
}

.portal-news-item__title {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--rz-text-color);
    margin-bottom: 0.1rem;
}

.portal-news-item__snippet {
    font-size: 0.6875rem;
    color: var(--rz-text-secondary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-news-item__date {
    font-size: 0.6875rem;
    color: var(--rz-text-secondary-color);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.portal-news-item--with-thumb .portal-news-item__title {
    font-size: 0.8125rem;
}

@media (max-width: 991.98px) {
    .portal-news-item__media {
        max-height: 8rem;
    }
}

/* Penanda shipment dari procurement (View + Ship) */
.dlvd-origin {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    margin-left: .35rem;
    padding: .05rem .3rem;
    border: 1px solid var(--rz-base-300, #d7d7de);
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    color: var(--rz-text-secondary-color, #6b6b76);
    background: var(--rz-base-100, #f6f6f8);
    vertical-align: middle;
}

.dlvd-origin .rz-icon,
.dlvd-origin .rzi {
    font-size: .7rem;
}

/* Konfirmasi retur — layout doang, dipakai View dan Ship */
.dlvd-retur-ack {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dlvd-retur-ack__input { width: 100%; }
.dlvd-retur-ack__actions { display: flex; justify-content: flex-end; }

.dlvd-retur-ack__done {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #16a34a;
}

.dlvd-retur-ack__done .rzi { font-size: 0.95rem; }

.dlvd-retur-ack__remark { font-size: 0.76rem; color: var(--rz-text-color); }
.dlvd-retur-ack__remark span {
    color: var(--rz-text-secondary-color);
    font-weight: 600;
    margin-right: 0.25rem;
}
