/* =========================================================
   Public Complaint Tracking Page
   Reuses pd-* base styles from public-dashboard.css
   (header, hero, footer, container, buttons, icons).
   Only track-page-specific styles live here.
   ========================================================= */

.pt-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------- Compact Hero (no CTA buttons on this page) ---------------- */

.pd-hero-compact {
    padding: 48px 20px;
}

/* ---------------- Search Section ---------------- */

.pt-search-section {
    padding-top: 0;
    margin-top: -40px;
}

.pt-search-card {
    background-color: var(--pd-white);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow-lg);
    padding: 32px;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.pt-search-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0 0 18px 0;
}

.pt-search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pt-search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.pt-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pd-text-muted);
    pointer-events: none;
}

.pt-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px 13px 42px;
    font-size: 14px;
    font-family: inherit;
    color: var(--pd-text);
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
}

.pt-search-input::placeholder {
    color: #9aa5b1;
}

.pt-search-input:focus {
    outline: none;
    border-color: var(--pd-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.pt-search-btn {
    flex-shrink: 0;
}

/* ---------------- Complaint Summary Card ---------------- */

.pt-summary-card {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.pt-summary-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pt-summary-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--pd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pt-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--pd-text);
}

.pt-summary-value-strong {
    font-size: 17px;
    font-weight: 800;
    color: var(--pd-primary);
}

.pt-summary-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------------- Copy Button (Summary) ---------------- */

.pt-copy-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: none;
    background-color: var(--pd-primary-light);
    border-radius: 6px;
    color: var(--pd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.pt-copy-btn:hover {
    background-color: #dde8fb;
}

.pt-copy-btn .pd-icon {
    width: 13px;
    height: 13px;
}

.pt-copy-msg {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pd-success);
}

/* ---------------- Detail Cards (Consumer / Complaint / Closure) ---------------- */

.pt-detail-card {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 24px;
}

.pt-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 24px;
}

.pt-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pt-detail-item-full {
    grid-column: 1 / -1;
}

.pt-detail-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--pd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pt-detail-value {
    font-size: 13.5px;
    color: var(--pd-text);
    line-height: 1.5;
}

.pt-closure-card {
    border-left: 4px solid var(--pd-success);
}

/* ---------------- Status Badges ---------------- */

.pt-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: fit-content;
}

.pt-status-open {
    background-color: #dbeafe;
    color: #1e40af;
}

.pt-status-forwarded {
    background-color: #fef3c7;
    color: #92400e;
}

.pt-status-closed {
    background-color: #d1fae5;
    color: #065f46;
}

/* ---------------- Current Status Highlight Card ---------------- */

.pt-status-highlight-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-radius: var(--pd-radius);
    padding: 24px;
    border-left: 4px solid var(--pd-primary);
    background-color: var(--pd-white);
    box-shadow: var(--pd-shadow);
}

.pt-status-highlight-open {
    border-left-color: #1e40af;
}

.pt-status-highlight-forwarded {
    border-left-color: #92400e;
}

.pt-status-highlight-closed {
    border-left-color: #065f46;
}

.pt-status-highlight-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pt-status-highlight-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--pd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pt-status-highlight-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--pd-text);
}

/* ---------------- Timeline ---------------- */

.pt-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 640px;
}

.pt-timeline-item {
    position: relative;
    display: flex;
    gap: 16px;
    padding-bottom: 28px;
}

.pt-timeline-item:last-child {
    padding-bottom: 0;
}

.pt-timeline-item::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 34px;
    bottom: 0;
    width: 2px;
    background-color: var(--pd-border);
}

.pt-timeline-item:last-child::before {
    display: none;
}

.pt-timeline-item-done::before {
    background-color: var(--pd-success);
}

.pt-timeline-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.pt-timeline-item-done .pt-timeline-icon {
    background-color: var(--pd-success);
    color: var(--pd-white);
}

.pt-timeline-item-done .pt-timeline-icon .pd-icon {
    width: 16px;
    height: 16px;
}

.pt-timeline-item-pending .pt-timeline-icon {
    background-color: var(--pd-white);
    border: 2px solid var(--pd-border);
}

.pt-timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--pd-text-muted);
}

.pt-timeline-content {
    flex: 1;
    padding-top: 4px;
}

.pt-timeline-action {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0 0 3px 0;
}

.pt-timeline-item-pending .pt-timeline-action {
    color: var(--pd-text-muted);
}

.pt-timeline-office {
    font-size: 12.5px;
    color: var(--pd-primary);
    font-weight: 600;
    margin: 0 0 3px 0;
}

.pt-timeline-datetime {
    font-size: 12px;
    color: var(--pd-text-muted);
    margin: 0 0 4px 0;
}

.pt-timeline-remarks {
    font-size: 12.5px;
    color: var(--pd-text);
    background-color: var(--pd-bg);
    border-radius: 6px;
    padding: 8px 10px;
    margin: 4px 0 0 0;
}

.pt-empty-inline {
    font-size: 13px;
    color: var(--pd-text-muted);
}

/* ---------------- Multiple Results Table ---------------- */

.pt-table-wrapper {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    overflow-x: auto;
}

.pt-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.pt-table thead {
    background-color: var(--pd-bg);
}

.pt-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--pd-text-muted);
    border-bottom: 1px solid var(--pd-border);
}

.pt-table td {
    padding: 12px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid #EEF1F5;
}

.pt-table tbody tr:last-child td {
    border-bottom: none;
}

.pt-table-action-col {
    width: 1%;
    white-space: nowrap;
}

.pt-view-btn {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--pd-primary);
    color: var(--pd-white);
    border-radius: var(--pd-radius-sm);
    font-size: 12.5px;
    font-weight: 600;
}

.pt-view-btn:hover {
    background-color: var(--pd-primary-dark);
}

/* ---------------- Empty State ---------------- */

.pt-empty-state {
    text-align: center;
    padding: 48px 20px;
    max-width: 440px;
    margin: 0 auto;
}

.pt-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: var(--pd-bg);
    color: var(--pd-text-muted);
    margin-bottom: 20px;
}

.pt-empty-icon .pd-icon {
    width: 32px;
    height: 32px;
}

.pt-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0 0 8px 0;
}

.pt-empty-message {
    font-size: 13.5px;
    color: var(--pd-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    .pt-summary-card {
        grid-template-columns: repeat(2, 1fr);
    }

    .pt-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pt-status-highlight-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .pt-search-card {
        padding: 22px 18px;
    }

    .pt-search-form {
        flex-direction: column;
    }

    .pt-search-btn {
        justify-content: center;
    }

    .pt-summary-card {
        grid-template-columns: 1fr;
    }

    .pt-detail-grid {
        grid-template-columns: 1fr;
    }
}