.tui-header-tabs { display: flex; gap: 4px; background: var(--gray2); border-radius: 10px; padding: 4px; width: fit-content; }
.tui-tab-btn { padding: 8px 18px; border: none; background: transparent; color: var(--text3); font-family: inherit; font-size: 13.5px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s; }
.tui-tab-btn.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }
.tui-tab-btn:hover:not(.active) { background: rgba(255,255,255,0.5); color: var(--text); }

.tui-section { display: none; }
.tui-section.active { display: block; }

.tui-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }

.tui-table-wrapper { background: white; border-radius: 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; margin-bottom: 20px;}
.tui-table-header { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.tui-table-title { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.tui-table { width: 100%; border-collapse: collapse; }
.tui-table th { padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); background: var(--gray); text-align: left; border-bottom: 1px solid var(--border); }
.tui-table td { padding: 13px 16px; font-size: 14.5px; vertical-align: middle; border-bottom: 1px solid var(--gray2); color: var(--text2); }
.tui-table tr:hover td { background: var(--gray); }

.student-info { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar.a1 { background: #dbeafe; color: #1d4ed8; }
.avatar.a2 { background: #dcfce7; color: #166534; }
.avatar.a3 { background: #fef3c7; color: #92400e; }
.avatar.a4 { background: #fce7f3; color: #9d174d; }
.avatar.a5 { background: #ede9fe; color: #5b21b6; }
.student-name { font-weight: 600; color: var(--text); }
.student-class { font-size: 11px; color: var(--text3); }

.sessions-input { width: 64px; padding: 6px 8px; border: 1.5px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13px; text-align: center; outline: none; transition: border-color 0.2s; }
.sessions-input:focus { border-color: var(--primary); background: var(--primary-light); }

.amount { font-weight: 700; color: var(--text); }
.debt-amount { font-weight: 700; color: var(--red); }
.paid-amount { font-weight: 700; color: var(--green); }

.history-item { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; transition: box-shadow 0.2s; }
.history-item:hover { box-shadow: var(--shadow-sm); border-color: var(--primary-light); }
.history-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; background: var(--primary-light); }
.history-icon.paid { background: #dcfce7; color: #166534; }
.history-icon.pending { background: #fef3c7; color: #92400e; }
.history-info { flex: 1; }
.history-student { font-weight: 700; font-size: 14.5px; color: var(--text); }
.history-meta { font-size: 13px; color: var(--text3); margin-top: 4px; }
.history-amount-col { text-align: right; }
.history-amount { font-weight: 800; font-size: 16px; }
.history-date { font-size: 12px; color: var(--text3); margin-top: 4px; }
