/* محور سير العملية الأكاديمية — الصفحة الرئيسية */
.academic-hub-wrap {
    margin-bottom: 12px;
}

.academic-hub-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(108, 76, 241, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(108, 76, 241, 0.08), rgba(37, 99, 235, 0.06));
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    font-family: inherit;
    text-align: right;
}

.academic-hub-trigger:hover {
    border-color: rgba(108, 76, 241, 0.45);
    box-shadow: 0 6px 20px rgba(108, 76, 241, 0.12);
    transform: translateY(-1px);
}

.academic-hub-trigger.is-open {
    border-color: #6C4CF1;
    background: linear-gradient(135deg, rgba(108, 76, 241, 0.14), rgba(37, 99, 235, 0.1));
}

.academic-hub-trigger__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6C4CF1, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.academic-hub-trigger__icon i,
.academic-hub-trigger__icon svg {
    color: #fff !important;
    stroke: #fff !important;
}

.academic-hub-trigger__text {
    flex: 1;
    min-width: 0;
}

.academic-hub-trigger__text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    color: #1e293b !important;
    line-height: 1.35;
}

.academic-hub-trigger__text small {
    display: block;
    font-size: 0.78rem;
    color: #64748b !important;
    margin-top: 2px;
}

.academic-hub-trigger__chevron {
    flex-shrink: 0;
    color: #6C4CF1 !important;
    transition: transform 0.25s ease;
}

.academic-hub-trigger.is-open .academic-hub-trigger__chevron {
    transform: rotate(180deg);
}

.academic-hub-submenu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
    padding: 4px 2px 2px;
    animation: ahp-slide 0.25s ease;
}

.academic-hub-submenu.hidden {
    display: none !important;
}

@keyframes ahp-slide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.academic-hub-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    min-height: 88px;
}

.academic-hub-option:hover {
    border-color: #6C4CF1;
    box-shadow: 0 6px 18px rgba(108, 76, 241, 0.15);
    transform: translateY(-2px);
}

.academic-hub-option__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.academic-hub-option--process .academic-hub-option__icon {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb !important;
}

.academic-hub-option--faculty .academic-hub-option__icon {
    background: rgba(108, 76, 241, 0.12);
    color: #6C4CF1 !important;
}

.academic-hub-option--polls .academic-hub-option__icon {
    background: rgba(16, 185, 129, 0.14);
    color: #059669 !important;
}

.academic-hub-option--polls:hover {
    border-color: #059669;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.18);
}

.academic-hub-option span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155 !important;
    text-align: center;
    line-height: 1.4;
}

/* نوافذ العرض العام */
.ahp-public-portal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 50%, #f1f5f9 100%);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ahp-public-portal.hidden {
    display: none !important;
}

body.ahp-portal-open {
    overflow: hidden !important;
}

.ahp-portal-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(10px);
}

.ahp-portal-topbar h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #fff !important;
}

.ahp-portal-topbar p {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65) !important;
}

.ahp-portal-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    z-index: 1000;
}

.ahp-portal-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.ahp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.ahp-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.ahp-stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ahp-stat-card label {
    display: block;
    font-size: 0.78rem;
    color: #64748b !important;
    margin-bottom: 4px;
}

.ahp-stat-card strong {
    font-size: 1.35rem;
    color: #0f172a !important;
}

.ahp-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    overflow-x: auto;
}

.ahp-table-wrap h3 {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ahp-public-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.ahp-public-table th,
.ahp-public-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
    white-space: nowrap;
}

.ahp-public-table th {
    background: #f8fafc;
    color: #475569 !important;
    font-weight: 700;
}

.ahp-faculty-cta {
    text-align: center;
    padding: 28px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 20px;
}

.ahp-faculty-cta p {
    color: #64748b !important;
    margin: 0 0 16px;
    line-height: 1.7;
}

/* Polls public portal */
.ahp-portal-topbar--polls {
    background: linear-gradient(135deg, #065f46 0%, #059669 50%, #6C4CF1 100%);
}

.ahp-polls-identify {
    text-align: center;
    padding: 32px 24px;
    border-radius: 16px;
    max-width: 420px;
    margin: 20px auto;
}

.ahp-polls-identify__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ahp-polls-identify__icon i { width: 32px; height: 32px; }

.ahp-polls-identify h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: #0f172a;
}

.ahp-polls-identify__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.ahp-polls-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.ahp-polls-input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
}

.ahp-polls-results-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 72px;
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #6C4CF1 0%, #2563eb 100%);
    color: #fff !important;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(108, 76, 241, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ahp-polls-results-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(108, 76, 241, 0.45);
}

.ahp-polls-results-btn i,
.ahp-polls-results-btn svg {
    width: 22px;
    height: 22px;
    stroke: #fff !important;
    color: #fff !important;
}

.ahp-polls-continue-btn {
    width: 100%;
}

.ahp-polls-identify-hint {
    font-size: 0.82rem;
    margin-top: 12px;
}

/* صفحة النتائج العامة */
.ahp-polls-results-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 4px 32px;
}

.ahp-polls-results-hero {
    margin-bottom: 22px;
}

.ahp-polls-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #475569 !important;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ahp-polls-back-btn:hover { background: #f8fafc; }

.ahp-polls-results-hero__text {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.08) 0%, rgba(108, 76, 241, 0.08) 100%);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.ahp-polls-results-hero__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #059669, #6C4CF1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ahp-polls-results-hero__icon i,
.ahp-polls-results-hero__icon svg { width: 28px; height: 28px; }

.ahp-polls-results-hero__text h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a !important;
}

.ahp-polls-results-hero__text p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b !important;
}

.ahp-polls-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.ahp-poll-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ahp-poll-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(108, 76, 241, 0.12);
}

.ahp-pr-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.ahp-pr-status {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ahp-pr-status--active { background: rgba(16, 185, 129, 0.12); color: #059669; }
.ahp-pr-status--ended { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.ahp-pr-status--paused { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.ahp-pr-status--closed { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.ahp-pr-status--upcoming { background: rgba(37, 99, 235, 0.1); color: #2563eb; }

.ahp-pr-type {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.ahp-pr-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a !important;
    line-height: 1.45;
}

.ahp-pr-desc {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: #64748b !important;
    line-height: 1.55;
}

.ahp-pr-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 14px;
    font-size: 0.8rem;
}

.ahp-pr-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #64748b !important;
}

.ahp-pr-meta-item i,
.ahp-pr-meta-item svg { width: 14px; height: 14px; }

.ahp-pr-leader {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
    color: #b45309 !important;
    font-weight: 700;
}

.ahp-pr-leader i,
.ahp-pr-leader svg { width: 14px; height: 14px; }

.ahp-pr-bar { margin-bottom: 10px; }

.ahp-pr-bar--lead .ahp-pr-track {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.ahp-pr-bar__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.82rem;
    color: #334155 !important;
}

.ahp-pr-bar__head strong {
    font-variant-numeric: tabular-nums;
    color: #0f172a !important;
}

.ahp-pr-bar__head small {
    font-weight: 600;
    color: #94a3b8;
}

.ahp-pr-winner {
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    background: #fef3c7;
    color: #b45309;
    margin-right: 4px;
}

.ahp-pr-track {
    height: 10px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.ahp-pr-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}

.ahp-pr-rating {
    text-align: center;
    padding: 12px 0 4px;
}

.ahp-pr-rating__ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(108, 76, 241, 0.12), rgba(37, 99, 235, 0.08));
    border: 3px solid #6C4CF1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ahp-pr-rating__ring span {
    font-size: 1.75rem;
    font-weight: 800;
    color: #6C4CF1;
}

.ahp-pr-rating p {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b !important;
}

.ahp-pr-open-count {
    font-weight: 700;
    color: #334155 !important;
    margin: 0 0 8px;
}

.ahp-pr-open-sample {
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.8rem;
    border-right: 3px solid #6C4CF1;
    color: #475569 !important;
}

.ahp-polls-results-empty {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 16px;
}

.ahp-polls-results-empty i,
.ahp-polls-results-empty svg {
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.ahp-polls-results-empty h3 {
    margin: 0 0 8px;
    color: #0f172a !important;
}

.ahp-polls-results-empty p {
    margin: 0;
    color: #64748b !important;
    font-size: 0.9rem;
}

.ahp-polls-intro {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-right: 3px solid #059669;
    font-size: 0.9rem;
    color: #334155;
}

.ahp-polls-empty {
    padding: 40px 20px;
}

.sv-results-inline {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px dashed #e2e8f0;
    animation: sv-fadeIn 0.4s ease;
}

.sv-results-inline h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: #059669;
}

.academic-home-settings {
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(108, 76, 241, 0.15);
    background: linear-gradient(135deg, rgba(108, 76, 241, 0.04), rgba(37, 99, 235, 0.03));
}

.academic-home-settings h4 {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.academic-home-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 640px) {
    .academic-hub-submenu,
    .academic-hub-submenu--hero {
        grid-template-columns: 1fr;
    }

    .ahp-portal-close span {
        display: none;
    }

    .ahp-polls-input-row {
        flex-direction: column;
    }

    .ahp-polls-results-btn {
        flex-direction: row;
        min-width: 100%;
        padding: 12px;
        font-size: 0.85rem;
    }

    .ahp-polls-results-grid {
        grid-template-columns: 1fr;
    }

    .ahp-polls-results-hero__text {
        flex-direction: column;
        text-align: center;
    }
}

/* بطاقات السجلات الأكاديمية — عرض الجدول الكامل */
.academic-records-full-view,
.ahp-records-cards,
.landing-academic-process-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.academic-record-card {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.academic-record-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(108, 76, 241, 0.06), rgba(37, 99, 235, 0.04));
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.academic-record-card__meta h4 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.academic-record-card__meta p {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
}

.academic-record-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.academic-record-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.academic-vis-badge.vis-all { background: rgba(16, 185, 129, 0.12); color: #059669; }
.academic-vis-badge.vis-quality { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.academic-vis-badge.vis-private { background: rgba(100, 116, 139, 0.12); color: #64748b; }

.academic-excel-table--saved {
    margin: 0;
    font-size: 0.82rem;
}

.academic-excel-table--saved th,
.academic-excel-table--saved td {
    padding: 8px 10px;
    white-space: nowrap;
}

.academic-excel-table--compact {
    font-size: 0.78rem;
}

.academic-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.academic-empty-state i,
.academic-empty-state svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.ahp-viewer-note {
    font-size: 0.85rem;
    color: #64748b;
    padding: 10px 14px;
    background: rgba(37, 99, 235, 0.06);
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .academic-record-card__header {
        flex-direction: column;
    }
    .academic-excel-table--saved {
        font-size: 0.72rem;
    }
}

/* بوابة دخول متابعة التنفيذ */
.ahp-process-auth {
    max-width: 480px;
    margin: 24px auto 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px 24px 24px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.ahp-process-auth__hero {
    text-align: center;
    margin-bottom: 22px;
}

.ahp-process-auth__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(108, 76, 241, 0.12));
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ahp-process-auth__icon i,
.ahp-process-auth__icon svg { width: 32px; height: 32px; }

.ahp-process-auth__hero h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a !important;
}

.ahp-process-auth__hero p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b !important;
    line-height: 1.65;
}

.ahp-process-auth__tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 18px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 12px;
}

.ahp-auth-tab {
    padding: 10px 8px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ahp-auth-tab.active {
    background: #fff;
    color: #2563eb !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.ahp-auth-panel {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.ahp-auth-panel.active {
    display: flex;
}

.ahp-auth-panel label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569 !important;
}

.ahp-auth-panel input,
.ahp-auth-panel select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: #0f172a;
}

.ahp-auth-panel input:focus,
.ahp-auth-panel select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ahp-auth-error {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626 !important;
    font-size: 0.85rem;
    text-align: center;
}

.ahp-auth-error.hidden { display: none !important; }

/* جدول متابعة التنفيذ العام */
.ahp-track-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ahp-track-welcome h3 {
    margin: 4px 0 4px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a !important;
}

.ahp-track-welcome p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b !important;
}

.ahp-track-role {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.ahp-track-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #64748b !important;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.ahp-track-logout:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.ahp-track-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.ahp-track-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.ahp-track-stat label {
    display: block;
    font-size: 0.75rem;
    color: #64748b !important;
    margin-bottom: 4px;
}

.ahp-track-stat strong {
    font-size: 1.35rem;
    color: #0f172a !important;
    font-variant-numeric: tabular-nums;
}

.ahp-track-table-wrap { padding: 18px; }

.ahp-track-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ahp-track-table .ahp-td-course {
    white-space: normal;
    min-width: 160px;
}

.ahp-td-course strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a !important;
}

.ahp-nature-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.ahp-nature--theoretical { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.ahp-nature--practical { background: rgba(16, 185, 129, 0.12); color: #059669; }

.ahp-td-num {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #0f172a !important;
}

.ahp-td-done { color: #2563eb !important; }

.ahp-td-teacher {
    max-width: 180px;
    white-space: normal;
    font-size: 0.85rem;
}

.ahp-td-progress {
    min-width: 130px;
}

.ahp-prog-wrap {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 4px;
}

.ahp-prog-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.ahp-prog--high { background: linear-gradient(90deg, #10b981, #34d399); color: #059669; }
.ahp-prog--mid { background: linear-gradient(90deg, #f59e0b, #fbbf24); color: #d97706; }
.ahp-prog--low { background: linear-gradient(90deg, #ef4444, #f87171); color: #dc2626; }

.ahp-prog-pct {
    font-size: 0.82rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.ahp-track-empty {
    text-align: center;
    padding: 48px 20px;
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 16px;
    color: #64748b;
}

.ahp-track-empty i,
.ahp-track-empty svg {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    opacity: 0.45;
}

.ahp-track-empty small {
    display: block;
    margin-top: 8px;
    font-size: 0.82rem;
}

@media (max-width: 640px) {
    .ahp-process-auth { margin: 12px 8px 24px; padding: 20px 16px; }
    .ahp-process-auth__tabs { grid-template-columns: 1fr; }
    .ahp-track-stats { grid-template-columns: 1fr; }
    .ahp-track-header { flex-direction: column; }
    .ahp-polls-input-row { flex-direction: column; }
    .ahp-polls-results-btn {
        flex-direction: row;
        min-width: 100%;
        padding: 12px;
        font-size: 0.85rem;
    }
    .ahp-polls-results-grid { grid-template-columns: 1fr; }
    .ahp-polls-results-hero__text { flex-direction: column; text-align: center; }
}
