/* Print Center production UI fix — scoped to the existing Print Center classes. */
.sm-print-hub {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.sm-print-hub-card {
    min-width: 0;
    min-height: 86px;
    padding: 15px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--sm-border);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--sm-surface), color-mix(in srgb, #6d39d0 4%, var(--sm-surface)));
    box-shadow: var(--sm-shadow);
    color: var(--sm-text);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.sm-print-hub-card:hover {
    transform: translateY(-2px);
    border-color: #b7a4ef;
    box-shadow: var(--sm-shadow-hover);
    color: var(--sm-text);
}

.sm-print-hub-card strong {
    font-size: 13px;
    line-height: 1.2;
}

.sm-print-hub-card span {
    color: var(--sm-muted);
    font-size: 10px;
    line-height: 1.35;
}

/* The generic student picker is absolutely positioned for dropdown use.
   Print Center intentionally renders results inline, so force this list back
   into normal document flow. This prevents results from covering the page or
   starting underneath the fixed sidebar. */
.sm-static-results {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-height: 310px;
    margin-top: 12px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--sm-border);
    border-radius: 12px;
    background: var(--sm-surface);
    box-shadow: none;
}

.sm-static-results .sm-picker-result {
    min-height: 56px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 8px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--sm-border) 72%, transparent);
}

.sm-static-results .sm-picker-result:last-child {
    border-bottom: 0;
}

.sm-static-results .sm-picker-result > span:nth-child(2) {
    min-width: 0;
}

.sm-static-results .sm-picker-result strong,
.sm-static-results .sm-picker-result small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sm-static-results .sm-picker-result strong {
    font-size: 12px;
    color: var(--sm-text);
}

.sm-static-results .sm-picker-result small {
    margin-top: 2px;
    font-size: 9px;
    color: var(--sm-muted);
}

.sm-static-results .sm-picker-result em {
    padding: 6px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, #6d39d0 8%, var(--sm-surface));
    color: #6d39d0;
    font-size: 9px;
    font-weight: 850;
}

/* Compact, dashboard-like search panel. */
.sm-print-hub + .sm-panel {
    overflow: visible;
}

.sm-print-hub + .sm-panel .sm-toolbar-wrap {
    display: grid;
    grid-template-columns: minmax(170px, .65fr) minmax(260px, 1.5fr) auto;
    gap: 12px;
    align-items: end;
}

.sm-print-hub + .sm-panel .sm-toolbar-wrap > label {
    min-width: 0;
    margin: 0;
    color: var(--sm-text);
    font-size: 10px;
    font-weight: 750;
}

.sm-print-hub + .sm-panel .sm-toolbar-wrap .form-select,
.sm-print-hub + .sm-panel .sm-toolbar-wrap .form-control {
    min-height: 42px;
    margin-top: 5px;
}

.sm-print-hub + .sm-panel .sm-toolbar-wrap .sm-gradient-btn {
    min-width: 128px;
}

@media (max-width: 1050px) {
    .sm-print-hub {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm-print-hub + .sm-panel .sm-toolbar-wrap {
        grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.4fr);
    }

    .sm-print-hub + .sm-panel .sm-toolbar-wrap .sm-gradient-btn {
        grid-column: 1 / -1;
        width: max-content;
    }
}

@media (max-width: 680px) {
    .sm-print-hub {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .sm-print-hub-card {
        min-height: 72px;
        padding: 12px 13px;
    }

    .sm-print-hub + .sm-panel .sm-toolbar-wrap {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sm-print-hub + .sm-panel .sm-toolbar-wrap .sm-gradient-btn {
        width: 100%;
        grid-column: auto;
    }

    .sm-static-results {
        max-height: 360px;
    }

    .sm-static-results .sm-picker-result {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 8px;
    }

    .sm-static-results .sm-avatar-mini {
        width: 36px;
        height: 36px;
    }
}
