/* --- Variables: ปรับแต่งสี PSU และสถานะได้ที่นี่ --- */
:root {
    --psu-blue: #2271b1;
    --psu-green: #28a745;
    --psu-amber: #ffc107;
    --psu-red: #d63638;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
}

.dt-public-tracking-wrapper {
    max-width: 650px;
    margin: 20px auto;
    font-family: 'Sarabun', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    padding: 0 15px; /* กันชนขอบจอสำหรับมือถือ */
}

/* --- Header --- */
.dt-tracking-header {
    text-align: center;
    margin-bottom: 30px;
}
.dt-org-logo {
    max-width: 100px;
    height: auto;
    margin-bottom: 15px;
}
.dt-tracking-header h2 { margin: 0; font-size: 1.5rem; }
.dt-tracking-header p { color: var(--text-muted); font-size: 0.95rem; }

/* --- Document Card --- */
.dt-doc-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.dt-status-banner {
    padding: 18px;
    text-align: center;
    background: var(--psu-blue);
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}
/* ปรับสถานะตาม Logic หลังบ้าน */
.dt-status-banner.completed { background: var(--psu-green); }
.dt-status-banner.pending { background: var(--psu-amber); color: #000; }
.dt-status-banner.overdue { background: var(--psu-red); }

.dt-card-body { padding: 25px; }
.dt-card-body p { margin: 10px 0; border-bottom: 1px solid #f1f5f9; padding-bottom: 8px; }
.dt-card-body p:last-child { border-bottom: none; }

/* --- Vertical Timeline --- */
.dt-public-timeline {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
}
.dt-public-timeline h3 {
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dt-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    padding-left: 30px;
}

/* เส้นเชื่อม Timeline */
.dt-steps::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #e2e8f0;
}

.dt-step-item {
    position: relative;
    padding-bottom: 30px;
}

/* วงกลมบนเส้น */
.dt-step-item::after {
    content: '';
    position: absolute;
    left: -30px; /* ยึดตาม padding-left ของ .dt-steps */
    top: 6px;
    width: 10px;
    height: 10px;
    background: #fff;
    border: 3px solid var(--psu-blue);
    border-radius: 50%;
    z-index: 1;
}

.dt-step-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.dt-step-info strong { color: var(--text-dark); font-size: 1.05rem; }

/* --- Print Settings --- */
@media print {
    .dt-public-tracking-wrapper { max-width: 100%; margin: 0; padding: 0; }
    .dt-doc-card { box-shadow: none; border: 1px solid #ccc; }
    .dt-tracking-footer { display: none; }
}
