/* ══════════════════════════════════════════════════════
   EduCompass — Profile / Archive Page Styles (V15)
   继承主站 style.css 全部变量与基础样式
   ══════════════════════════════════════════════════════ */

body.profile-page {
    background: var(--cream);
}

/* ─── HERO BANNER ──────────────────────────────────── */
.pf-hero {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 0;
}

.pf-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.pf-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.pf-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(15, 23, 42, 0.88) 0%,
            rgba(15, 23, 42, 0.70) 60%,
            rgba(15, 23, 42, 0.50) 100%);
}

.pf-hero-content {
    position: relative;
    z-index: 2;
    padding-top: 60px;
}

.pf-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-eyebrow i {
    font-size: 1rem;
}

.pf-headline {
    font-family: var(--sans);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 700px;
}

.pf-rule {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 22px;
    border-radius: 2px;
}

.pf-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pf-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: var(--navy);
    padding: 7px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--r-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pf-verified {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 7px;
}

.pf-verified i {
    color: #34d399;
}

.pf-scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.35);
    font-size: 1.1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ─── KPI STATISTICS STRIP ────────────────────────── */
.kpi-strip {
    background: var(--navy);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 32px 50px;
    margin: 48px 0;
    box-shadow: var(--sh-lg);
}

.kpi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
}

.kpi-label i {
    color: var(--gold);
}

.kpi-val {
    font-family: var(--display);
    font-size: 2.2rem;
    color: var(--white);
    line-height: 1;
}

.kpi-val.highlight-green {
    color: #34d399;
}

.kpi-val.highlight-gold {
    color: var(--gold);
}

.kpi-val.kpi-type {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0;
}

.kpi-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
}

/* ─── MAIN GRID LAYOUT ────────────────────────────── */
.pf-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 80px;
}

/* ─── CARDS ───────────────────────────────────────── */
.pf-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    overflow: hidden;
}

.pf-card-head {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: #FAFAF8;
}

.pf-card-eyebrow {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--gold-dk);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.pf-card-head h3 {
    font-family: var(--display);
    font-size: 1.15rem;
    color: var(--navy);
    font-weight: 600;
}

.pf-card-body {
    padding: 24px 28px;
}

/* ─── SIDEBAR: INFO LIST ─────────────────────────── */
.pf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px solid var(--cream-2);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row dt {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-lt);
}

.info-row dd {
    font-size: 0.95rem;
    color: var(--text-h);
    font-weight: 500;
    word-break: break-all;
}

.status-active {
    color: #059669 !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
}

.status-active i {
    font-size: 0.5rem;
    vertical-align: middle;
}

/* ─── SIDEBAR: QUICK ACTIONS ─────────────────────── */
.pf-card-actions .pf-card-body {
    padding: 12px 16px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    color: var(--text-b);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--t);
    margin-bottom: 4px;
}

.action-item:hover {
    background: var(--cream);
    color: var(--navy);
}

.action-item i {
    width: 20px;
    text-align: center;
    color: var(--text-m);
    transition: color var(--t);
}

.action-item:hover i {
    color: var(--gold-dk);
}

.action-item.action-danger {
    color: #dc2626;
}

.action-item.action-danger i {
    color: #dc2626;
}

.action-item.action-danger:hover {
    background: #fff5f5;
    color: #b91c1c;
}

/* ─── ARCHIVE CARD ─────────────────────────────────── */
.archive-card {
    display: flex;
    flex-direction: column;
}

.archive-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}



/* ─── SEARCH ──────────────────────────────────────── */
.pf-search {
    position: relative;
    display: flex;
    align-items: center;
}

.pf-search i {
    position: absolute;
    left: 14px;
    color: var(--text-lt);
    font-size: 0.85rem;
    pointer-events: none;
}

.pf-search input {
    padding: 10px 16px 10px 38px;
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.88rem;
    font-family: var(--sans);
    color: var(--text-b);
    background: var(--cream);
    width: 260px;
    transition: all var(--t);
}

.pf-search input:focus {
    outline: none;
    border-color: var(--gold-dk);
    background: var(--white);
    width: 300px;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
}

/* ─── ARCHIVE TABLE ───────────────────────────────── */
.archive-table-head {
    display: grid;
    grid-template-columns: 2fr 110px 110px 140px 160px;
    align-items: center;
    padding: 14px 28px;
    background: var(--cream-2);
    border-top: 1px solid var(--border);
    border-bottom: 2px solid var(--border-dk);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--navy);
    gap: 16px;
}

.archive-table-body {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-dk) var(--cream);
}

.archive-table-body::-webkit-scrollbar {
    width: 5px;
}

.archive-table-body::-webkit-scrollbar-track {
    background: var(--cream);
}

.archive-table-body::-webkit-scrollbar-thumb {
    background: var(--gold-dk);
    border-radius: 5px;
}

.archive-row {
    display: grid;
    grid-template-columns: 2fr 110px 110px 140px 160px;
    align-items: center;
    padding: 18px 28px;
    border-bottom: 1px solid var(--cream-2);
    gap: 16px;
    transition: background var(--t);
}

.archive-row:last-child {
    border-bottom: none;
}

.archive-row:hover {
    background: #FDFBF8;
}

/* Code Cell */
.ar-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ar-code::before {
    content: '#';
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 700;
}

/* Status Cell */
.ar-status {
    display: flex;
    align-items: center;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* 答题中 — 浅橙色 */
.status-tag.used {
    background: #ffedd5;
    color: #c2410c;
}

/* 已完成 — 浅绿色 */
.status-tag.completed {
    background: #dcfce7;
    color: #166534;
}

/* 可使用 — 浅灰 */
.status-tag.idle {
    background: var(--cream-2);
    color: var(--text-m);
}

.status-tag i {
    font-size: 0.6rem;
}

/* Date Cell */
.ar-date {
    font-size: 0.88rem;
    color: var(--text-m);
}

/* Action Cell */


.btn-dl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--r-sm);
    transition: all var(--t);
    cursor: pointer;
    border: none;
    font-family: var(--sans);
}

.btn-dl.active-dl {
    background: var(--navy);
    color: var(--white);
}

.btn-dl.active-dl:hover {
    background: var(--navy-2);
    transform: translateY(-1px);
    box-shadow: var(--sh-md);
}

.btn-dl.inactive-dl {
    background: var(--cream-2);
    color: var(--text-lt);
    cursor: not-allowed;
}

/* ─── LOADING / EMPTY STATES ─────────────────────── */
.archive-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 40px;
    color: var(--text-m);
    font-size: 0.95rem;
}

.archive-loading i {
    font-size: 2rem;
    color: var(--gold);
}

.archive-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 40px;
    text-align: center;
}

.archive-empty i {
    font-size: 3rem;
    color: var(--cream-3);
}

.archive-empty h4 {
    font-family: var(--display);
    font-size: 1.2rem;
    color: var(--text-h);
    font-weight: 600;
}

.archive-empty p {
    font-size: 0.9rem;
    color: var(--text-m);
    max-width: 360px;
    line-height: 1.6;
}

/* ─── FOOTER ─────────────────────────────────────── */
.pf-footer {
    background: var(--navy);
    padding: 48px 0;
}

.pf-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pf-footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--white);
    font-family: var(--display);
    font-size: 0.95rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

.pf-footer-copy {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.3px;
    text-align: center;
}

/* ─── NO ACTIVE NAV LINK UNDERLINE FOR ACTIVE ────── */
.profile-page .nav-a.active::after {
    width: 100%;
}

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1000px) {
    .pf-grid {
        grid-template-columns: 1fr;
    }

    .kpi-strip {
        flex-wrap: wrap;
        gap: 24px;
        padding: 28px 30px;
    }

    .kpi-divider {
        display: none;
    }

    .archive-table-head,
    .archive-row {
        grid-template-columns: 1fr 100px;
    }

    .at-date,
    .at-action,
    .at-realname,
    .ar-date,
    .ar-action,
    .ar-realname {
        display: none;
    }
}

@media (max-width: 640px) {
    .pf-hero {
        height: 360px;
    }

    .pf-headline {
        font-size: 1.8rem;
    }

    .kpi-strip {
        padding: 24px 20px;
    }

    .kpi-val {
        font-size: 1.7rem;
    }
}