/* Import premium modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700&display=swap');

:root {
  --primary-color: #0052FF;
  --primary-hover: #0041CC;
  --primary-light: #EBF1FF;
  --text-dark: #1E293B;
  --text-medium: #64748B;
  --text-light: #94A3B8;
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Plus Jakarta Sans', 'Kanit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Base Layout Wrapper */
#app-container {
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--bg-main);
}

@media (min-width: 769px) {
  #app-container {
    min-height: 90vh;
    height: 90vh;
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin: 5vh auto;
    overflow: hidden;
    flex-direction: row;
  }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-medium);
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(0, 82, 255, 0.05) 0%, rgba(255, 255, 255, 0) 90%), var(--bg-main);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-card);
  border-radius: 32px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 120px;
  height: 120px;
  background-color: var(--primary-light);
  border-radius: 50%;
  z-index: 0;
}

.login-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  background-color: var(--primary-light);
  border-radius: 50%;
  opacity: 0.5;
  z-index: 0;
}

.login-logo {
  max-width: 180px;
  margin-bottom: 24px;
  z-index: 1;
  position: relative;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  z-index: 1;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 32px;
  z-index: 1;
}

.login-form {
  width: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  position: relative;
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background-color: #F8FAFC;
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-color);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.1);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: 50px;
  border: none;
  background-color: var(--primary-color);
  color: white;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.2);
  margin-top: 10px;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 82, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.login-error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 12px;
  display: none;
  font-weight: 500;
  background-color: var(--danger-light);
  padding: 8px 16px;
  border-radius: 12px;
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */
.sidebar {
  width: 260px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 24px;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #F8FAFC;
  height: 100%;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-light);
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.user-role {
  font-size: 12px;
  color: var(--text-medium);
  font-weight: 500;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-medium);
  font-family: var(--font-family);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  transition: var(--transition);
}

.logout-btn:hover {
  background-color: var(--danger-light);
  color: var(--danger);
}

.logout-btn span {
  font-size: 20px;
}

/* Sidebar Navigation */
.sidebar-logo {
  max-width: 140px;
  margin-bottom: 40px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 16px;
  color: var(--text-medium);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.nav-item:hover {
  background-color: #F1F5F9;
  color: var(--text-dark);
}

.nav-item.active {
  background-color: var(--primary-color);
  color: white;
}

.mobile-nav {
  display: none;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  justify-content: space-around;
  position: sticky;
  bottom: 0;
  z-index: 99;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-medium);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
}

.mobile-nav-item.active {
  color: var(--primary-color);
}

.mobile-nav-icon {
  font-size: 20px;
}

/* ==========================================================================
   SCREENS AND CONTENT PANELS
   ========================================================================== */
.view-panel {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  display: none;
}

.view-panel.active {
  display: block;
}

.dashboard-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.dashboard-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stats-card {
  background-color: var(--bg-card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stats-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
}

.stats-icon.blue {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.stats-icon.green {
  background-color: var(--success-light);
  color: var(--success);
}

.stats-icon.warning {
  background-color: var(--warning-light);
  color: var(--warning);
}

.stats-label {
  font-size: 14px;
  color: var(--text-medium);
  font-weight: 500;
}

.stats-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ==========================================================================
   WEEKLY TIMETABLE
   ========================================================================== */
.timetable-container {
  background-color: var(--bg-card);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-top: 16px;
}

.timetable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.day-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  width: 100%;
}

.day-tab {
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background-color: #F8FAFC;
  color: var(--text-medium);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.day-tab:hover {
  background-color: #E2E8F0;
  color: var(--text-dark);
}

.day-tab.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.schedule-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background-color: #F8FAFC;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.schedule-card:hover {
  background-color: white;
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.schedule-info-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.schedule-time {
  min-width: 110px;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary-color);
  background-color: var(--primary-light);
  padding: 8px 12px;
  border-radius: 12px;
  text-align: center;
}

.schedule-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.schedule-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.schedule-meta {
  font-size: 13px;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-badge.pending {
  background-color: var(--warning-light);
  color: var(--warning);
}

.status-badge.completed {
  background-color: var(--success-light);
  color: var(--success);
}

.schedule-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-action {
  padding: 10px 18px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-action.zoom {
  background-color: #E8F0FE;
  color: #1A73E8;
  border-color: #D2E3FC;
}

.btn-action.zoom:hover {
  background-color: #1A73E8;
  color: white;
}

.btn-action.write {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-action.write:hover {
  background-color: var(--primary-hover);
}

.btn-action.secondary {
  background-color: white;
  color: var(--text-medium);
}

.btn-action.secondary:hover {
  background-color: #F1F5F9;
  color: var(--text-dark);
}

.no-schedule {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
  font-size: 15px;
}

.no-schedule-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

/* ==========================================================================
   USER MANAGEMENT (STUDENTS/TEACHERS)
   ========================================================================== */
.table-card {
  background-color: var(--bg-card);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.search-input {
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  font-family: var(--font-family);
  font-size: 14px;
  min-width: 260px;
  outline: none;
  background-color: #F8FAFC;
}

.search-input:focus {
  border-color: var(--primary-color);
  background-color: white;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 4px;
}

.user-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background-color: #F8FAFC;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.user-list-item:hover {
  background-color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-list-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

.user-list-avatar img, .user-list-avatar svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-list-info {
  display: flex;
  flex-direction: column;
}

.user-list-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.user-list-meta {
  font-size: 12px;
  color: var(--text-medium);
  display: flex;
  gap: 8px;
}

.user-list-pin {
  font-weight: 600;
  color: var(--primary-color);
}

/* ==========================================================================
   PROGRESS REPORTS AND FEEDBACK
   ========================================================================== */
.report-card {
  background-color: var(--bg-card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.report-card:hover {
  box-shadow: var(--shadow-md);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 14px;
}

.report-teacher-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-meta-details {
  text-align: right;
}

.report-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.report-time {
  font-size: 12px;
  color: var(--text-medium);
}

.report-subject-badge {
  display: inline-block;
  padding: 4px 10px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.report-content {
  font-size: 15px;
  color: var(--text-dark);
  white-space: pre-line;
}

.report-image-container {
  width: 100%;
  max-height: 250px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.report-image-container::after {
  content: '🔍 คลิกเพื่อดูรูปใหญ่';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  text-align: center;
  opacity: 0;
  transition: var(--transition);
}

.report-image-container:hover::after {
  opacity: 1;
}

.report-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

.report-image-container:hover .report-image {
  transform: scale(1.03);
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: 28px;
  width: 100%;
  max-width: 550px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px 24px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-medium);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: #F8FAFC;
}

/* Form Styles within Modal */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  background-color: #F8FAFC;
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
}

.avatar-selection-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.avatar-option {
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  aspect-ratio: 1/1;
}

.avatar-option img, .avatar-option svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-option:hover {
  transform: scale(1.1);
}

.avatar-option.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-light);
  transform: scale(1.05);
}

.image-preview-box {
  width: 100%;
  height: 160px;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  margin-top: 8px;
  background-color: #F8FAFC;
  transition: var(--transition);
  color: var(--text-medium);
}

.image-preview-box:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Big Image Viewer Modal */
.image-viewer-content {
  background: none;
  border: none;
  box-shadow: none;
  max-width: 90vw;
  align-items: center;
}

.image-viewer-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

/* Notification Indicator Banner */
.notification-banner {
  background-color: var(--warning-light);
  color: #B45309;
  border: 1px solid #FDE68A;
  padding: 12px 20px;
  border-radius: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.notification-banner-btn {
  background-color: #F59E0B;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 50px;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.notification-banner-btn:hover {
  background-color: #D97706;
}

/* Cute character decorative illustration for login */
.cartoon-illustration {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cartoon-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  animation: float 3s ease-in-out infinite;
}

.cartoon-icon:nth-child(2) {
  animation-delay: 0.5s;
}

.cartoon-icon:nth-child(3) {
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ==========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
  body {
    align-items: flex-start;
  }
  
  #app-container {
    flex-direction: column;
    min-height: 100vh;
  }
  
  .sidebar {
    display: none; /* Hide on mobile, use bottom nav instead */
  }
  
  .app-header {
    padding: 16px 20px;
  }
  
  .view-panel {
    padding: 20px 16px 80px 16px; /* Extra bottom padding for mobile nav */
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .schedule-card {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .schedule-actions {
    justify-content: flex-end;
  }
  
  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input {
    min-width: 100%;
  }
  
  .avatar-selection-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
