.hbv2-page {
    --hbv2-green: #173d2d;
    --hbv2-green-2: #245c43;
    --hbv2-green-soft: #edf6f0;
    --hbv2-gold: #c59b45;
    --hbv2-gold-soft: #faf4e7;
    --hbv2-text: #183228;
    --hbv2-muted: #6b7c74;
    --hbv2-border: #dfe8e3;
    --hbv2-bg: #f5f8f6;
    --hbv2-danger: #b83f45;

    color: var(--hbv2-text);
    display: grid;
    gap: 18px;
    width: 100%;
}

.hbv2-page *,
.hbv2-page *::before,
.hbv2-page *::after {
    box-sizing: border-box;
}

.hbv2-page button,
.hbv2-page input,
.hbv2-page select {
    font: inherit;
}

.hbv2-hero {
    align-items: center;
    background:
        radial-gradient(circle at 10% 0%, rgba(197, 155, 69, .22), transparent 34%),
        linear-gradient(135deg, #143729, #225740);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(23, 61, 45, .18);
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    min-height: 130px;
    overflow: hidden;
    padding: 24px 28px;
    position: relative;
}

.hbv2-hero h1 {
    font-size: clamp(25px, 3vw, 38px);
    line-height: 1.25;
    margin: 0;
}

.hbv2-hero p {
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
    max-width: 650px;
}

.hbv2-kicker {
    color: #f3d89d;
    font-size: 13px;
    font-weight: 900;
}

.hbv2-hero-actions,
.hbv2-detail-actions,
.hbv2-card-actions,
.hbv2-editor-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hbv2-btn {
    align-items: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    text-decoration: none;
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        opacity .16s ease;
}

.hbv2-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.hbv2-btn:disabled {
    cursor: not-allowed;
    opacity: .52;
}

.hbv2-btn.primary {
    background: linear-gradient(135deg, var(--hbv2-gold), #d8b76d);
    box-shadow: 0 9px 20px rgba(197, 155, 69, .2);
    color: #1f3027;
}

.hbv2-btn.secondary {
    background: linear-gradient(135deg, var(--hbv2-green), var(--hbv2-green-2));
    color: #fff;
}

.hbv2-btn.light {
    background: #fff;
    color: var(--hbv2-green);
}

.hbv2-btn.ghost {
    background: var(--hbv2-green-soft);
    color: var(--hbv2-green);
}

.hbv2-btn.danger-soft {
    background: #fff0f0;
    color: var(--hbv2-danger);
}

.hbv2-message {
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    padding: 13px 16px;
}

.hbv2-message.error {
    background: #fff1f1;
    border: 1px solid #f1caca;
    color: #a42d35;
}

.hbv2-message.success {
    background: #ecf8f0;
    border: 1px solid #c5e5d0;
    color: #24673f;
}

.hbv2-summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hbv2-summary-grid article {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hbv2-border);
    border-radius: 17px;
    display: flex;
    justify-content: space-between;
    min-height: 78px;
    padding: 15px 17px;
}

.hbv2-summary-grid span {
    color: var(--hbv2-muted);
    font-size: 13px;
    font-weight: 800;
}

.hbv2-summary-grid strong {
    color: var(--hbv2-green);
    font-size: 25px;
}

.hbv2-section {
    background: #fff;
    border: 1px solid var(--hbv2-border);
    border-radius: 21px;
    box-shadow: 0 12px 35px rgba(24, 50, 40, .055);
    padding: 21px;
}

.hbv2-section-head {
    align-items: center;
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.hbv2-section-head > div:first-child {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hbv2-section-head h2 {
    font-size: 20px;
    margin: 0;
}

.hbv2-section-head p {
    color: var(--hbv2-muted);
    flex-basis: 100%;
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

.hbv2-step {
    align-items: center;
    background: var(--hbv2-green);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.hbv2-campaign-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hbv2-campaign-card {
    background:
        linear-gradient(180deg, #fff, #fbfdfc);
    border: 1px solid var(--hbv2-border);
    border-radius: 18px;
    display: grid;
    gap: 14px;
    padding: 17px;
}

.hbv2-card-head {
    align-items: flex-start;
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.hbv2-card-head h3 {
    font-size: 18px;
    margin: 8px 0 0;
}

.hbv2-result-count {
    background: var(--hbv2-gold-soft);
    border-radius: 11px;
    color: #805e20;
    font-size: 13px;
    padding: 7px 10px;
    white-space: nowrap;
}

.hbv2-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    padding: 5px 9px;
}

.hbv2-status.draft {
    background: #eef2f0;
    color: #68766f;
}

.hbv2-status.calculated {
    background: #fff3d8;
    color: #906819;
}

.hbv2-status.approved {
    background: #e7f5ec;
    color: #287047;
}

.hbv2-status.published {
    background: #e5f0ff;
    color: #285f9e;
}

.hbv2-status.archived {
    background: #f0ebf6;
    color: #6c4b87;
}

.hbv2-campaign-context,
.hbv2-criteria-pills,
.hbv2-result-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.hbv2-campaign-context span,
.hbv2-criteria-pills span,
.hbv2-result-breakdown span {
    background: var(--hbv2-bg);
    border: 1px solid var(--hbv2-border);
    border-radius: 999px;
    color: var(--hbv2-muted);
    font-size: 11px;
    font-weight: 800;
    padding: 6px 9px;
}

.hbv2-criteria-pills b,
.hbv2-result-breakdown b {
    color: var(--hbv2-green);
    margin-right: 3px;
}

.hbv2-form-grid {
    display: grid;
    gap: 13px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hbv2-form-grid label,
.hbv2-criterion-settings label {
    display: grid;
    gap: 7px;
}

.hbv2-form-grid label.wide {
    grid-column: span 2;
}

.hbv2-form-grid label > span,
.hbv2-criterion-settings label > span {
    color: var(--hbv2-muted);
    font-size: 12px;
    font-weight: 900;
}

.hbv2-form-grid input,
.hbv2-form-grid select,
.hbv2-criterion-settings input,
.hbv2-criterion-settings select {
    background: #fff;
    border: 1px solid #d8e3dd;
    border-radius: 11px;
    color: var(--hbv2-text);
    min-height: 44px;
    outline: none;
    padding: 9px 11px;
    width: 100%;
}

.hbv2-form-grid input:focus,
.hbv2-form-grid select:focus,
.hbv2-criterion-settings input:focus,
.hbv2-criterion-settings select:focus {
    border-color: #8fb6a1;
    box-shadow: 0 0 0 3px rgba(36, 92, 67, .08);
}

.hbv2-load-items-wrap {
    align-items: end;
    display: flex;
}

.hbv2-load-items-wrap .hbv2-btn {
    width: 100%;
}

.hbv2-hint,
.hbv2-criterion-empty {
    background: var(--hbv2-bg);
    border: 1px dashed #cbdad2;
    border-radius: 13px;
    color: var(--hbv2-muted);
    font-size: 13px;
    padding: 14px;
    text-align: center;
}

.hbv2-available-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hbv2-available-stats span {
    align-items: center;
    background: var(--hbv2-bg);
    border: 1px solid var(--hbv2-border);
    border-radius: 12px;
    color: var(--hbv2-muted);
    display: flex;
    font-size: 11px;
    font-weight: 800;
    justify-content: space-between;
    padding: 10px;
}

.hbv2-available-stats b {
    color: var(--hbv2-green);
    font-size: 16px;
}

.hbv2-add-criteria {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 14px;
}

.hbv2-add-criteria button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hbv2-border);
    border-radius: 12px;
    color: var(--hbv2-text);
    cursor: pointer;
    display: flex;
    font-size: 12px;
    font-weight: 900;
    gap: 7px;
    justify-content: center;
    min-height: 45px;
    padding: 8px;
}

.hbv2-add-criteria button:hover {
    background: var(--hbv2-green-soft);
    border-color: #a9c5b5;
}

.hbv2-weight-meter {
    align-items: center;
    border-radius: 13px;
    display: flex;
    gap: 10px;
    padding: 9px 12px;
}

.hbv2-weight-meter.valid {
    background: #e9f7ee;
    color: #24673f;
}

.hbv2-weight-meter.invalid {
    background: #fff1e6;
    color: #9b5623;
}

.hbv2-weight-meter span {
    font-size: 11px;
    font-weight: 800;
}

.hbv2-weight-meter strong {
    font-size: 18px;
}

.hbv2-criteria-list {
    display: grid;
    gap: 13px;
    margin-top: 15px;
}

.hbv2-criterion-card {
    border: 1px solid var(--hbv2-border);
    border-radius: 17px;
    overflow: hidden;
    padding: 16px;
}

.hbv2-criterion-head {
    align-items: flex-start;
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.hbv2-criterion-title {
    align-items: center;
    display: flex;
    gap: 11px;
}

.hbv2-criterion-title strong {
    display: block;
    font-size: 15px;
}

.hbv2-criterion-title small {
    color: var(--hbv2-muted);
    display: block;
    font-size: 11px;
    margin-top: 3px;
}

.hbv2-criterion-icon {
    align-items: center;
    background: var(--hbv2-gold-soft);
    border-radius: 12px;
    color: #8d661e;
    display: inline-flex;
    font-size: 18px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.hbv2-icon-btn {
    align-items: center;
    background: #f5f7f6;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font-size: 20px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.hbv2-icon-btn.danger {
    background: #fff0f0;
    color: var(--hbv2-danger);
}

.hbv2-criterion-settings {
    display: grid;
    gap: 11px;
    grid-template-columns: .8fr 1.5fr .5fr;
    margin-top: 14px;
}

.hbv2-criterion-settings .weight > div {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 22px;
}

.hbv2-selected-summary {
    color: var(--hbv2-muted);
    font-size: 12px;
    margin: 13px 0 8px;
}

.hbv2-selected-summary strong {
    color: var(--hbv2-green);
}

.hbv2-item-picker {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 330px;
    overflow-y: auto;
    padding: 2px;
}

.hbv2-item-option {
    align-items: flex-start;
    background: var(--hbv2-bg);
    border: 1px solid var(--hbv2-border);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    gap: 9px;
    min-width: 0;
    padding: 11px;
}

.hbv2-item-option.selected {
    background: var(--hbv2-green-soft);
    border-color: #9abca8;
}

.hbv2-item-option input {
    display: none;
}

.hbv2-check-mark {
    border: 2px solid #aebdb5;
    border-radius: 5px;
    flex: 0 0 auto;
    height: 18px;
    margin-top: 1px;
    position: relative;
    width: 18px;
}

.hbv2-item-option.selected .hbv2-check-mark {
    background: var(--hbv2-green);
    border-color: var(--hbv2-green);
}

.hbv2-item-option.selected .hbv2-check-mark::after {
    color: #fff;
    content: '✓';
    font-size: 12px;
    font-weight: 900;
    left: 2px;
    position: absolute;
    top: -2px;
}

.hbv2-item-copy {
    min-width: 0;
}

.hbv2-item-copy strong,
.hbv2-item-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hbv2-item-copy strong {
    font-size: 12px;
    white-space: nowrap;
}

.hbv2-item-copy small {
    color: var(--hbv2-muted);
    font-size: 10px;
    line-height: 1.6;
    margin-top: 3px;
}

.hbv2-editor-actions {
    background: #fff;
    border: 1px solid var(--hbv2-border);
    border-radius: 18px;
    bottom: 12px;
    box-shadow: 0 15px 40px rgba(24, 50, 40, .12);
    justify-content: flex-end;
    padding: 12px;
    position: sticky;
    z-index: 5;
}

.hbv2-empty,
.hbv2-loading {
    align-items: center;
    background: var(--hbv2-bg);
    border: 1px dashed #ccd9d2;
    border-radius: 16px;
    color: var(--hbv2-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-height: 150px;
    padding: 20px;
    text-align: center;
}

.hbv2-empty.compact {
    min-height: 110px;
    margin-top: 15px;
}

.hbv2-empty strong {
    color: var(--hbv2-text);
}

.hbv2-detail-hero {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--hbv2-border);
    border-radius: 21px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 21px;
}

.hbv2-detail-hero h2 {
    font-size: 24px;
    margin: 11px 0 5px;
}

.hbv2-detail-hero p {
    color: var(--hbv2-muted);
    font-size: 13px;
    margin: 0;
}

.hbv2-back {
    background: transparent;
    border: 0;
    color: var(--hbv2-green);
    cursor: pointer;
    display: block;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 10px;
    padding: 0;
}

.hbv2-results-list {
    display: grid;
    gap: 9px;
}

.hbv2-result-row {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hbv2-border);
    border-radius: 15px;
    display: grid;
    gap: 12px;
    grid-template-columns: 30px 55px minmax(0, 1fr) 110px 105px;
    padding: 12px;
}

.hbv2-result-row.selected {
    background: var(--hbv2-green-soft);
    border-color: #9cbca9;
}

.hbv2-result-check input {
    display: none;
}

.hbv2-result-check span {
    border: 2px solid #adbbb4;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    height: 21px;
    position: relative;
    width: 21px;
}

.hbv2-result-check input:checked + span {
    background: var(--hbv2-green);
    border-color: var(--hbv2-green);
}

.hbv2-result-check input:checked + span::after {
    color: #fff;
    content: '✓';
    font-size: 13px;
    font-weight: 900;
    left: 3px;
    position: absolute;
    top: -1px;
}

.hbv2-rank strong {
    color: var(--hbv2-gold);
    font-size: 19px;
}

.hbv2-student {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.hbv2-student img,
.hbv2-avatar-letter {
    border-radius: 50%;
    flex: 0 0 auto;
    height: 43px;
    object-fit: cover;
    width: 43px;
}

.hbv2-avatar-letter {
    align-items: center;
    background: var(--hbv2-green);
    color: #fff;
    display: flex;
    font-size: 17px;
    font-weight: 900;
    justify-content: center;
}

.hbv2-student > div {
    min-width: 0;
}

.hbv2-student > div > strong {
    display: block;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hbv2-student > div > small {
    color: var(--hbv2-muted);
    display: block;
    font-size: 10px;
    margin-top: 2px;
}

.hbv2-result-breakdown {
    margin-top: 6px;
}

.hbv2-result-breakdown span {
    font-size: 9px;
    padding: 4px 7px;
}

.hbv2-score {
    text-align: center;
}

.hbv2-score strong {
    color: var(--hbv2-green);
    display: block;
    font-size: 19px;
}

.hbv2-score small {
    color: var(--hbv2-muted);
    display: block;
    font-size: 9px;
    margin-top: 2px;
}

.hbv2-result-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.hbv2-result-flags span {
    background: #eff3f1;
    border-radius: 999px;
    color: #6d7973;
    font-size: 9px;
    font-weight: 900;
    padding: 5px 7px;
}

.hbv2-result-flags .approved {
    background: #e8f6ed;
    color: #287047;
}

.hbv2-result-flags .published {
    background: #e5f0ff;
    color: #285f9e;
}

@media (max-width: 1150px) {
    .hbv2-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbv2-available-stats,
    .hbv2-add-criteria {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hbv2-result-row {
        grid-template-columns: 30px 50px minmax(0, 1fr) 95px;
    }

    .hbv2-result-flags {
        grid-column: 3 / -1;
    }
}

@media (max-width: 760px) {
    .hbv2-page {
        gap: 12px;
    }

    .hbv2-hero {
        align-items: stretch;
        border-radius: 18px;
        flex-direction: column;
        min-height: 0;
        padding: 20px 16px;
    }

    .hbv2-hero h1 {
        font-size: 25px;
    }

    .hbv2-hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbv2-summary-grid {
        gap: 7px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbv2-summary-grid article {
        min-height: 62px;
        padding: 11px;
    }

    .hbv2-summary-grid strong {
        font-size: 20px;
    }

    .hbv2-section,
    .hbv2-detail-hero {
        border-radius: 16px;
        padding: 14px;
    }

    .hbv2-section-head,
    .hbv2-detail-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .hbv2-campaign-grid,
    .hbv2-form-grid,
    .hbv2-criterion-settings,
    .hbv2-item-picker {
        grid-template-columns: 1fr;
    }

    .hbv2-form-grid label.wide {
        grid-column: auto;
    }

    .hbv2-available-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbv2-add-criteria {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbv2-item-picker {
        max-height: 420px;
    }

    .hbv2-detail-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbv2-detail-actions .hbv2-btn {
        min-width: 0;
        padding-inline: 8px;
    }

    .hbv2-result-row {
        align-items: start;
        gap: 8px;
        grid-template-columns: 24px 38px minmax(0, 1fr);
        padding: 10px;
    }

    .hbv2-rank strong {
        font-size: 15px;
    }

    .hbv2-student img,
    .hbv2-avatar-letter {
        height: 36px;
        width: 36px;
    }

    .hbv2-score {
        align-items: center;
        display: flex;
        gap: 8px;
        grid-column: 3;
        justify-content: flex-start;
        text-align: right;
    }

    .hbv2-score strong {
        font-size: 16px;
    }

    .hbv2-result-flags {
        grid-column: 3;
        justify-content: flex-start;
    }

    .hbv2-editor-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* HONOR BOARD V2 EDITOR REDESIGN CANDIDATE */

.hbv2-add-criteria button.active,
.hbv2-add-criteria button:disabled {
    border-color: #176044;
    background: #edf7f1;
    color: #174d37;
    opacity: 1;
}

.hbv2-weight-control {
    margin-top: 16px;
    padding: 15px;
    border: 1px solid #dce8e0;
    border-radius: 15px;
    background: #f7faf8;
}

.hbv2-weight-control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.hbv2-weight-control-head span {
    font-weight: 800;
    color: #395948;
}

.hbv2-weight-control-head strong {
    min-width: 58px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #e4f2e9;
    color: #14583c;
    text-align: center;
}

.hbv2-weight-control-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 11px;
}

.hbv2-weight-control-row button {
    width: 42px;
    height: 40px;
    border: 1px solid #cadbd0;
    border-radius: 11px;
    background: #fff;
    color: #184f39;
    font-size: 1.35rem;
    font-weight: 900;
    cursor: pointer;
}

.hbv2-weight-control-row button:disabled {
    opacity: 0.45;
    cursor: default;
}

.hbv2-weight-control-row input[type="range"] {
    width: 100%;
    accent-color: #1c6748;
    cursor: pointer;
}

.hbv2-save-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    padding: 17px;
    border: 1px solid #dce8e0;
    border-radius: 17px;
    background: #fff;
}

.hbv2-save-summary > div {
    padding: 12px;
    border-radius: 13px;
    background: #f6faf7;
}

.hbv2-save-summary span,
.hbv2-save-summary strong {
    display: block;
}

.hbv2-save-summary span {
    color: #74887d;
    font-size: 0.8rem;
}

.hbv2-save-summary strong {
    margin-top: 4px;
    color: #173e2d;
}

.hbv2-save-summary p {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    padding: 11px 13px;
    border-radius: 11px;
    font-weight: 800;
}

.hbv2-save-summary p.invalid {
    background: #fff2e5;
    color: #995512;
}

.hbv2-save-summary p.valid {
    background: #eaf7ef;
    color: #16613f;
}

@media (max-width: 720px) {
    .hbv2-save-summary {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   HONOR BOARD V2 DASHBOARD CANDIDATE
   ============================================================ */

.hbv2-summary-actions {
    margin-bottom: 26px;
}

.hbv2-summary-actions .hbv2-summary-card {
    appearance: none;
    width: 100%;
    min-width: 0;
    border: 1px solid #dce6df;
    border-radius: 18px;
    background: #fff;
    padding: 18px;
    text-align: right;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.hbv2-summary-actions .hbv2-summary-card:hover {
    transform: translateY(-2px);
    border-color: #aac9b7;
    box-shadow: 0 12px 28px rgba(21, 77, 53, 0.08);
}

.hbv2-summary-actions .hbv2-summary-card.active {
    border-color: #1c6648;
    background: #edf7f1;
    box-shadow: inset 0 0 0 1px #1c6648;
}

.hbv2-summary-card span,
.hbv2-summary-card strong,
.hbv2-summary-card small {
    display: block;
}

.hbv2-summary-card span {
    color: #385b49;
    font-weight: 800;
}

.hbv2-summary-card strong {
    margin-top: 6px;
    color: #123f2d;
    font-size: 1.75rem;
}

.hbv2-summary-card small {
    margin-top: 5px;
    color: #81948a;
    font-size: 0.75rem;
}

.hbv2-summary-following-section {
    margin-top: 8px;
}

.hbv2-calculated-students-list {
    display: grid;
    gap: 10px;
}

.hbv2-calculated-student {
    display: grid;
    grid-template-columns:
        52px
        minmax(0, 1fr)
        minmax(110px, auto)
        auto;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid #dce7e0;
    border-radius: 16px;
    background: #fff;
}

.hbv2-calculated-student-avatar img,
.hbv2-calculated-student-avatar span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.hbv2-calculated-student-avatar img {
    object-fit: cover;
}

.hbv2-calculated-student-avatar span {
    background: #164e37;
    color: #fff;
    font-weight: 900;
}

.hbv2-calculated-student-copy strong,
.hbv2-calculated-student-copy small {
    display: block;
}

.hbv2-calculated-student-copy small {
    margin-top: 4px;
    color: #74877c;
}

.hbv2-calculated-student-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.hbv2-calculated-student-tags span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f2;
    color: #50695c;
    font-size: 0.72rem;
    font-weight: 800;
}

.hbv2-calculated-student-tags span.approved {
    background: #e8f6ed;
    color: #16613f;
}

.hbv2-calculated-student-tags span.published {
    background: #fff4d8;
    color: #876117;
}

.hbv2-calculated-student-score {
    text-align: center;
}

.hbv2-calculated-student-score strong,
.hbv2-calculated-student-score small {
    display: block;
}

.hbv2-calculated-student-score strong {
    color: #145a3e;
    font-size: 1.1rem;
}

.hbv2-calculated-student-score small {
    margin-top: 4px;
    color: #7c8d83;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .hbv2-summary-actions {
        margin-bottom: 18px;
    }

    .hbv2-summary-actions .hbv2-summary-card {
        padding: 13px 10px;
        border-radius: 14px;
    }

    .hbv2-summary-card strong {
        font-size: 1.3rem;
    }

    .hbv2-summary-card small {
        font-size: 0.65rem;
    }

    .hbv2-calculated-student {
        grid-template-columns: 44px minmax(0, 1fr) auto;
    }

    .hbv2-calculated-student-avatar img,
    .hbv2-calculated-student-avatar span {
        width: 42px;
        height: 42px;
    }

    .hbv2-calculated-student-score {
        text-align: left;
    }

    .hbv2-calculated-student > .hbv2-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* ============================================================
   HONOR BOARD V2 COMPACT ACCORDION CANDIDATE
   ============================================================ */

.hbv2-scope-section {
    padding-top: 16px;
    padding-bottom: 16px;
}

.hbv2-scope-head {
    margin-bottom: 11px;
}

.hbv2-scope-section .hbv2-form-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px 10px;
}

.hbv2-scope-section .hbv2-form-grid label {
    gap: 4px;
}

.hbv2-scope-section .hbv2-form-grid label.wide {
    grid-column: span 2;
}

.hbv2-scope-section .scope-grade {
    grid-column: span 2;
}

.hbv2-scope-section .hbv2-form-grid input,
.hbv2-scope-section .hbv2-form-grid select {
    min-height: 39px;
    padding: 7px 9px;
}

.hbv2-scope-section .hbv2-load-items-wrap {
    grid-column: span 2;
}

.hbv2-scope-section .hbv2-load-items-wrap .hbv2-btn {
    min-height: 39px;
}

.hbv2-criterion-selectors {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
    margin-top: 13px;
}

.hbv2-criterion-selector {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: stretch;
    border: 1px solid var(--hbv2-border);
    border-radius: 13px;
    background: #fff;
    overflow: hidden;
    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.hbv2-criterion-selector.enabled {
    border-color: #8fb7a0;
    background: #f1f8f4;
}

.hbv2-criterion-selector.opened {
    border-color: var(--hbv2-green);
    box-shadow: inset 0 0 0 1px var(--hbv2-green);
}

.hbv2-criterion-toggle {
    display: grid;
    place-items: center;
    padding-right: 6px;
    cursor: pointer;
}

.hbv2-criterion-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hbv2-criterion-toggle > span {
    position: relative;
    display: block;
    width: 19px;
    height: 19px;
    border: 2px solid #9eafa5;
    border-radius: 6px;
    background: #fff;
}

.hbv2-criterion-toggle input:checked + span {
    border-color: var(--hbv2-green);
    background: var(--hbv2-green);
}

.hbv2-criterion-toggle input:checked + span::after {
    position: absolute;
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    top: -2px;
    left: 2px;
}

.hbv2-criterion-open {
    appearance: none;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 60px;
    padding: 8px 8px 8px 6px;
    border: 0;
    background: transparent;
    color: var(--hbv2-text);
    text-align: right;
    cursor: pointer;
}

.hbv2-criterion-open .hbv2-criterion-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 15px;
}

.hbv2-criterion-selector-copy {
    min-width: 0;
}

.hbv2-criterion-selector-copy strong,
.hbv2-criterion-selector-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hbv2-criterion-selector-copy strong {
    font-size: 12px;
}

.hbv2-criterion-selector-copy small {
    margin-top: 3px;
    color: var(--hbv2-muted);
    font-size: 9px;
}

.hbv2-criterion-arrow {
    color: var(--hbv2-muted);
    font-size: 10px;
}

.hbv2-criterion-detail {
    margin-top: 13px;
    padding: 15px;
    border: 1px solid var(--hbv2-border);
    border-radius: 16px;
    background: #fff;
}

.hbv2-criterion-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.hbv2-criterion-state {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.hbv2-criterion-state.enabled {
    background: #e6f5eb;
    color: #19613f;
}

.hbv2-criterion-state.disabled {
    background: #f3f4f3;
    color: #77857d;
}

.hbv2-criterion-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr);
    align-items: start;
    gap: 14px;
}

.hbv2-criterion-detail .hbv2-weight-control {
    margin-top: 0;
    position: sticky;
    top: 12px;
}

.hbv2-disabled-weight-note {
    padding: 12px;
    border-radius: 11px;
    background: #f0f3f1;
    color: var(--hbv2-muted);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

.hbv2-criterion-guide {
    margin-top: 13px;
}

@media (max-width: 1000px) {
    .hbv2-criterion-selectors {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hbv2-criterion-detail-layout {
        grid-template-columns: minmax(0, 1.5fr) minmax(230px, .8fr);
    }
}

@media (max-width: 720px) {
    .hbv2-scope-section {
        padding: 13px;
    }

    .hbv2-scope-section .hbv2-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .hbv2-scope-section .hbv2-form-grid label.wide {
        grid-column: span 2;
    }

    .hbv2-scope-section .scope-grade,
    .hbv2-scope-section .scope-division,
    .hbv2-scope-section .scope-top-count,
    .hbv2-scope-section .hbv2-load-items-wrap {
        grid-column: span 1;
    }

    .hbv2-scope-section .hbv2-form-grid label > span {
        font-size: 10px;
    }

    .hbv2-scope-section .hbv2-form-grid input,
    .hbv2-scope-section .hbv2-form-grid select,
    .hbv2-scope-section .hbv2-load-items-wrap .hbv2-btn {
        min-height: 37px;
        font-size: 12px;
    }

    .hbv2-criterion-selectors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .hbv2-criterion-open {
        grid-template-columns: 29px minmax(0, 1fr) 12px;
        min-height: 55px;
        gap: 5px;
        padding: 7px 5px;
    }

    .hbv2-criterion-open .hbv2-criterion-icon {
        width: 29px;
        height: 29px;
        font-size: 13px;
    }

    .hbv2-criterion-selector-copy strong {
        font-size: 10px;
    }

    .hbv2-criterion-selector-copy small {
        font-size: 8px;
    }

    .hbv2-criterion-detail {
        padding: 11px;
    }

    .hbv2-criterion-detail-layout {
        grid-template-columns: 1fr;
    }

    .hbv2-criterion-detail .hbv2-weight-control {
        position: static;
        order: -1;
    }

    .hbv2-item-picker {
        grid-template-columns: 1fr;
        max-height: 280px;
    }
}

@media (max-width: 430px) {
    .hbv2-scope-section .scope-grade,
    .hbv2-scope-section .scope-division {
        grid-column: span 1;
    }

    .hbv2-criterion-selectors {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   HONOR BOARD V2 CAMPAIGN PAGE — FINAL CLEAN BLOCK
   ============================================================ */

.hbv2-campaign-page-loading {
    min-height: 280px;
}

.hbv2-campaign-page-hero.compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 20px 22px;
    border-radius: 20px;
    background:
        radial-gradient(
            circle at 0 0,
            rgba(215, 174, 78, .17),
            transparent 32%
        ),
        linear-gradient(135deg, #123f2d, #18563e);
    color: #fff;
    box-shadow: 0 14px 34px rgba(17, 63, 44, .14);
}

.hbv2-campaign-page-copy {
    min-width: 0;
}

.hbv2-campaign-page-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.25;
}

.hbv2-campaign-page-copy .description {
    max-width: 720px;
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .73);
    font-size: 12px;
}

.hbv2-campaign-context {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.hbv2-campaign-context span {
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.hbv2-campaign-context span.certificate {
    border-color: rgba(225, 185, 91, .35);
    background: rgba(225, 185, 91, .13);
    color: #ffe1a0;
}

.hbv2-campaign-page-actions.compact {
    display: grid;
    grid-template-columns: repeat(3, minmax(78px, 1fr));
    flex: 0 0 auto;
    gap: 8px;
}

.hbv2-campaign-page-actions.compact .hbv2-btn {
    min-height: 40px;
    padding: 8px 12px;
    white-space: nowrap;
}

.hbv2-campaign-metrics.compact {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
}

.hbv2-campaign-metrics.compact article {
    padding: 13px 14px;
    border: 1px solid var(--hbv2-border);
    border-radius: 15px;
    background: #fff;
}

.hbv2-campaign-metrics.compact span,
.hbv2-campaign-metrics.compact strong {
    display: block;
}

.hbv2-campaign-metrics.compact span {
    color: var(--hbv2-muted);
    font-size: 10px;
    font-weight: 800;
}

.hbv2-campaign-metrics.compact strong {
    margin-top: 4px;
    color: var(--hbv2-green);
    font-size: 20px;
}

.hbv2-candidates-section {
    margin-top: 12px;
}

.hbv2-candidates-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hbv2-candidates-head-actions > span {
    color: var(--hbv2-muted);
    font-size: 12px;
    font-weight: 800;
}

.hbv2-candidates-head-actions b {
    color: var(--hbv2-green);
}

.hbv2-scope-section .scope-certificate {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .hbv2-campaign-page-hero.compact {
        align-items: stretch;
        flex-direction: column;
    }

    .hbv2-campaign-page-actions.compact {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .hbv2-campaign-page-hero.compact {
        gap: 15px;
        padding: 16px 13px;
        border-radius: 17px;
    }

    .hbv2-campaign-page-copy {
        text-align: center;
    }

    .hbv2-campaign-page-copy h1 {
        font-size: 25px;
    }

    .hbv2-campaign-context {
        justify-content: center;
    }

    .hbv2-campaign-page-actions.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .hbv2-campaign-page-actions.compact .hbv2-btn {
        min-height: 39px;
        padding-inline: 5px;
        font-size: 10px;
    }

    .hbv2-campaign-metrics.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .hbv2-campaign-metrics.compact article {
        padding: 11px;
    }

    .hbv2-scope-section .scope-certificate {
        grid-column: span 2;
    }

    .hbv2-candidates-head-actions {
        justify-content: space-between;
        width: 100%;
    }
}

/* ============================================================
   HONOR BOARD V2 — STUDENT AWARD MANAGEMENT
   ============================================================ */

.hbv2-award-toolbar {
    display: grid;
    grid-template-columns:
        auto
        minmax(220px, 1fr)
        auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.hbv2-award-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--hbv2-border);
    border-radius: 13px;
    background: #f5f8f6;
}

.hbv2-award-tabs button {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #61756a;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.hbv2-award-tabs button.active {
    background: #fff;
    color: var(--hbv2-green);
    box-shadow: 0 4px 12px rgba(20, 82, 56, .08);
}

.hbv2-award-tabs b {
    display: grid;
    place-items: center;
    min-width: 23px;
    height: 23px;
    padding-inline: 5px;
    border-radius: 999px;
    background: #e6f1ea;
    font-size: 10px;
}

.hbv2-award-search {
    position: relative;
    display: block;
}

.hbv2-award-search > span {
    position: absolute;
    right: 12px;
    top: 50%;
    color: #71847a;
    transform: translateY(-50%);
}

.hbv2-award-search input {
    width: 100%;
    min-height: 46px;
    padding: 9px 37px 9px 12px;
    border: 1px solid var(--hbv2-border);
    border-radius: 13px;
    background: #fff;
    color: var(--hbv2-text);
    outline: none;
}

.hbv2-award-search input:focus {
    border-color: #6fa186;
    box-shadow: 0 0 0 3px rgba(31, 104, 73, .08);
}

.hbv2-award-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hbv2-award-toolbar-actions > span {
    color: var(--hbv2-muted);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.hbv2-award-toolbar-actions > span b {
    color: var(--hbv2-green);
}

.hbv2-award-help {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.hbv2-award-help span {
    padding: 6px 9px;
    border-radius: 999px;
    background: #f3f6f4;
    color: #66796f;
    font-size: 9px;
    font-weight: 800;
}

.hbv2-result-row.hbv2-award-result-row {
    grid-template-columns:
        30px
        48px
        minmax(210px, 1fr)
        90px
        minmax(410px, 1.55fr);
}

.hbv2-award-result-row.selected-for-honor {
    border-color: #91b6a0;
    box-shadow: inset 4px 0 0 #1d6748;
}

.hbv2-award-result-row.selected-for-print {
    background: #fffaf0;
}

.hbv2-award-fields {
    display: grid;
    grid-template-columns:
        minmax(120px, auto)
        minmax(150px, 1fr)
        minmax(130px, auto)
        72px
        auto;
    align-items: end;
    gap: 8px;
}

.hbv2-award-toggle,
.hbv2-homepage-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 39px;
    cursor: pointer;
}

.hbv2-award-toggle input,
.hbv2-homepage-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hbv2-award-toggle > span,
.hbv2-homepage-toggle > span {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    border: 2px solid #9cafa4;
    border-radius: 6px;
    background: #fff;
}

.hbv2-award-toggle input:checked + span,
.hbv2-homepage-toggle input:checked + span {
    border-color: var(--hbv2-green);
    background: var(--hbv2-green);
}

.hbv2-award-toggle input:checked + span::after,
.hbv2-homepage-toggle input:checked + span::after {
    position: absolute;
    content: '✓';
    top: -3px;
    left: 2px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.hbv2-homepage-toggle input:disabled + span {
    background: #edf0ee;
    border-color: #c7d0cb;
}

.hbv2-award-toggle b,
.hbv2-homepage-toggle b {
    color: #395b4a;
    font-size: 10px;
    white-space: nowrap;
}

.hbv2-award-title,
.hbv2-display-order {
    display: grid;
    gap: 4px;
}

.hbv2-award-title > span,
.hbv2-display-order > span {
    color: var(--hbv2-muted);
    font-size: 9px;
    font-weight: 800;
}

.hbv2-award-title input,
.hbv2-display-order input {
    width: 100%;
    min-height: 39px;
    padding: 7px 9px;
    border: 1px solid var(--hbv2-border);
    border-radius: 10px;
    background: #fff;
    color: var(--hbv2-text);
    outline: none;
}

.hbv2-award-title input:focus,
.hbv2-display-order input:focus {
    border-color: #6fa186;
}

.hbv2-certificate-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.hbv2-certificate-state.issued {
    background: #e7f6ec;
    color: #19613f;
}

.hbv2-certificate-state.pending {
    background: #f1f3f2;
    color: #77847d;
}

.hbv2-print-check {
    align-self: center;
}

@media (max-width: 1250px) {
    .hbv2-award-toolbar {
        grid-template-columns: auto minmax(200px, 1fr);
    }

    .hbv2-award-toolbar-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .hbv2-result-row.hbv2-award-result-row {
        grid-template-columns:
            30px
            45px
            minmax(0, 1fr)
            85px;
    }

    .hbv2-award-fields {
        grid-column: 3 / -1;
    }
}

@media (max-width: 760px) {
    .hbv2-award-toolbar {
        grid-template-columns: 1fr;
    }

    .hbv2-award-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbv2-award-tabs button {
        justify-content: center;
        min-width: 0;
        padding-inline: 5px;
    }

    .hbv2-award-toolbar-actions {
        grid-column: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbv2-award-toolbar-actions > span {
        grid-column: 1 / -1;
        text-align: center;
    }

    .hbv2-award-toolbar-actions .hbv2-btn {
        min-width: 0;
        padding-inline: 7px;
        font-size: 10px;
    }

    .hbv2-result-row.hbv2-award-result-row {
        grid-template-columns: 24px 36px minmax(0, 1fr);
    }

    .hbv2-award-result-row .hbv2-score {
        grid-column: 3;
    }

    .hbv2-award-fields {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-top: 9px;
        border-top: 1px dashed var(--hbv2-border);
    }

    .hbv2-award-title {
        grid-column: 1 / -1;
    }

    .hbv2-certificate-state {
        min-width: 0;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .hbv2-award-fields {
        grid-template-columns: 1fr 70px;
    }

    .hbv2-award-toggle,
    .hbv2-homepage-toggle,
    .hbv2-award-title,
    .hbv2-certificate-state {
        grid-column: 1 / -1;
    }
}


/* ============================================================
   HONOR BOARD V2 — HONOR TITLE PRESET LIST V2
   ============================================================ */

.hbv2-award-title {
    display: grid;
    gap: 7px;
}

.hbv2-award-title > label,
.hbv2-custom-title {
    display: grid;
    gap: 4px;
}

.hbv2-award-title label > span,
.hbv2-custom-title > span {
    color: var(--hbv2-muted);
    font-size: 9px;
    font-weight: 800;
}

.hbv2-award-title select,
.hbv2-custom-title input {
    width: 100%;
    min-height: 39px;
    padding: 7px 9px;
    border: 1px solid var(--hbv2-border);
    border-radius: 10px;
    background: #fff;
    color: var(--hbv2-text);
    outline: none;
}

.hbv2-award-title select:focus,
.hbv2-custom-title input:focus {
    border-color: #6fa186;
    box-shadow: 0 0 0 3px rgba(31, 104, 73, .07);
}

.hbv2-custom-title {
    margin-top: 1px;
    padding: 7px;
    border-radius: 10px;
    background: #f4f8f5;
}

@media (max-width: 760px) {
    .hbv2-award-title select,
    .hbv2-custom-title input {
        min-height: 42px;
        font-size: 12px;
    }
}
