/* ==========================================================================
   TRAINEE PORTAL & ASSIGNMENT SUBMISSION STYLING (Ultra-Premium Executive Edition)
   Tamkeen Al-Roaya Master Coach Qualification Platform v3.0
   Designed with UI/UX Pro Max & Apple Design Standards
   ========================================================================== */

.tp-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 1. Executive Context Header */
.tp-hero-header {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.tp-hero-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-blue), var(--status-emerald), var(--status-amber));
}

.tp-hero-right {
    flex: 1;
    min-width: 280px;
}

.tp-meta-pill-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tp-badge {
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tp-badge-role {
    background: rgba(5, 150, 105, 0.12);
    color: var(--status-emerald);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.tp-badge-id {
    background: rgba(217, 119, 6, 0.12);
    color: var(--status-amber);
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.tp-badge-cohort {
    background: rgba(29, 78, 216, 0.08);
    color: var(--brand-blue);
    border: 1px solid rgba(29, 78, 216, 0.18);
}

.tp-hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}

.tp-hero-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.tp-hero-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.tp-btn-history {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0.65rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    text-align: right;
}

.tp-btn-history:hover {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.tp-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(29, 78, 216, 0.1);
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tp-btn-history-text {
    display: flex;
    flex-direction: column;
}

.tp-btn-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tp-btn-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 2. Executive 4-Card KPI Matrix */
.tp-metrics-matrix {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.tp-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.tp-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-blue-light);
}

.tp-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.tp-kpi-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.tp-kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-icon-navy {
    background: rgba(11, 27, 61, 0.08);
    color: var(--brand-navy);
}

.tp-icon-blue {
    background: rgba(29, 78, 216, 0.1);
    color: var(--brand-blue);
}

.tp-icon-emerald {
    background: rgba(5, 150, 105, 0.1);
    color: var(--status-emerald);
}

.tp-icon-amber {
    background: rgba(217, 119, 6, 0.1);
    color: var(--status-amber);
}

.tp-kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.tp-kpi-unit {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.tp-kpi-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Master Progress Bar Card */
.tp-progress-bar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem 1.35rem;
    box-shadow: var(--shadow-sm);
}

.tp-progress-bar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.tp-progress-text {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tp-progress-text strong {
    color: var(--text-primary);
}

.tp-progress-badges {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
}

.legend-approved { color: var(--status-emerald); }
.legend-under-review { color: var(--brand-blue); }
.legend-pending { color: var(--text-muted); }

.tp-progress-bar-track {
    width: 100%;
    height: 10px;
    background: var(--bg-input);
    border-radius: 9999px;
    overflow: hidden;
    display: flex;
    position: relative;
}

.tp-progress-fill-approved {
    background: linear-gradient(90deg, #059669, #10B981);
    height: 100%;
    transition: width 0.4s ease;
}

.tp-progress-fill-review {
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    height: 100%;
    transition: width 0.4s ease;
}

/* 3. Segmented Navigation & Search Controls */
.tp-controls-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tp-category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.tp-category-tabs::-webkit-scrollbar {
    display: none;
}

.tp-tab-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: var(--shadow-sm);
}

.tp-tab-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    transform: translateY(-1px);
}

.tp-tab-btn.active {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(11, 27, 61, 0.25);
}

.tp-tab-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 7px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.tp-tab-btn:not(.active) .tp-tab-badge {
    background: var(--bg-input);
    color: var(--text-muted);
}

.tp-search-and-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tp-search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 480px;
}

.tp-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.tp-search-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 0.6rem 2.5rem 0.6rem 2rem;
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.tp-search-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.tp-clear-search-btn {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.tp-status-filter-pills {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

.tp-chip-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tp-chip-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.tp-chip-btn.active {
    background: rgba(29, 78, 216, 0.1);
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    font-weight: 700;
}

/* 4. Uniform 3-Column Assignments Grid */
.tp-assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.25rem;
}

.tp-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.tp-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tp-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--border-subtle);
}

.tp-card-approved::before {
    background: var(--status-emerald);
}

.tp-card-active::before {
    background: var(--brand-blue);
}

.tp-card-header {
    margin-bottom: 0.85rem;
}

.tp-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tp-card-id-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tp-card-num {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 7px;
    border-radius: 4px;
}

.tp-card-cat {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-blue);
    background: rgba(29, 78, 216, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.tp-card-quota-pill {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tp-card-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.tp-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.tp-card-desc {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.tp-card-instruction {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.tp-inst-icon {
    color: var(--brand-blue);
    margin-top: 2px;
    flex-shrink: 0;
}

.tp-card-meter-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tp-card-meter-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tp-meter-val strong {
    color: var(--text-primary);
}

.tp-card-meter-track {
    width: 100%;
    height: 7px;
    background: var(--bg-input);
    border-radius: 9999px;
    overflow: hidden;
}

.tp-card-meter-fill {
    height: 100%;
    background: var(--brand-blue);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.tp-card-meter-fill.meter-complete {
    background: var(--status-emerald);
}

/* Submissions Summary Bar */
.tp-submissions-summary-bar {
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.tp-sub-summary-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tp-sub-count-tag {
    font-weight: 700;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tp-sub-score-tag {
    background: rgba(217, 119, 6, 0.12);
    color: var(--status-amber);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.tp-sub-review-tag {
    background: rgba(29, 78, 216, 0.08);
    color: var(--brand-blue);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.tp-btn-view-submissions {
    background: none;
    border: none;
    color: var(--brand-blue);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.tp-btn-view-submissions:hover {
    background: rgba(29, 78, 216, 0.08);
    transform: translateX(-2px);
}

.tp-sub-empty-prompt {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* Card Footer Actions */
.tp-card-footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

.tp-btn-primary-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--brand-navy) 0%, #172E5A 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.72rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(11, 27, 61, 0.2);
    transition: all var(--transition-fast);
}

.tp-btn-primary-action:hover {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1D4ED8 100%);
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3);
    transform: translateY(-1px);
}

.tp-card-footer-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.tp-btn-edit-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--brand-navy) 0%, #172E5A 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(11, 27, 61, 0.15);
    transition: all var(--transition-fast);
}

.tp-btn-edit-action:hover {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1D4ED8 100%);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
    transform: translateY(-1px);
}

.tp-btn-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tp-btn-secondary-action:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: rgba(29, 78, 216, 0.04);
}

.tp-btn-secondary-action.btn-delete {
    border-color: rgba(220, 38, 38, 0.3);
    color: #DC2626;
}

.tp-btn-secondary-action.btn-delete:hover {
    background: #DC2626;
    color: #FFFFFF;
    border-color: #DC2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.tp-sub-summary-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* 5. Submissions Drawer & Modal */
.tp-drawer-card {
    max-width: 680px;
    width: 95%;
}

.tp-drawer-header-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tp-drawer-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-blue);
}

.tp-drawer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.tp-drawer-top-banner {
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tp-drawer-stats-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.tp-drawer-stat-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.tp-drawer-stat-pill.pill-approved {
    color: var(--status-emerald);
    border-color: rgba(5, 150, 105, 0.3);
}

.tp-drawer-stat-pill.pill-review {
    color: var(--brand-blue);
    border-color: rgba(29, 78, 216, 0.3);
}

.tp-drawer-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-left: 4px;
}

.tp-drawer-sub-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: var(--shadow-sm);
}

.tp-drawer-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tp-drawer-sub-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}

.tp-sub-order-badge {
    background: var(--brand-navy);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}

.tp-sub-item-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.tp-drawer-sub-badges {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

.tp-drawer-sub-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tp-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 6. Spacious Upload Modal Form */
.tp-modal-form-content {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.tp-modal-banner {
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.tp-modal-banner-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.tp-badge-cat {
    background: rgba(29, 78, 216, 0.08);
    color: var(--brand-blue);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.tp-badge-quota {
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.tp-modal-asg-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.tp-modal-asg-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.65rem 0;
    line-height: 1.45;
}

.tp-modal-instruction-callout {
    background: var(--bg-surface);
    border-right: 3px solid var(--brand-blue);
    border-radius: 0 4px 4px 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.45;
}

.tp-form-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tp-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.65rem;
}

.tp-section-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-navy);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.tp-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.tp-form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tp-form-row .flex-1 {
    flex: 1;
    min-width: 240px;
}

.form-hint-note {
    font-size: 0.75rem;
    color: var(--status-amber);
    display: block;
    margin-top: 4px;
    font-weight: 600;
}

/* 4-Part Reflection Grid */
.tp-reflection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.tp-ref-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.tp-ref-num {
    background: rgba(29, 78, 216, 0.1);
    color: var(--brand-blue);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

.tp-ref-textarea {
    width: 100%;
    resize: vertical;
    min-height: 64px;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Dropzone & Live Audio Studio */
.file-upload-dropzone {
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    background: var(--bg-page);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload-dropzone:hover {
    border-color: var(--brand-blue);
    background: rgba(29, 78, 216, 0.02);
}

.dropzone-icon {
    color: var(--brand-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.dropzone-main-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.dropzone-sub-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

.selected-file-display {
    margin-top: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-emerald);
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--status-emerald);
    font-weight: 700;
}

.btn-remove-file {
    background: none;
    border: none;
    color: #DC2626;
    font-size: 1.1rem;
    cursor: pointer;
    margin-right: 6px;
}

.live-audio-record-box {
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}

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

.audio-box-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.recording-timer {
    background: #DC2626;
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.recording-active {
    background: rgba(220, 38, 38, 0.1) !important;
    border-color: #DC2626 !important;
    color: #DC2626 !important;
}

.record-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #DC2626;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* History Modal Global Feed Styles */
.submissions-history-modal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-controls-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.85rem;
}

.history-search-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.history-search-wrap .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.hist-search-input {
    width: 100%;
    padding: 0.5rem 2.2rem 0.5rem 1rem;
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    color: var(--text-primary);
}

.history-filter-pills {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.hist-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hist-pill:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.hist-pill.active {
    background: var(--brand-navy);
    color: #FFFFFF;
    border-color: var(--brand-navy);
}

.history-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
}

.history-feed-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feed-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.feed-item-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 200px;
}

.feed-asg-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-blue);
}

.feed-sub-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.feed-item-meta-col {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

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

.feed-file-row {
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 0.4rem 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

.feed-file-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.feed-supervisor-note {
    background: rgba(217, 119, 6, 0.08);
    border-right: 3px solid var(--status-amber);
    padding: 0.5rem 0.75rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Empty States */
.tp-empty-state {
    grid-column: 1 / -1;
    padding: 3.5rem 1.5rem;
    text-align: center;
    background: var(--bg-surface);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.tp-empty-icon {
    color: var(--text-muted);
    opacity: 0.6;
}

.tp-empty-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.tp-empty-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 400px;
}

/* Badges across drawer & entries */
.entry-status-badge {
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-approved {
    background: rgba(5, 150, 105, 0.12);
    color: var(--status-emerald);
}

.badge-under-review {
    background: rgba(29, 78, 216, 0.1);
    color: var(--brand-blue);
}

.badge-revision {
    background: rgba(220, 38, 38, 0.1);
    color: #DC2626;
}

.badge-draft {
    background: var(--bg-input);
    color: var(--text-muted);
}

.entry-beneficiary-pill {
    background: rgba(217, 119, 6, 0.1);
    color: var(--status-amber);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.entry-duration-pill {
    background: rgba(29, 78, 216, 0.08);
    color: var(--brand-blue);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.entry-file-attachment {
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.file-attachment-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.file-text-details {
    display: flex;
    flex-direction: column;
}

.file-display-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.file-display-size {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.btn-view-file, .btn-xs.btn-file-view {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--brand-navy);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-view-file:hover, .btn-xs.btn-file-view:hover {
    background: var(--brand-navy);
    color: #FFFFFF;
}

.reflection-details-fold {
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
}

.reflection-details-summary {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.reflection-fold-content {
    padding: 0.65rem 0.85rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.supervisor-feedback-box {
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.25);
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.45rem;
}

.feedback-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.feedback-meta {
    display: flex;
    flex-direction: column;
}

.feedback-author {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feedback-title {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.feedback-score-badge {
    margin-right: auto;
    background: var(--status-amber);
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
}

.feedback-body-text {
    font-size: 0.84rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
    line-height: 1.5;
}

.entry-action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.btn-xs.btn-entry-edit {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--brand-blue);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.btn-xs.btn-entry-edit:hover {
    border-color: var(--brand-blue);
    background: rgba(29, 78, 216, 0.05);
}

.btn-xs.btn-entry-delete {
    background: var(--bg-surface);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #DC2626;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.btn-xs.btn-entry-delete:hover {
    background: #DC2626;
    color: #FFFFFF;
}

.btn-sm.btn-outline-danger {
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #DC2626;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-md, 6px);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-sm.btn-outline-danger:hover {
    background: #DC2626;
    color: #FFFFFF;
    border-color: #DC2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.feed-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-subtle);
    justify-content: flex-end;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .tp-metrics-matrix {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tp-container {
        padding: 1rem 0.75rem 3rem 0.75rem;
    }

    .tp-hero-header {
        padding: 1.15rem;
    }

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

    .tp-metrics-matrix {
        grid-template-columns: 1fr;
    }

    .tp-assignments-grid {
        grid-template-columns: 1fr;
    }

    .tp-reflection-grid {
        grid-template-columns: 1fr;
    }

    .tp-search-and-status-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tp-search-box {
        max-width: 100%;
    }
}
