/* =============================================================
   admin-badges.css -- Superadmin Achievements & Progress Dashboard
   ============================================================= */

.ab-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ab-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.ab-summary-card {
    background: #fff;
    border: 1px solid var(--green-border, #d2ebd9);
    border-radius: var(--radius, 12px);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.04));
}

.ab-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--green-wash, #f4faf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.ab-summary-info {
    display: flex;
    flex-direction: column;
}

.ab-summary-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink, #141e19);
    line-height: 1.2;
}

.ab-summary-lbl {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted, #607267);
}

/* --- Teacher Table / Cards --- */
.ab-teachers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.ab-teacher-row {
    background: #fff;
    border: 1px solid var(--green-border, #d2ebd9);
    border-radius: var(--radius, 12px);
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.ab-teacher-row:hover {
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.06));
    border-color: var(--green-light, #69c78c);
}

.ab-teacher-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 240px;
    flex: 1 1 280px;
}

.ab-teacher-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--green-wash, #f4faf6);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--green, #2f7d4f);
    flex-shrink: 0;
}

.ab-teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ab-teacher-name-block {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ab-teacher-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ab-teacher-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink, #141e19);
}

.ab-dept-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--green-wash, #f4faf6);
    border: 1px solid var(--green-border, #d2ebd9);
    color: var(--green, #2f7d4f);
}

.ab-teacher-sub {
    font-size: 12.5px;
    color: var(--muted, #607267);
}

.ab-teacher-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ab-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 70px;
}

.ab-stat-item-num {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink, #141e19);
}

.ab-stat-item-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted, #607267);
}

.ab-progress-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 150px;
}

.ab-progress-bar-shell {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.ab-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #55b878, #22c55e);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.ab-progress-bar-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted, #607267);
}

.ab-teacher-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* --- Admin Badge Management Modal --- */
.ab-modal-header-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--green-wash, #f4faf6);
    border: 1px solid var(--green-border, #d2ebd9);
    border-radius: var(--radius, 12px);
    margin-bottom: 16px;
}

.ab-modal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.ab-filter-btn {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    border: 1.5px solid var(--line, #e2e8f0);
    background: #fff;
    color: var(--ink, #141e19);
    cursor: pointer;
    transition: 0.15s;
}

.ab-filter-btn:hover {
    border-color: var(--green-light, #69c78c);
    color: var(--green, #2f7d4f);
}

.ab-filter-btn.active {
    background: var(--green, #2f7d4f);
    border-color: var(--green, #2f7d4f);
    color: #fff;
}

.ab-badge-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    max-height: 55vh;
    overflow-y: auto;
    padding-inline-end: 4px;
}

.ab-badge-card {
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius, 12px);
    padding: 14px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ab-badge-card.is-unlocked {
    border-color: #86efac;
    background: #f0fdf4;
}

.ab-badge-card.is-locked {
    opacity: 0.85;
    background: #fafafa;
}

.ab-badge-card .formal-emblem-wrap {
    width: 60px;
    height: 60px;
    margin-bottom: 4px;
}

.ab-badge-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--ink, #141e19);
    line-height: 1.3;
}

.ab-badge-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
}

.ab-badge-status-pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.ab-badge-status-pill.unlocked {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.ab-badge-status-pill.locked {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.ab-badge-note {
    font-size: 11px;
    color: #64748b;
    background: rgba(255,255,255,0.7);
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
    width: 100%;
    overflow-wrap: anywhere;
}

.ab-badge-card-actions {
    margin-top: auto;
    width: 100%;
    padding-top: 6px;
}

.ab-badge-card-actions .ds-btn {
    width: 100%;
    padding: 7px 10px;
    font-size: 12.5px;
    justify-content: center;
}

/* --- Badge Inspection Modal --- */
.badge-inspect-modal {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.badge-inspect-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    gap: 8px;
}
.badge-inspect-hero.tier-gold { border-color: #fde047; background: #fffdf5; }
.badge-inspect-hero.tier-silver { border-color: #e2e8f0; background: #f8fafc; }
.badge-inspect-hero.tier-bronze { border-color: #fed7aa; background: #fffaf5; }
.badge-inspect-hero.tier-diamond { border-color: #bae6fd; background: #f8fcff; }
.badge-inspect-hero.tier-obsidian { border-color: #cbd5e1; background: #f8fafc; }

.badge-inspect-hero .formal-emblem-wrap {
    inline-size: 80px;
    block-size: 80px;
    margin-bottom: 2px;
}
.badge-inspect-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink, #141e19);
}
.badge-inspect-milestone {
    font-size: 12.5px;
    font-weight: 700;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 3px 12px;
    border-radius: 999px;
}
.badge-inspect-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.badge-inspect-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}
.badge-inspect-text {
    font-size: 13.5px;
    color: #1e293b;
    line-height: 1.6;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
}
.badge-inspect-criteria {
    font-size: 13px;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 12px;
    line-height: 1.5;
}
.badge-inspect-note {
    font-size: 13px;
    color: #854d0e;
    background: #fefce8;
    border: 1px solid #fef08a;
    border-radius: 10px;
    padding: 10px 12px;
    line-height: 1.5;
}
