/* ============================================
   BEDÖMNINGSMATRIS - Feature-specific Styles
   ============================================ */

/* Page header */
.am-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.am-page-header__title {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--gray-darker);
    margin: 0;
}

.am-page-header__subtitle {
    font-size: 0.875rem;
    color: var(--gray-dark);
    margin: 4px 0 0;
}

.am-page-header__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Info banner */
.am-info-banner {
    background: var(--cl-super-soft, #e8eaf6);
    border: 1px solid var(--cl-soft, #c5cae9);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.am-info-banner--custodian {
    background: #E8F5E9;
    border-color: #C8E6C9;
}

.am-info-banner__icon {
    color: var(--cl-hard, #26418f);
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.am-info-banner--custodian .am-info-banner__icon {
    color: #2E7D32;
}

.am-info-banner__text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-darker);
}

.am-info-banner__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-dark);
    padding: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.am-info-banner__close:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Tabs */
.am-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-lighter, #e0e0e0);
    margin-bottom: 24px;
    gap: 0;
    overflow-x: auto;
}

.am-tabs__tab {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-dark);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}

.am-tabs__tab:hover {
    color: var(--cl-hard, #26418f);
    background: var(--gray-lightest, #fafafa);
}

.am-tabs__tab--active {
    color: var(--cl-hard, #26418f);
    border-bottom-color: var(--cl-hard, #26418f);
}

.am-tab-content {
    display: none;
}

.am-tab-content--active {
    display: block;
}

/* Filter bar */
.am-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.am-filter-bar__left,
.am-filter-bar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Chips */
.am-chip-group {
    display: flex;
    gap: 8px;
}

.am-chip {
    padding: 6px 16px;
    border-radius: 16px;
    border: 1px solid var(--gray-light, #bdbdbd);
    background: var(--white);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-darker);
    transition: all 0.2s;
}

.am-chip:hover {
    background: var(--gray-lightest);
}

.am-chip--active {
    background: var(--cl-hard, #26418f);
    color: var(--white);
    border-color: var(--cl-hard, #26418f);
}

/* Select */
.am-select-wrapper {
    position: relative;
}

.am-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--gray-light, #bdbdbd);
    border-radius: 4px;
    background: var(--white);
    font-size: 0.875rem;
    color: var(--gray-darker);
    cursor: pointer;
    appearance: auto;
    min-width: 160px;
}

.am-select--small {
    padding: 6px 28px 6px 10px;
    font-size: 0.8125rem;
    min-width: 120px;
}

/* View toggle */
.am-view-toggle {
    display: flex;
    border: 1px solid var(--gray-light, #bdbdbd);
    border-radius: 4px;
    overflow: hidden;
}

.am-view-toggle__btn {
    padding: 6px 10px;
    border: none;
    background: var(--white);
    cursor: pointer;
    color: var(--gray-dark);
    transition: all 0.2s;
}

.am-view-toggle__btn--active {
    background: var(--cl-hard, #26418f);
    color: var(--white);
}

/* Search field */
.am-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    padding: 6px 12px;
    background: var(--white);
}

.am-search-field i {
    color: var(--gray-dark);
    font-size: 20px;
}

.am-search-field input {
    border: none;
    outline: none;
    font-size: 0.875rem;
    width: 200px;
    background: transparent;
}

/* Matrix grid (card view) */
.am-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.am-matrix-card {
    background: var(--white);
    border: 1px solid var(--gray-lighter, #e0e0e0);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.am-matrix-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--cl-soft, #c5cae9);
}

.am-matrix-card--archived {
    opacity: 0.7;
    border-style: dashed;
}

.am-matrix-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.am-matrix-card__title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-darker);
    margin: 0;
}

.am-matrix-card__menu {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-dark);
    padding: 4px;
    border-radius: 50%;
}

.am-matrix-card__menu:hover {
    background: var(--gray-lightest);
}

.am-matrix-card__desc {
    font-size: 0.8125rem;
    color: var(--gray-dark);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.am-matrix-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.am-matrix-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--gray-lightest, #f5f5f5);
    color: var(--gray-darker);
}

.am-matrix-card__tag i {
    font-size: 14px;
}

.am-matrix-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--gray-lighter);
    font-size: 0.75rem;
    color: var(--gray-dark);
}

.am-matrix-card__actions {
    display: flex;
    gap: 4px;
}

.am-matrix-card__action {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-dark);
    padding: 4px;
    border-radius: 50%;
    font-size: 0;
}

.am-matrix-card__action:hover {
    background: var(--gray-lightest);
    color: var(--cl-hard);
}

.am-matrix-card__action i {
    font-size: 18px;
}

/* Badges */
.am-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.am-badge--published {
    background: #E8F5E9;
    color: #2E7D32;
}

.am-badge--draft {
    background: #FFF3E0;
    color: #E65100;
}

.am-badge--archived {
    background: var(--gray-lightest);
    color: var(--gray-dark);
}

.am-badge--self {
    background: #E3F2FD;
    color: #1565C0;
}

.am-badge--shared {
    background: #F3E5F5;
    color: #7B1FA2;
}

/* Bank list */
.am-bank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.am-bank-item {
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    cursor: pointer;
    gap: 16px;
}

.am-bank-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--cl-soft);
}

.am-bank-item__info {
    flex: 1;
    min-width: 0;
}

.am-bank-item__name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-darker);
    margin-bottom: 4px;
}

.am-bank-item__desc {
    font-size: 0.8125rem;
    color: var(--gray-dark);
    line-height: 1.4;
}

.am-bank-item__meta {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.am-bank-item__tag {
    font-size: 0.6875rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--gray-lightest);
    color: var(--gray-darker);
}

.am-bank-item__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Assessment header */
.am-assessment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: 8px;
}

.am-assessment-header__selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.am-assessment-header__meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.am-assessment-header__date {
    font-size: 0.8125rem;
    color: var(--gray-dark);
}

.am-assessment-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-wrap: wrap;
}

/* Toggle label */
.am-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--gray-darker);
    cursor: pointer;
    white-space: nowrap;
}

/* Legend */
.am-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gray-lightest, #fafafa);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.8125rem;
}

.am-legend--student,
.am-legend--custodian {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    margin-bottom: 24px;
}

.am-legend--student .am-legend__title,
.am-legend--custodian .am-legend__title {
    font-weight: 500;
    margin-bottom: 4px;
}

.am-legend--student .am-legend__item,
.am-legend--custodian .am-legend__item {
    font-size: 0.875rem;
}

.am-legend__title {
    font-weight: 500;
    color: var(--gray-darker);
}

.am-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-darker);
}

.am-legend__note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--gray-dark);
    border-top: 1px solid var(--gray-lighter);
    padding-top: 8px;
    width: 100%;
    line-height: 1.5;
}

.am-level-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Assessment table (group view) */
.am-assessment-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
    border: 1px solid var(--gray-lighter);
    border-radius: 8px;
    background: var(--white);
}

.am-assessment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    min-width: 600px;
}

.am-assessment-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--white);
}

.am-assessment-table th {
    padding: 10px 12px;
    border-bottom: 2px solid var(--gray-lighter);
    text-align: left;
    font-weight: 500;
    color: var(--gray-darker);
    white-space: nowrap;
    font-size: 0.75rem;
}

.am-assessment-table th.am-col-student {
    position: sticky;
    left: 0;
    background: var(--white);
    z-index: 3;
    min-width: 160px;
    border-right: 2px solid var(--gray-lighter);
}

.am-assessment-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--gray-lighter);
    text-align: center;
    vertical-align: middle;
}

.am-assessment-table td.am-col-student {
    text-align: left;
    position: sticky;
    left: 0;
    background: var(--white);
    z-index: 1;
    border-right: 2px solid var(--gray-lighter);
    padding: 8px 12px;
}

.am-assessment-table tbody tr:hover {
    background: var(--gray-lightest, #fafafa);
}

.am-assessment-table tbody tr:hover td.am-col-student {
    background: var(--gray-lightest, #fafafa);
}

/* Assessment cells */
.am-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid transparent;
    position: relative;
    font-size: 0.6875rem;
    font-weight: 700;
}

.am-cell:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.am-cell:focus {
    outline: 3px solid var(--cl-hard, #26418f);
    outline-offset: 2px;
}

.am-cell--none {
    background: var(--white);
    border-color: var(--gray-light, #bdbdbd);
    color: var(--gray-light);
}

.am-cell--green {
    background: #43A047;
    color: #fff;
}

.am-cell--yellow {
    background: #FDD835;
    color: #333;
}

.am-cell--red {
    background: #E53935;
    color: #fff;
}

.am-cell--readonly {
    cursor: default;
}

.am-cell--readonly:hover {
    transform: none;
    box-shadow: none;
}

/* Dual layer cell (teacher + self in same cell) */
.am-cell-dual {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

.am-cell-dual .am-cell {
    width: 28px;
    height: 28px;
    font-size: 0.625rem;
}

/* Student name in table */
.am-student-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--gray-darker);
    cursor: pointer;
}

.am-student-name:hover {
    color: var(--cl-hard);
}

.am-student-name__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.am-student-name__self-badge {
    font-size: 0.625rem;
    padding: 1px 5px;
    border-radius: 8px;
    background: #E3F2FD;
    color: #1565C0;
    font-weight: 500;
    margin-left: 4px;
}

/* Comment area */
.am-comment-area {
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.am-comment-area__title {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--gray-darker);
}

.am-comment-area__visibility {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

/* Buttons */
.am-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.am-btn i {
    font-size: 18px;
}

.am-btn--primary {
    background: var(--cl-hard, #26418f);
    color: var(--white);
}

.am-btn--primary:hover {
    background: var(--cl-medium, #3f51b5);
}

.am-btn--outlined {
    background: var(--white);
    border: 1px solid var(--gray-light, #bdbdbd);
    color: var(--gray-darker);
}

.am-btn--outlined:hover {
    background: var(--gray-lightest);
    border-color: var(--cl-hard);
    color: var(--cl-hard);
}

.am-btn--text {
    background: none;
    color: var(--cl-hard, #26418f);
    padding: 8px 12px;
}

.am-btn--text:hover {
    background: var(--cl-super-soft, #e8eaf6);
}

.am-btn--small {
    padding: 4px 12px;
    font-size: 0.8125rem;
}

.am-btn--danger {
    background: #E53935;
    color: #fff;
}

/* Forms */
.am-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-darker);
    margin-bottom: 4px;
}

.am-required {
    color: #E53935;
}

.am-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--gray-darker);
    transition: border-color 0.2s;
}

.am-input:focus {
    border-color: var(--cl-hard, #26418f);
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 65, 143, 0.12);
}

.am-input--small {
    padding: 8px 10px;
    font-size: 0.8125rem;
}

.am-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--gray-darker);
    resize: vertical;
}

.am-textarea:focus {
    border-color: var(--cl-hard);
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 65, 143, 0.12);
}

.am-form-group {
    margin-bottom: 16px;
}

.am-form-group--half {
    flex: 1;
    min-width: 200px;
}

.am-form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.am-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 8px;
}

/* Dialog */
.am-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.am-dialog {
    background: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.am-dialog--wide {
    max-width: 900px;
}

.am-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-lighter);
}

.am-dialog__title {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--gray-darker);
    margin: 0;
}

.am-dialog__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-dark);
    padding: 4px;
    border-radius: 50%;
}

.am-dialog__close:hover {
    background: var(--gray-lightest);
}

.am-dialog__body {
    padding: 24px;
}

.am-dialog__section-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-darker);
    margin: 24px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-lighter);
}

.am-dialog__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-lighter);
}

/* Level preview in dialog */
.am-level-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.am-level-preview__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8125rem;
}

/* Rows editor */
.am-rows-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.am-row-edit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.am-row-edit__fields {
    flex: 1;
}

.am-row-edit__remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-dark);
    padding: 4px;
    border-radius: 50%;
}

.am-row-edit__remove:hover {
    background: #FFEBEE;
    color: #E53935;
}

/* Student matrices view */
.am-student-matrices {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.am-student-matrix {
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: 8px;
    overflow: hidden;
}

.am-student-matrix__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gray-lightest);
    border-bottom: 1px solid var(--gray-lighter);
    cursor: pointer;
}

.am-student-matrix__header:hover {
    background: #f0f0f0;
}

.am-student-matrix__title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-darker);
    display: flex;
    align-items: center;
    gap: 8px;
}

.am-student-matrix__meta {
    font-size: 0.75rem;
    color: var(--gray-dark);
    display: flex;
    gap: 12px;
    align-items: center;
}

.am-student-matrix__body {
    padding: 0;
}

.am-student-matrix__body--collapsed {
    display: none;
}

/* Student matrix row */
.am-student-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--gray-lighter);
    min-height: 60px;
}

.am-student-row:last-child {
    border-bottom: none;
}

.am-student-row__label {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.875rem;
    color: var(--gray-darker);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 200px;
}

.am-student-row__label-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.am-student-row__label-desc {
    font-size: 0.75rem;
    color: var(--gray-dark);
    line-height: 1.3;
}

.am-student-row__levels {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    flex-shrink: 0;
}

.am-student-row__level-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.am-student-row__level-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--gray-dark);
    width: 14px;
    text-align: center;
}

.am-student-row__comment {
    padding: 8px 20px 12px;
    font-size: 0.8125rem;
    color: var(--gray-darker);
    background: #FAFAFA;
    border-top: 1px dashed var(--gray-lighter);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.am-student-row__comment i {
    font-size: 16px;
    color: var(--cl-hard);
    flex-shrink: 0;
    margin-top: 1px;
}

/* Self-assessment cells (interactive for student) */
.am-cell--self-interactive {
    cursor: pointer;
    border: 2px dashed var(--gray-light);
}

.am-cell--self-interactive:hover {
    border-style: solid;
    border-color: var(--cl-hard);
}

/* FAB */
.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.2s;
}

.fab--main {
    background: var(--cl-hard, #26418f);
    color: var(--white);
}

.fab--main:hover {
    background: var(--cl-medium, #3f51b5);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.fab i {
    font-size: 24px;
}

/* Snackbar */
.am-snackbar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #323232;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: bottom 0.3s ease;
    font-size: 0.875rem;
}

.am-snackbar--visible {
    bottom: 24px;
}

.am-snackbar__action {
    background: none;
    border: none;
    color: var(--cl-soft, #8c9eff);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Progress summary in student matrix header */
.am-progress-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    width: 120px;
    background: var(--gray-lighter);
}

.am-progress-bar__segment {
    height: 100%;
    transition: width 0.3s;
}

/* Student detail dialog content */
.am-student-detail-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--gray-lighter);
    padding: 12px 0;
}

.am-student-detail-row__label {
    flex: 1;
    padding-right: 16px;
}

.am-student-detail-row__label strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.875rem;
}

.am-student-detail-row__label small {
    color: var(--gray-dark);
    font-size: 0.75rem;
}

.am-student-detail-row__assessment {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.am-student-detail-row__comment {
    margin-top: 8px;
}

.am-student-detail-row__comment textarea {
    width: 100%;
    font-size: 0.8125rem;
    padding: 8px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}

/* History timeline */
.am-history {
    font-size: 0.75rem;
    color: var(--gray-dark);
    margin-top: 4px;
}

.am-history__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

.am-history__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 959px) {
    .am-matrix-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .am-assessment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .am-assessment-header__actions {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 599px) {
    .am-page-header {
        flex-direction: column;
    }

    .am-matrix-grid {
        grid-template-columns: 1fr;
    }

    .am-tabs__tab {
        padding: 10px 16px;
        font-size: 0.8125rem;
    }

    .am-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .am-legend {
        flex-direction: column;
        align-items: flex-start;
    }

    .am-student-row {
        flex-direction: column;
    }

    .am-student-row__levels {
        padding: 8px 20px 12px;
        justify-content: flex-start;
    }

    .am-dialog {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }

    .fab-container {
        bottom: 16px;
        right: 16px;
    }
}
