/* سير العملية — حقل المدرّسين (مدمج، صف واحد) */

.academic-search-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.academic-search-toolbar .ac-search-field {
    flex: 1 1 200px;
    min-width: 180px;
}

.academic-search-toolbar .stu-toolbar-meta {
    flex: 0 0 auto;
    align-self: center;
}

.stu-act-btn.stu-act-meta {
    color: #64748b;
    border-color: #cbd5e1;
}

.stu-act-btn.stu-act-save {
    color: #059669;
    border-color: #6ee7b7;
    background: #ecfdf5;
}

.stu-act-btn.stu-act-cancel {
    color: #64748b;
}

#academicCoursesTable tr.ac-row-editing {
    background: rgba(5, 150, 105, 0.06);
    box-shadow: inset 0 0 0 2px rgba(5, 150, 105, 0.25);
}

#academicCoursesTable .ac-inline-field {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 4px 6px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #fff;
    color: #0f172a;
}

#academicCoursesTable .ac-inline-field:focus {
    outline: none;
    border-color: #059669;
}

.fac-table-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.fac-act-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
}

.fac-act-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.fac-act-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.fac-act-btn.fac-act-edit {
    color: #2563eb;
    border-color: #93c5fd;
}

.fac-act-btn.fac-act-pass {
    color: #d97706;
    border-color: #fcd34d;
}

.fac-act-btn.fac-act-del {
    color: #dc2626;
    border-color: #fca5a5;
}

.fac-act-btn.fac-act-link {
    color: #059669;
    border-color: #6ee7b7;
}

.fac-pass-code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.c-teacher-compact {
    min-width: 0;
    max-width: none;
}

.c-teacher-row {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
}

/* يطابق inputs الجدول الأصلي */
.academic-excel-table .c-teacher-row .c-teacher-multi,
.academic-excel-table .c-teacher-row .ac-inline-teacher-input,
#academicCoursesTable .c-teacher-row .ac-inline-teacher-input {
    flex: 1;
    min-width: 0;
    width: auto;
    min-height: 38px;
    height: 38px;
    padding: 6px 8px;
    margin: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: right;
    resize: none;
    line-height: 1.3;
}

.academic-excel-table .c-teacher-row .c-teacher-multi:focus,
.academic-excel-table .c-teacher-row .ac-inline-teacher-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.academic-excel-table td.col-teacher,
.academic-excel-table .col-teacher {
    min-width: 155px;
    max-width: 220px;
    padding: 6px 5px !important;
    vertical-align: middle !important;
}

.c-teacher-pick-add {
    flex-shrink: 0;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px;
    height: 32px;
    padding: 0 2px !important;
    font-size: 0.85rem !important;
    font-weight: 700;
    text-align: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    color: #059669;
    cursor: pointer;
}

.c-teacher-format-btn,
.ac-teacher-save-inline {
    flex-shrink: 0;
    width: 28px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.c-teacher-format-btn:hover,
.c-teacher-pick-add:hover {
    background: #ecfdf5;
    border-color: #059669;
    color: #059669;
}

.ac-teacher-save-inline {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
    font-weight: 800;
}

.ac-teacher-save-inline:hover {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

/* إخفاء عناصر قديمة */
.c-teacher-chips,
.ac-teacher-chips-inline,
.c-teacher-toolbar,
.ac-teacher-inline-actions {
    display: none !important;
}

.ac-teacher-display {
    max-width: 200px;
    font-size: 0.82rem;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334155;
    line-height: 1.4;
}

#academicCoursesTable .ac-col-teacher {
    min-width: 170px;
    max-width: 240px;
    vertical-align: middle;
}

#academicCoursesTable .c-teacher-row .ac-inline-teacher-input {
    min-height: 34px;
    height: 34px;
    font-size: 0.78rem;
}

#academicCoursesTable .c-teacher-pick-add,
#academicCoursesTable .c-teacher-format-btn,
#academicCoursesTable .ac-teacher-save-inline {
    width: 26px;
    height: 28px;
    font-size: 0.78rem;
}

/* جوال: يبقى في صف واحد */
@media (max-width: 768px) {
    .academic-excel-table .c-teacher-row {
        flex-wrap: nowrap;
    }

    .academic-excel-table .c-teacher-row .c-teacher-multi {
        min-height: 44px;
        height: 44px;
        font-size: 0.9rem;
    }
}
