/* ======================================
   ePTR Section Styles
   ====================================== */

/* --- View PTR Definition List --- */
.ptr-field {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8125rem;
}

.ptr-field:last-child {
    border-bottom: none;
}

.ptr-field-label {
    width: 160px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.ptr-field-value {
    flex: 1;
    color: var(--text-primary);
}

/* --- Flights Grid --- */
.eptr-flights-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.eptr-flights-scroll table.table {
    margin-bottom: 0;
    border: none;
}

.eptr-flights-scroll table.table th.exercise-header {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    padding: 0.5rem 0.125rem;
    font-size: 0.5625rem;
    min-width: 26px;
    max-width: 26px;
    white-space: nowrap;
    text-align: left;
    vertical-align: bottom;
    height: 120px;
}

.eptr-flights-scroll table.table td.exercise-cell {
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    min-width: 26px;
    max-width: 26px;
    padding: 0.375rem 0.125rem;
}

.grade-d {
    color: var(--color-success);
}

.grade-pd {
    color: var(--color-warning);
}

.eptr-flights-scroll table.table .totals-row td,
.eptr-flights-scroll table.table .totals-row th {
    font-weight: 600;
    background: var(--bg-canvas);
    border-top: 2px solid var(--border-default);
}

.eptr-flights-scroll table.table td.flight-num {
    white-space: nowrap;
    min-width: 40px;
}

.eptr-flights-scroll table.table td.flight-date {
    white-space: nowrap;
    min-width: 80px;
}

.eptr-flights-scroll table.table td.flight-pic {
    white-space: nowrap;
    min-width: 100px;
}

/* --- Audit Report --- */
.audit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
}

.audit-icon {
    font-size: 0.875rem;
    margin-top: 0.0625rem;
    flex-shrink: 0;
}

.audit-icon.pass {
    color: var(--color-success);
}

.audit-icon.fail {
    color: var(--color-danger);
}

.audit-values {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.audit-missing {
    padding-left: 1.75rem;
    margin-top: 0.125rem;
    margin-bottom: 0.5rem;
}

.audit-missing li {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.0625rem 0;
}

/* --- Checklist --- */
.checklist-section {
    margin-bottom: 1.5rem;
}

.checklist-section:last-child {
    margin-bottom: 0;
}

.checklist-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.75rem;
}

/* --- ePTR Page Toolbar --- */
.eptr-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .eptr-flights-scroll table.table th.exercise-header {
        height: 80px;
        font-size: 0.5rem;
    }
}

@media (max-width: 480px) {
    .ptr-field {
        flex-direction: column;
        gap: 0.125rem;
    }

    .ptr-field-label {
        width: auto;
        font-size: 0.6875rem;
    }
}
