/* ============================================================
   Teacher Settings Modal
   Prefix: .ts-*
   ============================================================ */

/* --- Overlay --- */
.ts-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 10050;
    justify-content: center;
    align-items: center;
}
.ts-overlay.active { display: flex; }

/* --- Modal container (expandable like lesson modal) --- */
.ts-modal {
    background-color: #fff;
    border-radius: 12px;
    width: 880px;
    height: 620px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.22);
    overflow: hidden;
    transition: width 0.3s ease, height 0.3s ease, border-radius 0.3s ease;
}
.ts-modal.ts-expanded {
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    border-radius: 8px;
}

/* --- Header --- */
.ts-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
}
.ts-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ts-header-subtitle {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}
.ts-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ts-expand-btn, .ts-close-btn {
    width: 32px; height: 32px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 18px;
    transition: background 0.15s, color 0.15s;
}
.ts-expand-btn:hover, .ts-close-btn:hover {
    background: #f3f4f6;
    color: #333;
}
.ts-close-btn { font-size: 22px; }

/* --- Body --- */
.ts-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* --- Sidebar --- */
.ts-sidebar {
    width: 200px;
    flex-shrink: 0;
    border-right: 1px solid #e0e0e0;
    background: #fafbfc;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}
.ts-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    user-select: none;
}
.ts-sidebar-item:hover {
    color: #333;
    background: #f0f0f0;
}
.ts-sidebar-item.active {
    color: #059669;
    font-weight: 600;
    background: #f0fdf4;
    border-left-color: #059669;
}
.ts-sidebar-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* --- Content --- */
.ts-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 24px 28px;
    min-width: 0;
}
.ts-content::-webkit-scrollbar { width: 5px; }
.ts-content::-webkit-scrollbar-track { background: transparent; }
.ts-content::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }

/* --- Footer --- */
.ts-footer {
    padding: 12px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fafbfc;
}
.ts-footer-right {
    display: flex;
    gap: 10px;
    align-items: center;
}
.ts-reset-btn, .ts-cancel-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.ts-reset-btn:hover, .ts-cancel-btn:hover {
    background: #f9fafb;
    color: #333;
}
.ts-save-btn {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: #059669;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.3px;
}
.ts-save-btn:hover { background: #047857; }
.ts-save-btn.ts-saved { background: #2563eb; }

/* --- Toast --- */
.ts-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: #059669;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10060;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}
.ts-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   SHARED FORM ELEMENTS
   ============================================================ */

.ts-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.ts-section-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 22px;
}
.ts-field {
    margin-bottom: 18px;
}
.ts-field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.ts-field-hint {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}

/* --- Pill group --- */
.ts-pill-group {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}
.ts-pill {
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #fff;
    border: none;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.ts-pill:last-child { border-right: none; }
.ts-pill:hover { background: #f5f5f5; color: #333; }
.ts-pill.active { background: #059669; color: #fff; }
.ts-pill.active:hover { background: #047857; }

/* --- Checkbox --- */
.ts-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
}
.ts-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #059669;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
}
.ts-checkbox-label {
    font-size: 13px;
    color: #333;
    cursor: pointer;
    line-height: 1.4;
}
.ts-checkbox-desc {
    font-size: 11px;
    color: #999;
    margin-left: 26px;
    margin-top: -2px;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* --- Text input / Select / Number --- */
.ts-input, .ts-select, .ts-number-input {
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.ts-input:focus, .ts-select:focus, .ts-number-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
    background: #fff;
}
.ts-input { width: 280px; }
.ts-select { min-width: 200px; cursor: pointer; }
.ts-number-input { width: 80px; text-align: center; }

/* --- Textarea --- */
.ts-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    color: #333;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.ts-textarea:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
    background: #fff;
}

/* --- Divider --- */
.ts-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 24px 0;
}

/* --- Inline row (label + input side by side) --- */
.ts-inline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.ts-inline-label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    min-width: 160px;
    flex-shrink: 0;
}

/* ============================================================
   FEATURE TOGGLE GRID
   ============================================================ */

.ts-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ts-expanded .ts-feature-grid {
    grid-template-columns: 1fr 1fr 1fr;
}
.ts-feature-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ts-feature-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.ts-feature-card.ts-disabled {
    opacity: 0.55;
    background: #fafafa;
}
.ts-feature-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.ts-feature-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.ts-feature-card-icon {
    font-size: 18px;
}
.ts-feature-card-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.5;
}

/* --- Toggle switch --- */
.ts-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.ts-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.ts-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.2s;
}
.ts-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.ts-toggle input:checked + .ts-toggle-slider {
    background: #059669;
}
.ts-toggle input:checked + .ts-toggle-slider::before {
    transform: translateX(18px);
}

/* ============================================================
   LENS CARDS (Prompt Management)
   ============================================================ */

.ts-lens-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ts-lens-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ts-lens-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.ts-lens-card.ts-lens-off {
    opacity: 0.5;
}
.ts-lens-card.ts-lens-off .ts-lens-body {
    display: none !important;
}
.ts-lens-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    background: #fff;
    transition: background 0.15s;
}
.ts-lens-header:hover { background: #fafbfc; }
.ts-lens-icon { font-size: 20px; flex-shrink: 0; }
.ts-lens-info { flex: 1; min-width: 0; }
.ts-lens-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.ts-lens-desc {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
    line-height: 1.4;
}
.ts-lens-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #059669;
    margin-right: 8px;
    flex-shrink: 0;
}
.ts-lens-off .ts-lens-status { background: #d1d5db; }
.ts-lens-expand-arrow {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s;
    margin-right: 4px;
}
.ts-lens-card.ts-lens-open .ts-lens-expand-arrow {
    transform: rotate(90deg);
}
.ts-lens-body {
    display: none;
    padding: 0 16px 16px 50px;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}
.ts-lens-card.ts-lens-open .ts-lens-body {
    display: block;
}
.ts-lens-body .ts-field {
    margin-bottom: 14px;
}
.ts-lens-body .ts-field:last-child {
    margin-bottom: 0;
}
.ts-lens-body .ts-field-label {
    font-size: 11px;
    margin-bottom: 6px;
}

/* --- Multi-checkbox group (inline) --- */
.ts-multi-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.ts-multi-check-group .ts-checkbox-row {
    padding: 3px 0;
}

/* ============================================================
   GRADE SCALE EDITOR
   ============================================================ */

.ts-grade-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.ts-grade-table th {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    padding: 6px 10px;
    border-bottom: 2px solid #e0e0e0;
}
.ts-grade-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #333;
}
.ts-grade-table .ts-grade-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
    vertical-align: middle;
}
.ts-grade-table input[type="text"],
.ts-grade-table input[type="number"] {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f9fa;
    width: 60px;
    font-family: inherit;
}
.ts-grade-table input[type="text"] { width: 80px; }
.ts-grade-table input:focus {
    outline: none;
    border-color: #059669;
    background: #fff;
}
.ts-grade-remove-btn {
    width: 24px; height: 24px;
    border: none;
    background: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.ts-grade-remove-btn:hover {
    color: #dc2626;
    background: #fef2f2;
}
.ts-grade-add-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    background: #f0fdf4;
    border: 1px dashed #059669;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.ts-grade-add-btn:hover { background: #dcfce7; }

.ts-grade-preview {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 12px;
}
.ts-grade-preview-title {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.ts-grade-preview-bar {
    display: flex;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.ts-grade-preview-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    transition: flex 0.3s;
    min-width: 20px;
}

/* --- Weight inputs row --- */
.ts-weight-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.ts-weight-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ts-weight-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}
.ts-weight-input {
    width: 54px;
    padding: 5px 8px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f9fa;
    font-family: inherit;
}
.ts-weight-input:focus {
    outline: none;
    border-color: #059669;
    background: #fff;
}
.ts-weight-total {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    margin-left: 4px;
}
.ts-weight-total.ts-weight-error {
    color: #dc2626;
}

/* --- Color threshold inputs --- */
.ts-threshold-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ts-threshold-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ts-threshold-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* ============================================================
   USAGE & BILLING
   ============================================================ */

.ts-usage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.ts-usage-card {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.ts-usage-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
.ts-usage-card-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ts-usage-card-change {
    font-size: 11px;
    margin-top: 6px;
    font-weight: 600;
}
.ts-usage-card-change.up { color: #dc2626; }
.ts-usage-card-change.down { color: #059669; }
.ts-usage-card-change.neutral { color: #888; }

.ts-usage-breakdown {
    margin-bottom: 24px;
}
.ts-usage-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.ts-usage-bar-label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    min-width: 140px;
    flex-shrink: 0;
}
.ts-usage-bar-track {
    flex: 1;
    height: 18px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.ts-usage-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 2px;
}
.ts-usage-bar-value {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    min-width: 48px;
    text-align: right;
    flex-shrink: 0;
}

.ts-usage-budget {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 14px 16px;
}
.ts-usage-budget-title {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
}
.ts-usage-budget-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================================
   AI PREFERENCES (re-housed)
   ============================================================ */
.ts-aip-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}
.ts-aip-cat-pill {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ts-aip-cat-pill:hover { background: #e5e7eb; color: #333; }
.ts-aip-cat-pill.active {
    background: #059669;
    color: #fff;
    border-color: #059669;
}
.ts-aip-cat-icon { font-size: 14px; }

/* ============================================================
   CALENDAR SECTION
   ============================================================ */
.ts-cal-connect {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 24px;
}
.ts-cal-connect-main { flex: 1; min-width: 0; }
.ts-cal-services {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.ts-cal-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
}
.ts-cal-chip-on {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.ts-cal-chip-off {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}
.ts-cal-chip-mark {
    font-size: 10px;
    font-weight: 700;
}
.ts-cal-connect-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.ts-cal-connect-sub {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.45;
}
.ts-cal-connect-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.ts-cal-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ts-cal-btn-primary {
    background: #059669;
    color: #fff;
    border-color: #059669;
}
.ts-cal-btn-primary:hover { background: #047857; border-color: #047857; }
.ts-cal-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}
.ts-cal-btn-secondary:hover { background: #f3f4f6; border-color: #9ca3af; }
.ts-cal-btn-danger {
    background: #fff;
    color: #b91c1c;
    border-color: #fecaca;
}
.ts-cal-btn-danger:hover { background: #fef2f2; border-color: #fca5a5; }

.ts-cal-section-hd {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 8px 0 6px;
}
.ts-cal-section-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    line-height: 1.45;
}
.ts-cal-unassigned {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ts-cal-empty {
    font-size: 13px;
    color: #6b7280;
    padding: 14px 0;
    text-align: center;
}

/* Multi-calendar picker (which Google calendars to surface in TC) */
.ts-cal-picker { margin-bottom: 16px; }
.ts-cal-picker-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.ts-cal-pick-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.ts-cal-pick-check {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-width: 0;
}
.ts-cal-pick-cb {
    width: 16px;
    height: 16px;
    accent-color: #059669;
    flex-shrink: 0;
}
.ts-cal-pick-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
.ts-cal-pick-label {
    font-size: 13px;
    color: #111827;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ts-cal-pick-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 2px 6px;
    border-radius: 4px;
}
.ts-cal-pick-badge-write {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.ts-cal-pick-write {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
}
.ts-cal-pick-radio {
    accent-color: #059669;
}
.ts-cal-pick-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}
.ts-cal-unassigned-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: background 0.25s, border-color 0.25s;
}
.ts-cal-unassigned-row.ts-cal-assigned {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.ts-cal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ts-cal-unassigned-info { flex: 1; min-width: 0; }
.ts-cal-unassigned-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ts-cal-unassigned-when {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}
.ts-cal-assign-select {
    padding: 6px 10px;
    font-size: 12px;
    color: #374151;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.ts-cal-assign-select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5,150,105,0.15);
    outline: none;
}

/* ===== GRADING CALIBRATION (Phase 2) ===== */
.ts-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.ts-card-info {
    background: #f9fafb;
    border-style: dashed;
}
.ts-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}
.ts-card-desc {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.55;
    margin-bottom: 12px;
}
.ts-gradecal-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.ts-gradecal-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.ts-gradecal-btn:hover { background: #f3f4f6; }
.ts-gradecal-btn:active { transform: translateY(1px); }
.ts-gradecal-btn-active {
    background: #ecfdf5;
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.12);
}
.ts-gradecal-caption {
    font-size: 16px;
    font-weight: 700;
    color: #047857;
}
.ts-gradecal-btn:not(.ts-gradecal-btn-active) .ts-gradecal-caption {
    color: #6b7280;
}
.ts-gradecal-label {
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
