/* =====================================================
   Detail Page Specific Styles
   ===================================================== */

/* Actions Header */
.detail-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--color-text-muted);
}

.breadcrumb-current {
    color: var(--color-text);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

/* Hero Card */
.hero-card {
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.hero-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-completed {
    background: rgba(0, 128, 255, 0.1);
    color: #0080FF;
}

.badge-pending {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.badge-cancelled {
    background: rgba(148, 163, 184, 0.1);
    color: #94A3B8;
}

.badge-type {
    background: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}

.badge-overdue {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 900px;
}

/* Progress Card */
.progress-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    border: 1px solid var(--color-border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.progress-percent {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
}

.progress-percent.pending {
    color: #8B5CF6;
}

.progress-track {
    height: 10px;
    background: var(--color-border);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
    background: linear-gradient(90deg, #0080FF, #8B5CF6);
}

.progress-fill.pending {
    background: linear-gradient(90deg, #8B5CF6, #06B6D4);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
}

.info-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card-title svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

.info-list {
    display: flex;
    flex-direction: column;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--color-border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--color-bg);
    color: var(--color-text-muted);
}

.info-icon.highlight {
    background: rgba(0, 128, 255, 0.1);
    color: var(--color-primary);
}

.info-icon svg {
    width: 16px;
    height: 16px;
}

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

.info-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    word-break: break-word;
}

.info-value.highlight {
    color: var(--color-primary);
}

.note-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.08);
    border-radius: var(--radius-md);
    border-left: 3px solid #F59E0B;
}

.note-label {
    font-size: 0.75rem;
    color: #B45309;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.note-content {
    font-size: 0.875rem;
    color: #92400E;
}

.btn-view-doc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(0, 128, 255, 0.1);
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    margin-top: 1rem;
    transition: all 0.15s ease;
}

.btn-view-doc:hover {
    background: rgba(0, 128, 255, 0.15);
}

.btn-view-doc svg {
    width: 16px;
    height: 16px;
}

/* Timeline Card */
.timeline-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-title svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

.timeline-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-line {
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

.timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-dot.active {
    background: var(--color-primary);
}

.timeline-dot.active::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.timeline-dot.inactive {
    background: white;
    border: 2px solid var(--color-border);
}

.timeline-content {
    flex: 1;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
}

.timeline-content.active {
    background: rgba(0, 128, 255, 0.04);
    border-color: rgba(0, 128, 255, 0.2);
}

.timeline-content.inactive {
    background: var(--color-bg);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-month {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-latest {
    padding: 0.25rem 0.5rem;
    background: var(--color-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.timeline-status {
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
}

.timeline-status.completed {
    background: rgba(0, 128, 255, 0.1);
    color: #0080FF;
}

.timeline-status.pending {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.timeline-text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin: 0;
}

.timeline-empty {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
}

/* Check-in CTA */
.checkin-cta {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Action CTAs */
.action-ctas {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Selected Document Banner */
.selected-doc-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(0, 128, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.banner-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.banner-doc-name {
    font-weight: 600;
    color: var(--color-primary);
    flex: 1;
}

.banner-change {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: underline;
}

/* Readonly document display */
.doc-readonly-display {
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(0, 128, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 1rem;
}

/* Small check-in button for table */
.btn-checkin-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0080FF 0%, #0066CC 100%);
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 128, 255, 0.2);
}

.btn-checkin-small:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 128, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        justify-content: stretch;
    }

    .action-buttons .btn {
        flex: 1;
        justify-content: center;
    }

    .hero-card {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .timeline-card {
        padding: 1.5rem;
    }

    .timeline-content {
        padding: 1rem;
    }
}