/* ==========================================
   計劃時程列表頁樣式
   ========================================== */

[v-cloak] { display: none; }

/* Layout: sidebar + main */
.timeline-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 1024px) {
    .timeline-layout {
        grid-template-columns: 1fr;
    }
    .timeline-sidebar {
        display: none;
    }
}

/* ── Sidebar Filter Card ── */
.filter-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    position: sticky;
    top: 100px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-group {
    margin-bottom: 16px;
}
.filter-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.filter-search {
    display: flex;
    gap: 6px;
    max-width: 100%;
}
.filter-search input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.88rem;
}
.filter-search input:focus {
    outline: none;
    border-color: #0089A7;
}
.filter-search button {
    flex-shrink: 0;
    padding: 8px 12px;
    background: #003366;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.filter-search button:hover {
    background: #004488;
}

/* Radio buttons */
.filter-radios {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #374151;
}
.filter-radio input[type="radio"] {
    accent-color: #003366;
}

/* Date inputs */
.filter-date {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.filter-date:focus {
    outline: none;
    border-color: #0089A7;
}
.filter-date-sep {
    display: block;
    text-align: center;
    font-size: 0.82rem;
    color: #9ca3af;
    margin: 2px 0;
}

/* Clear button */
.filter-clear-btn {
    width: 100%;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.filter-clear-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ── Mobile Filter ── */
.mobile-filter-btn {
    display: none;
    width: 100%;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    margin-bottom: 16px;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
@media (max-width: 1024px) {
    .mobile-filter-btn {
        display: flex;
    }
}
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #0089A7;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 10px;
}
.mobile-filter-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}
.filter-input-mobile,
.filter-select-mobile {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.88rem;
}
.filter-group-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.filter-apply-btn {
    flex: 1;
    padding: 8px 16px;
    background: #003366;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.filter-clear-btn-sm {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* ── Timeline Section ── */
.timeline-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.timeline-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(135deg, #003366, #004488);
    color: #fff;
}
.timeline-section-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.timeline-count {
    font-size: 0.82rem;
    opacity: 0.8;
}

/* ── Table ── */
.timeline-table-wrap {
    overflow-x: auto;
}
.timeline-table {
    width: 100%;
    border-collapse: collapse;
}
.timeline-table thead {
    background: #f8fafc;
}
.timeline-table th {
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #6b7280;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}
.timeline-table td {
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #374151;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.timeline-table tbody tr:hover {
    background: #f0f9ff;
}

/* Column widths */
.col-date { width: 140px; }
.col-category { width: 110px; }
.col-status { width: 100px; }
.col-action { width: 100px; text-align: center; }

/* Date text */
.date-text {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

/* Item title link */
.item-title-link {
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
}
.item-title-link:hover {
    color: #0089A7;
    text-decoration: underline;
}
.item-summary {
    font-size: 0.82rem;
    color: #9ca3af;
    margin: 4px 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category badge */
.category-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 12px;
    white-space: nowrap;
}
.status-active {
    background: #dcfce7;
    color: #166534;
}
.status-urgent {
    background: #fef3c7;
    color: #92400e;
}
.status-pending {
    background: #f3f4f6;
    color: #6b7280;
}
.status-ended {
    background: #fee2e2;
    color: #991b1b;
}

/* Detail link */
.detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}
.detail-link:hover {
    background: #003366;
    color: #fff;
}

/* Register button */
.register-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: #0089A7;
    color: #fff;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.register-btn:hover {
    background: #006d85;
}

/* Empty state */
.timeline-empty {
    padding: 40px 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.92rem;
}

/* ── Responsive table ── */
@media (max-width: 768px) {
    .timeline-table th,
    .timeline-table td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
    .col-date { width: 100px; }
    .col-category { width: 80px; }
    .col-status { width: 80px; }
    .col-action { width: 60px; }
    .item-summary {
        display: none;
    }
}
