/* ===== Layout sidebar layanan pengaduan =====
   Desktop : sidebar menempel di kiri, konten di kanan.
   Mobile  : sidebar berubah menjadi tab horizontal di atas konten. */

.pgd-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    max-width: 1140px;
    margin: 0 auto;
}

.pgd-sidebar {
    flex: 0 0 250px;
    position: sticky;
    top: 96px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 18px 14px;
    box-shadow: 0 4px 16px rgba(27, 68, 156, .06);
}

.pgd-sidebar-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 4px 12px 12px;
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 10px;
}

.pgd-sidebar-title i {
    color: var(--color1);
    margin-right: 6px;
}

.pgd-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pgd-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.pgd-menu-item i {
    width: 18px;
    text-align: center;
    color: var(--color1);
}

.pgd-menu-item:hover {
    background: rgba(27, 68, 156, .06);
    color: var(--color1);
}

.pgd-menu-item.active {
    background: var(--color1);
    color: #fff;
}

.pgd-menu-item.active i {
    color: #fff;
}

.pgd-content {
    flex: 1;
    min-width: 0;
}

/* ===== Mobile / tablet kecil: sidebar jadi tab horizontal ===== */
@media (max-width: 991.98px) {
    .pgd-layout {
        flex-direction: column;
        gap: 18px;
    }

    .pgd-sidebar {
        position: static;
        flex: none;
        width: 100%;
        padding: 12px;
    }

    .pgd-sidebar-title {
        display: none;
    }

    .pgd-menu {
        flex-direction: row;
        gap: 8px;
    }

    .pgd-menu-item {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 10px 8px;
        font-size: 13px;
    }

    .pgd-menu-item i {
        width: auto;
    }
}

/* ===== Komponen daftar riwayat (kartu) ===== */
.pgd-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.pgd-search {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 240px;
}

.pgd-search .form-control {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
}

.pgd-count {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

.pgd-card {
    display: block;
    background: #fff;
    border: 1px solid #eef0f4;
    border-left: 4px solid var(--color1);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(27, 68, 156, .05);
    transition: transform .15s ease, box-shadow .2s ease;
}

.pgd-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(27, 68, 156, .13);
}

.pgd-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.pgd-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.4;
}

.pgd-card:hover .pgd-card-title {
    color: var(--color1);
}

.pgd-meta {
    display: flex;
    gap: 8px 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.pgd-meta i {
    color: var(--color1);
    margin-right: 5px;
}

.pgd-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: .3px;
    white-space: nowrap;
}

.pgd-badge-proses {
    background: rgba(252, 179, 21, .18);
    color: #8a6100;
}

.pgd-badge-selesai {
    background: rgba(95, 141, 78, .18);
    color: #3f6b32;
}

.pgd-ticket {
    font-family: 'Courier New', monospace;
    background: #f3f4f6;
    color: var(--color1);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.pgd-empty {
    text-align: center;
    padding: 54px 24px;
    background: #fff;
    border: 1px dashed #d7dbe3;
    border-radius: 14px;
    color: #6b7280;
}

.pgd-empty i {
    font-size: 40px;
    color: #cbd2dd;
    margin-bottom: 14px;
}

.pgd-empty h3 {
    font-size: 17px;
    color: #374151;
    font-weight: 700;
    margin-bottom: 6px;
}

.pgd-empty p {
    font-size: 14px;
    margin: 0;
    text-align: center;
}

/* ===== Detail pengaduan + timeline tanggapan ===== */
.pgd-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color1);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 18px;
}

.pgd-back:hover {
    text-decoration: underline;
}

.pgd-detail-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 26px 28px;
    box-shadow: 0 4px 16px rgba(27, 68, 156, .06);
    margin-bottom: 26px;
}

.pgd-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 14px;
    line-height: 1.4;
}

.pgd-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px 20px;
    padding: 16px 0;
    border-top: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 18px;
}

.pgd-info-item .lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 3px;
}

.pgd-info-item .val {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.pgd-detail-body {
    font-size: 15px;
    color: #374151;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.pgd-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color1);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pgd-tl {
    position: relative;
    padding-left: 30px;
}

.pgd-tl::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #e5e7eb;
}

.pgd-tl-item {
    position: relative;
    margin-bottom: 20px;
}

.pgd-tl-item:last-child {
    margin-bottom: 0;
}

.pgd-tl-dot {
    position: absolute;
    left: -30px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color4);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--color4);
}

.pgd-tl-item.done .pgd-tl-dot {
    background: var(--color11);
    box-shadow: 0 0 0 2px var(--color11);
}

.pgd-tl-box {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(27, 68, 156, .05);
}

.pgd-tl-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.pgd-tl-who {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.pgd-tl-date {
    font-size: 12px;
    color: #9ca3af;
}

.pgd-tl-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

@media (max-width: 575.98px) {
    .pgd-detail-card {
        padding: 20px 18px;
    }

    .pgd-card-head {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
}
