/**
 * Spreadsheet mode — Excel-like inline cell editing (global).
 * Students reference; shared for all ERP list tables.
 */

.sls-spreadsheet-toggle.is-on {
    border-color: #0d9488;
    background: #f0fdfa;
    color: #0f766e;
}
.sls-spreadsheet-toggle.is-on .sls-sheet-toggle-state {
    color: #0d9488;
}

table.sls-sheet-on td[data-sheet-field] {
    cursor: cell;
    position: relative;
}
table.sls-sheet-on td[data-sheet-field]:hover {
    outline: 1px solid #5eead4;
    outline-offset: -1px;
    background: #f0fdfa;
}
table.sls-sheet-on td[data-sheet-field].is-editing {
    outline: 2px solid #0d9488;
    outline-offset: -2px;
    background: #fff;
    padding: 0.25rem 0.35rem;
}
table.sls-sheet-on td[data-sheet-field].is-saving {
    background: #ecfeff;
}
table.sls-sheet-on td[data-sheet-field].is-saved {
    background: #d1fae5;
    transition: background 0.6s ease;
}
table.sls-sheet-on td[data-sheet-field].is-error {
    background: #fee2e2;
}

.sls-sheet-editor {
    width: 100%;
    min-width: 4rem;
    box-sizing: border-box;
    border: 1px solid #99f6e4;
    border-radius: 0.375rem;
    padding: 0.35rem 0.5rem;
    font: inherit;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: #0f172a;
    background: #fff;
    outline: none;
}
.sls-sheet-editor:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}
.sls-sheet-editor--textarea {
    min-height: 3.25rem;
    resize: vertical;
}
.sls-sheet-editor--select {
    cursor: pointer;
}

/* While sheet mode is on, disable name-link navigation inside editable cells */
table.sls-sheet-on td[data-sheet-field] a.sls-sheet-link-off,
table.sls-sheet-on td[data-sheet-field] a[data-sheet-link] {
    pointer-events: none;
    text-decoration: none;
    color: inherit;
}
