/* =========================================================
   PAGE STUDENT CSS - QUẢN LÝ HỌC VIÊN
   Design standard: CRM Lead Student Tab Style
   Strictly using variables from g-4_ht-base.css
   ========================================================= */

.student-search-box {
    position: relative;
    width: 100%;
    max-width: 380px;
}

.student-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--Light_mode-Gray_Scale-40);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-search-box .search-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--Light_mode-Gray_Scale-40);
}

.student-search-input {
    width: 100%;
    padding: 10px 48px 10px 40px;
    border-radius: 12px;
    border: 1px solid var(--Light_mode-Gray_Scale-80);
    background-color: var(--Light_mode-Gray_Scale-100);
    font-size: 14px;
    color: var(--Light_mode-Gray_Scale-10);
    outline: none;
    transition: all 0.2s ease;
}

#studentClearSearch[hidden] {
    display: none;
}

.student-search-input::placeholder {
    color: var(--Light_mode-Gray_Scale-40);
}

.student-search-input:focus {
    border-color: var(--Sky-500);
    background-color: var(--Sky-50);
}

.student-toolbar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-total-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background-color: var(--Sky-50);
    color: var(--Light-Primary-50);
    border: 1px solid var(--Sky-100);
}

/* --- USER CELL (NGƯỜI HỌC) --- */
.student-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--Light_mode-Gray_Scale-100);
    flex-shrink: 0;
    user-select: none;
}

/* Avatar Pastel Colors */
.student-avatar-initials.avatar-green {
    background-color: var(--Green-500);
}

.student-avatar-initials.avatar-purple {
    background-color: var(--Purple-500);
}

.student-avatar-initials.avatar-blue {
    background-color: var(--Blue-500);
}

.student-avatar-initials.avatar-orange {
    background-color: var(--Orange-500);
}

.student-avatar-initials.avatar-sky {
    background-color: var(--Sky-500);
}

.student-avatar-initials.avatar-red {
    background-color: var(--Red-500);
}

.student-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.student-user-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--Light_mode-Gray_Scale-5);
    line-height: 1.3;
}

.student-user-name a {
    color: var(--Light_mode-Gray_Scale-5);
    text-decoration: none;
    transition: color 0.15s ease;
}

.student-user-name a:hover {
    color: var(--Sky-500);
}

.student-user-sub {
    font-size: 12px;
    color: var(--Light_mode-Gray_Scale-40);
    line-height: 1.3;
}

/* --- CONTACT CELL (LIÊN HỆ) --- */
.student-contact-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.student-phone-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--Light_mode-Gray_Scale-5);
    letter-spacing: 0.02em;
}

.student-btn-copy {
    border: none;
    background: transparent;
    color: var(--Light_mode-Gray_Scale-40);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.student-btn-copy svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.student-btn-copy:hover {
    color: var(--Sky-500);
    background-color: var(--Sky-50);
}

/* --- CLASS BADGES (LỚP ĐANG HỌC) --- */
.student-class-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.badge-class-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid var(--Sky-100);
    background-color: var(--Sky-50);
    color: var(--Sky-500);
}

.badge-class-pill:hover {
    transform: translateY(-1px);
}

.badge-class-pill.class-purple {
    background-color: var(--Purple-50);
    color: var(--Purple-500);
    border-color: var(--Purple-100);
}

.badge-class-pill.class-purple:hover {
    background-color: var(--Purple-100);
}

.badge-class-pill.class-green {
    background-color: var(--Green-50);
    color: var(--Green-500);
    border-color: var(--Green-100);
}

.badge-class-pill.class-green:hover {
    background-color: var(--Green-100);
}

.badge-class-pill.class-blue {
    background-color: var(--Blue-50);
    color: var(--Blue-500);
    border-color: var(--Blue-100);
}

.badge-class-pill.class-blue:hover {
    background-color: var(--Blue-100);
}

.badge-class-pill.class-orange {
    background-color: var(--Orange-50);
    color: var(--Orange-500);
    border-color: var(--Orange-100);
}

.badge-class-pill.class-orange:hover {
    background-color: var(--Orange-100);
}

.badge-class-pill.class-gray {
    background-color: var(--Light_mode-Gray_Scale-95);
    color: var(--Light_mode-Gray_Scale-40);
    border-color: var(--Light_mode-Gray_Scale-90);
}

/* --- LATEST JOURNAL / NOTE (NHẬT KÝ MỚI NHẤT) --- */
.student-journal-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 320px;
}

.student-apt-time {
    font-size: 13px;
    font-weight: 700;
    color: var(--Light_mode-Gray_Scale-5);
    line-height: 1.3;
}

.student-apt-note {
    font-size: 12px;
    color: var(--Light_mode-Gray_Scale-40);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- ACTIONS CELL (THAO TÁC) --- */
.student-actions-cell {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.student-act-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--Light_mode-Gray_Scale-80);
    background-color: var(--Light_mode-Gray_Scale-100);
    color: var(--Light_mode-Gray_Scale-30);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    text-decoration: none;
}

.student-act-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    display: block;
}

.student-act-btn i {
    font-size: 14px;
    line-height: 1;
}

.student-act-btn:hover {
    border-color: var(--Sky-500);
    color: var(--Sky-500);
    background-color: var(--Sky-50);
}

.student-act-btn.act-delete:hover {
    border-color: var(--Red-100);
    color: var(--Red-500);
    background-color: var(--Red-50);
}

.student-act-btn.act-zalo:hover {
    border-color: var(--Blue-100);
    color: var(--Blue-500);
    background-color: var(--Blue-50);
}

/* Empty Table State */
.student-empty-cell {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--Light_mode-Gray_Scale-40);
    font-size: 14px;
}

/* Student-specific filter sizing; structural styles are global. */
.student-page-container .layout-filter { flex-wrap: nowrap; }
.student-page-container .student-search-box { flex: 1 1 280px; min-width: 180px; }
.student-toolbar-filter { flex: 0 1 240px; min-width: 160px; }
.student-toolbar-filter .ts-wrapper { width: 100%; min-width: 0; }
.student-toolbar-filter .ts-control,
.student-toolbar-filter select.c_input {
    min-height: 40px; width: 100%; padding: 10px 32px 10px 12px;
    border: 1px solid var(--Gray-200, #e5e7eb); border-radius: 10px;
    background: #fff; font: inherit; box-shadow: none; cursor: pointer;
}
.student-toolbar-filter .ts-control .item { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-toolbar-filter .ts-control input { min-width: 0; }
.student-toolbar-filter .ts-dropdown { border-radius: 10px; overflow: hidden; font: inherit; }
.student-toolbar-filter .ts-wrapper.focus .ts-control { border-color: var(--Light-Primary-50); }
.student-page-container .student-toolbar-meta { margin-left: auto; flex-shrink: 0; }
@media (max-width: 1100px) {
    .student-page-container .layout-filter { flex-wrap: wrap; }
    .student-toolbar-filter { flex: 1 1 180px; }
}
@media (max-width: 600px) {
    .student-page-container { padding: 16px 12px 24px; }
    .student-page-container .layout-filter { flex-direction: row; }
    .student-page-container .student-search-box { max-width: none; flex-basis: 100%; }
    .student-toolbar-filter { min-width: 0; flex-basis: calc(50% - 8px); }
    .student-page-container .student-toolbar-meta { margin-left: 0; }
}
