/* Students tab: calmer hierarchy, polished toolbar, roomy rows. Loaded after styles.css; scoped with #content. */
#content .students-page .page-heading{margin:0 0 14px;align-items:center}
#content .students-page .page-heading h1{font-size:24px;margin:0}
#content .students-page .page-heading p{margin:4px 0 0;font-size:12.5px}
#content .students-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin:0 0 12px}
#content .students-stat{position:relative;overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 14px 9px;cursor:pointer;text-align:left;font:inherit;color:var(--ink);transition:transform .15s,box-shadow .15s,border-color .15s}
#content .students-stat:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(23,25,29,.07)}
#content .students-stat.on{border-color:#17191d;box-shadow:0 0 0 1px #17191d inset}
#content .students-stat .k{display:block;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:600}
#content .students-stat .v{display:block;font-size:22px;font-weight:700;letter-spacing:-.02em;line-height:1.15;margin-top:4px}
#content .students-stat::after{content:'';position:absolute;right:-18px;top:-18px;width:62px;height:62px;border-radius:50%;opacity:.14;background:var(--dot,#c89a42)}
#content .students-stat.active{--dot:#00a846}#content .students-stat.pending{--dot:#ffb000}#content .students-stat.refunded{--dot:#d64545}#content .students-stat.all{--dot:#c89a42}

#content .unified-students-card{border-radius:18px;overflow:hidden;box-shadow:0 1px 0 rgba(23,25,29,.03),0 14px 40px rgba(23,25,29,.05)}
#content .unified-students-card>.section-heading{padding:14px 18px;margin:0;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#fff,#fbfaf7)}
#content .unified-students-card .section-heading h2{font-size:17px;letter-spacing:-.01em}
#content .unified-students-card .filters{gap:10px;align-items:center}
#content .unified-students-card .top-search{width:240px;height:38px;border-radius:10px;border:1px solid var(--line);background:#fff;box-shadow:0 1px 2px rgba(23,25,29,.04);transition:border-color .15s,box-shadow .15s}
#content .unified-students-card .top-search:focus-within{border-color:#c89a42;box-shadow:0 0 0 3px rgba(200,154,66,.18)}
#content .unified-students-card .top-search input{width:100%;font-size:13px}
#content .unified-students-card .filters select{appearance:none;-webkit-appearance:none;height:38px;min-width:150px;max-width:240px;padding:0 34px 0 14px;border-radius:10px;border:1px solid var(--line);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23777b83' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;font-size:13px;font-weight:500;color:var(--ink);box-shadow:0 1px 2px rgba(23,25,29,.04);cursor:pointer;text-overflow:ellipsis}
#content .unified-students-card .filters select:focus{outline:none;border-color:#c89a42;box-shadow:0 0 0 3px rgba(200,154,66,.18)}

#content .unified-students-card thead th{background:#fbfaf7;font-size:10px;letter-spacing:.14em;color:#8a8d94;padding:9px 14px;border-bottom:1px solid var(--line)}
#content .unified-students-card tbody td{padding:8px 14px;vertical-align:middle;border-bottom:1px solid #f0efeb}
#content .unified-students-card tbody tr:last-child td{border-bottom:0}
#content .unified-students-card tbody tr{transition:background .12s}
#content .unified-students-card tbody tr:hover{background:#fcfbf8}
#content .unified-students-card .avatar{width:32px;height:32px;border-radius:10px;font-size:12px;font-weight:700;background:linear-gradient(135deg,#f9efda,#e9cf93);color:#7a5a1a;box-shadow:inset 0 0 0 1px rgba(122,90,26,.12)}
#content .unified-students-card .student-identity strong{font-size:13px;letter-spacing:-.01em}
#content .unified-students-card .student-identity .student-login-email{color:#6f727a}
#content .unified-students-card .student-identity .student-added{color:#a0a3aa}
#content .unified-students-card .student-courses-cell .badge,#content .unified-students-card .student-creator-cell .badge{border-radius:999px;padding:5px 10px;font-size:10.5px;letter-spacing:.04em;font-weight:600;margin:3px 4px 3px 0}
#content .unified-students-card .badge.gold{background:#faf1dc;color:#7a5a1a;border:1px solid #efdcae}
#content .unified-students-card .badge.blue{background:#e9f0fb;color:#24498a;border:1px solid #d3e0f5}
#content .unified-students-card .badge.gray{background:#f3f3f1;color:#5e626a;border:1px solid #e6e6e2}
#content .unified-students-card .badge-dot{border-radius:999px;padding:5px 11px 5px 9px;font-size:12px;font-weight:600}
#content .unified-students-card .badge-dot.red{background:#fdeeee;color:#a52a2a}
#content .unified-students-card .badge-dot.red::before{background:#d64545}
#content .unified-students-card .badge-dot.green{background:#e4f5ec}

#content .unified-students-card .table-actions{gap:6px;align-items:center}
#content .unified-students-card .table-actions .btn{height:34px;border-radius:9px;font-size:12px;font-weight:600;transition:background .12s,border-color .12s,transform .12s}
#content .unified-students-card .table-actions .btn.ghost{border:1px solid var(--line);background:#fff;color:#3a3d45}
#content .unified-students-card .table-actions .btn.ghost:hover{background:#f7f5f0;border-color:#dcd9d1}
#content .unified-students-card .table-actions .btn.navy{box-shadow:0 4px 12px rgba(11,26,48,.22)}
#content .unified-students-card .table-actions .btn[data-action=refund-student]{color:#7a5a1a;border-color:#efdcae;background:#fdf8ec}
#content .unified-students-card .table-actions .btn[data-action=refund-student]:hover{background:#faf1dc}
#content .unified-students-card .table-actions .row-menu>summary{height:34px;border-radius:9px;border:1px solid var(--line);background:#fff}
#content .unified-students-card .table-footer{border-top:1px solid var(--line);background:#fbfaf7}
#content .unified-students-card .pagination-controls .btn{border-radius:8px}
#content .unified-students-card .empty{padding:48px 20px;color:var(--muted)}
#content .students-note{border-radius:12px;margin-top:12px;padding:10px 14px;font-size:12px}

@media(max-width:900px){#content .unified-students-card .top-search{width:100%}#content .unified-students-card .filters{width:100%}#content .unified-students-card .filters select{flex:1;min-width:0}}

#content .unified-students-card .student-identity .student-added{display:none}
#content .unified-students-card .student-identity{gap:0}
#content .unified-students-card .student-courses-cell .badge,#content .unified-students-card .student-creator-cell .badge{padding:3px 8px;font-size:10px;margin:2px 3px 2px 0;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:middle}
#content .unified-students-card .table-actions .btn{height:30px;font-size:11.5px}
#content .unified-students-card .table-actions .row-menu>summary{height:30px}
#content .unified-students-card .badge-dot{padding:3px 9px 3px 8px;font-size:11.5px}
#content .unified-students-card .table-footer{padding:10px 16px!important}

#content .unified-students-card .course-chips{display:flex;flex-wrap:wrap;gap:3px;max-width:360px}
#content .unified-students-card .student-courses-cell .badge{max-width:200px;margin:0}
#content .unified-students-card .student-creator-cell .badge{margin:1px 2px 1px 0;max-width:130px}
#content .unified-students-card td:first-child{min-width:200px}
#content .unified-students-card td{white-space:nowrap}
#content .unified-students-card .table-actions .btn.ghost.icon-btn{width:30px;padding:0;justify-content:center}
#content .unified-students-card .table-actions .btn.navy{height:30px;padding:0 8px}
#content .unified-students-card .table-actions .btn[data-action=refund-student]{padding:0 9px}
#content .unified-students-card .table-actions .row-menu>summary{padding:0 8px;font-size:11.5px}
#content .unified-students-card .course-chips{flex-wrap:nowrap;max-width:300px}
#content .unified-students-card .student-courses-cell .badge{max-width:150px}
#content .unified-students-card .student-courses-cell,#content .unified-students-card .student-creator-cell{min-width:0}
#content .unified-students-card .student-creator-cell{max-width:170px}
#content .unified-students-card .student-creator-cell .badge{margin:0;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}
#content .unified-students-card .table-actions{gap:4px}
#content .unified-students-card .student-courses-cell{width:250px;max-width:250px;overflow:hidden}
#content .unified-students-card .course-chips{max-width:100%}
#content .unified-students-card .student-creator-cell{width:150px;max-width:150px;overflow:hidden}
#content .unified-students-card td:first-child{min-width:0;width:220px;max-width:240px;overflow:hidden}
#content .unified-students-card .student-identity .student-login-email{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:normal}
#content .unified-students-card .table-actions .btn .icon{width:15px;height:15px}

#content .unified-students-card .row-num{width:44px;max-width:44px;text-align:right;color:#a0a3aa;font-size:12px;font-variant-numeric:tabular-nums;padding-right:6px}
#content .unified-students-card th.row-num{text-align:right}
#content .unified-students-card .course-chips{flex-wrap:nowrap;overflow:hidden}
#content .unified-students-card .course-chips .badge{flex:0 1 auto;min-width:0}
#content .unified-students-card .course-chips .badge.gray{flex:0 0 auto}
#content .unified-students-card td:first-child{width:44px;min-width:0;max-width:44px}
#content .unified-students-card td:nth-child(2){width:220px;max-width:240px;overflow:hidden}

/* Stretch: let the table use the full card width instead of fixed narrow columns. */
#content .unified-students-card table{width:100%;table-layout:auto}
#content .unified-students-card td:nth-child(2){width:auto;max-width:none;min-width:200px}
#content .unified-students-card .student-courses-cell{width:auto;max-width:none;min-width:260px}
#content .unified-students-card .course-chips{max-width:none;gap:4px}
#content .unified-students-card .student-courses-cell .badge{max-width:260px}
#content .unified-students-card .student-creator-cell{width:auto;max-width:none;min-width:150px}
#content .unified-students-card .student-creator-cell .badge{max-width:170px}
#content .unified-students-card .badge-dot{white-space:nowrap}
#content .unified-students-card td:has(.table-actions){width:1%;white-space:nowrap}
#content .unified-students-card th:last-child{width:1%}
#content .unified-students-card table{table-layout:fixed}
#content .unified-students-card th.row-num,#content .unified-students-card td.row-num{width:40px}
#content .unified-students-card th:nth-child(2),#content .unified-students-card td:nth-child(2){width:22%;min-width:0;overflow:hidden}
#content .unified-students-card .student-courses-cell{min-width:0;overflow:hidden}
#content .unified-students-card .student-creator-cell{min-width:0;overflow:hidden}
#content .unified-students-card td:has(.table-actions),#content .unified-students-card th:last-child{width:270px}
#content .unified-students-card td:has(.badge-dot),#content .unified-students-card th:nth-last-child(2){width:96px}
#content .unified-students-card .student-courses-cell .badge{max-width:220px}
#content .unified-students-card td:has(.table-actions),#content .unified-students-card th:last-child{width:238px}
#content .unified-students-card td:has(.badge-dot),#content .unified-students-card th:nth-last-child(2){width:88px}
#content .unified-students-card .table-actions{flex-wrap:nowrap;justify-content:flex-start}
#content .unified-students-card .table-actions .row-menu>summary{white-space:nowrap}
#content .unified-students-card .table-wrap{overflow-x:auto}
#content .unified-students-card table{min-width:960px}

/* Fit: compact action cluster so the whole table fits without horizontal scrolling. */
#content .unified-students-card .table-wrap{overflow-x:visible}
#content .unified-students-card table{min-width:0}
#content .unified-students-card .table-actions{gap:3px}
#content .unified-students-card .table-actions .btn,#content .unified-students-card .table-actions .row-menu>summary{height:28px}
#content .unified-students-card .table-actions .btn.ghost.icon-btn,#content .unified-students-card .table-actions .btn.navy{width:28px;padding:0}
#content .unified-students-card .table-actions .btn[data-action=refund-student]{padding:0 7px;font-size:11px}
#content .unified-students-card .table-actions .btn[data-action=refund-student] .icon{display:none}
#content .unified-students-card .table-actions .row-menu>summary{width:28px;padding:0;justify-content:center;gap:0}
#content .unified-students-card .table-actions .row-menu>summary span{display:none}
#content .unified-students-card td:has(.table-actions),#content .unified-students-card th:last-child{width:182px}
#content .unified-students-card td:has(.badge-dot),#content .unified-students-card th:nth-last-child(2){width:80px}
#content .unified-students-card th:nth-child(2),#content .unified-students-card td:nth-child(2){width:21%}
#content .unified-students-card .student-courses-cell .badge{max-width:170px}
#content .unified-students-card .student-creator-cell .badge{max-width:120px}
#content .unified-students-card .table-actions>*{flex:0 0 auto}
#content .unified-students-card .table-actions .btn.icon-btn,#content .unified-students-card .table-actions .btn.navy,#content .unified-students-card .table-actions .row-menu>summary{min-width:0;width:28px}
#content .unified-students-card td:has(.table-actions),#content .unified-students-card th:last-child{width:212px}
#content .unified-students-card td:has(.table-actions){padding-left:10px;padding-right:10px}

/* Status column: its own room, centered between creator and actions, never clipped. */
#content .unified-students-card td:has(.badge-dot),#content .unified-students-card th:nth-last-child(2){width:132px;text-align:center;overflow:visible;padding-left:8px;padding-right:8px}
#content .unified-students-card td:has(.badge-dot) .badge-dot{display:inline-flex;white-space:nowrap}
#content .unified-students-card .badge-dot.gold,#content .unified-students-card .badge-dot.amber{font-size:11px;padding:3px 8px 3px 7px}
#content .unified-students-card td:has(.table-actions),#content .unified-students-card th:last-child{width:200px}

/* Stat cards stay pinned at the top of the scrolling area; each one is a clickable filter. */
#content .students-page .students-stats{position:sticky;top:-28px;z-index:5;background:var(--paper,#f5f6f8);padding:12px 0 10px;margin:0 0 4px}
#content .students-stat{box-shadow:0 1px 2px rgba(23,25,29,.05)}
