.audit-page { max-width: 900px; margin: 0 auto; }

.audit-back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--purple-600); text-decoration: none; font-weight: 600;
    font-size: .88rem; margin-bottom: 16px;
}

.audit-hero {
    background: linear-gradient(145deg, rgba(16,185,129,.12), rgba(99,102,241,.08));
    border: 1px solid rgba(16,185,129,.22);
    border-radius: 20px; padding: 22px 24px; margin-bottom: 20px;
}
.audit-hero h1 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.audit-hero p { color: var(--text-muted); font-size: .88rem; }

.audit-menu { display: grid; gap: 12px; }
.audit-menu-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px; border-radius: 18px;
    background: var(--glass); border: 1px solid var(--glass-border);
    text-decoration: none; color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.audit-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99,102,241,.1);
}
.audit-menu-icon { font-size: 1.6rem; }
.audit-menu-card strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.audit-menu-card small { color: var(--text-muted); font-size: .8rem; line-height: 1.45; }
.audit-menu-arrow { margin-right: auto; color: var(--purple-600); font-weight: 700; }

.audit-payments-list { display: grid; gap: 14px; }
.audit-pay-card {
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 18px; padding: 18px 20px;
}
.audit-pay-head {
    display: flex; flex-wrap: wrap; align-items: flex-start;
    justify-content: space-between; gap: 10px; margin-bottom: 12px;
}
.audit-pay-head h3 { font-size: 1rem; font-weight: 800; }
.audit-pay-code { font-size: .78rem; color: var(--text-muted); font-family: monospace; }

.audit-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700;
}
.audit-status.waiting { background: rgba(245,158,11,.14); color: #b45309; border: 1px solid rgba(245,158,11,.3); }
.audit-status.review { background: rgba(59,130,246,.12); color: #1d4ed8; border: 1px solid rgba(59,130,246,.28); }
.audit-status.approved { background: rgba(16,185,129,.12); color: #047857; border: 1px solid rgba(16,185,129,.28); }
.audit-status.other { background: rgba(107,114,128,.1); color: #4b5563; border: 1px solid rgba(107,114,128,.2); }

.audit-pay-meta {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px; margin-bottom: 12px;
}
.audit-pay-meta div {
    background: rgba(255,255,255,.45); border-radius: 12px; padding: 10px 12px;
    border: 1px solid var(--glass-border);
}
.audit-pay-meta span { display: block; font-size: .72rem; color: var(--text-muted); margin-bottom: 3px; }
.audit-pay-meta strong { font-size: .86rem; }

.audit-upload {
    margin-top: 14px; padding-top: 14px;
    border-top: 1px dashed rgba(99,102,241,.22);
}
.audit-upload-head {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.audit-upload-head p { font-size: .82rem; color: var(--text-muted); }

.audit-empty {
    text-align: center; padding: 48px 20px;
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 20px;
}
.audit-empty span { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.audit-empty p { color: var(--text-muted); margin-bottom: 18px; }

.audit-pay-actions {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.audit-btn-cancel {
    padding: 9px 14px; border-radius: 10px; border: 1px solid rgba(239,68,68,.35);
    background: rgba(239,68,68,.08); color: #b91c1c;
    font-family: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.audit-btn-cancel:hover { background: rgba(239,68,68,.14); }

.audit-recv-toggle {
    display: block; width: 100%; text-align: right; background: none; border: none;
    padding: 0; font-family: inherit; color: inherit; cursor: pointer;
}
.audit-menu-card.audit-menu-primary {
    border-color: rgba(99,102,241,.35);
    background: linear-gradient(145deg, rgba(99,102,241,.1), rgba(16,185,129,.06));
}
.audit-current-sub { margin-bottom: 16px; }
.audit-current-card {
    background: var(--glass); border: 1px solid rgba(99,102,241,.28);
    border-radius: 18px; padding: 18px 20px;
}
.audit-current-label { font-size: .78rem; color: var(--text-muted); margin-bottom: 4px; }
.audit-current-name { font-size: 1.15rem; font-weight: 800; display: block; }
.audit-note-student {
    margin-top: 12px; padding: 12px 14px; border-radius: 12px;
    border: 1px dashed rgba(16,185,129,.35); background: rgba(16,185,129,.08);
}
.audit-note-student strong { display: block; margin-bottom: 6px; font-size: .8rem; color: #047857; }
.audit-note-student p { margin: 0; font-size: .86rem; line-height: 1.65; }
.audit-recv-detail { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(99,102,241,.22); }
.audit-stages {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px;
}
.audit-stage {
    font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
    background: rgba(107,114,128,.1); color: #6b7280;
}
.audit-stage.active { background: rgba(59,130,246,.12); color: #1d4ed8; }
.audit-stage.done { background: rgba(16,185,129,.12); color: #047857; }
.audit-stage.is-cancel { background: rgba(239,68,68,.1); color: #b91c1c; }
.audit-stage-sep { color: var(--text-muted); font-size: .75rem; }

.audit-doc-thumbs {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px;
}
.audit-thumb-btn {
    width: 76px; height: 76px; padding: 0; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--glass-border); background: #fff; cursor: zoom-in;
}
.audit-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.audit-text-doc {
    margin-top: 10px; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--glass-border); background: rgba(248,250,252,.9);
}
.audit-text-doc strong { display: block; margin-bottom: 6px; font-size: .8rem; }
.audit-text-doc pre {
    margin: 0; white-space: pre-wrap; word-break: break-word;
    font: inherit; font-size: .86rem; line-height: 1.65;
}

.sf-lightbox {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15, 23, 42, 0.82);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.sf-lightbox.hidden { display: none !important; }
.sf-lightbox img {
    max-width: min(96vw, 920px); max-height: 88vh;
    border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.sf-lightbox-close {
    position: absolute; top: 16px; left: 16px;
    width: 42px; height: 42px; border: none; border-radius: 999px;
    background: rgba(255,255,255,.92); color: #0f172a;
    font-size: 1.4rem; cursor: pointer; line-height: 1;
}

.hidden { display: none !important; }
