/* Student dashboard */
#student-dashboard-section{
  max-width:1100px;
  margin-inline:auto;
}
.profile-avatar{
  box-shadow:var(--mizan-shadow-avatar-glow);
}
.profile-identity{
  flex:1;
}
.profile-identity h2{
  margin:0 0 3px;
  font-size:var(--mizan-font-size-heading-sm);
}
.profile-logout-btn:hover,
.profile-clear-btn:hover{
  background:var(--mizan-accent-tile-bg);
}
.coming-icon{
  font-size:27px;
}
@media (max-width: 800px){
  .profile-stats-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .profile-stats-grid .profile-stat-card:last-child{
    grid-column:1 / -1;
  }
}
@media (max-width: 560px){
    .profile-logout-btn{
    margin-inline-start:auto;
  }
  .profile-avatar{
    width:52px;
    height:52px;
    flex-basis:52px;
    font-size:var(--mizan-font-size-heading-sm);
  }
  .profile-identity h2{
    font-size:var(--mizan-font-size-lg);
  }
  .profile-panel{
    padding:13px;
  }
  .profile-panel-heading{
    align-items:flex-start;
  }
  .history-item{
    align-items:flex-start;
  }
  .history-score{
    margin-inline-start:auto;
  }
}
/* Student profile name editor */
.profile-name-editor{
  margin-top:var(--mizan-space-4);
  padding:var(--mizan-space-5);
  border:1px solid var(--mizan-primary-500-border);
  border-radius:var(--mizan-radius-lg);
  background:var(--mizan-gradient-card-glass-primary);
  box-shadow:var(--mizan-shadow-student-ui-card);
}
.profile-name-editor .profile-panel-heading{
  align-items:center;
}
.profile-name-editor .profile-panel-heading>i{
  color:var(--primary,var(--mizan-primary-500));
  font-size:var(--mizan-font-size-lg);
}
.profile-name-editor label{
  display:block;
  margin:0 0 var(--mizan-gap-tight);
  color:var(--mizan-muted);
  font-size:13px;
  font-weight:700;
}
.profile-name-editor-row{
  display:flex;
  align-items:stretch;
  gap:var(--mizan-gap-small);
}
.profile-name-editor-row input{
  flex:1;
  min-width:0;
  height:var(--mizan-control-height-prominent);
  border:1px solid var(--mizan-primary-500-border);
  border-radius:var(--mizan-radius-11);
  background:color-mix(in srgb,var(--mizan-black) 16%,transparent);
  color:var(--mizan-bg-light);
  padding:11px 13px;
  font:inherit;
  outline:none;
  direction:rtl;
}
.profile-name-editor-row input:focus{
  border-color:color-mix(in srgb,var(--mizan-primary-500) 62%,transparent);
  box-shadow:var(--mizan-shadow-profile-focus);
}
.profile-name-editor-row button{
  min-width:125px;
  height:var(--mizan-control-height-prominent);
  border:1px solid var(--mizan-btn-primary-border);
  border-radius:var(--mizan-radius-11);
  background:var(--mizan-btn-primary-bg);
  color:var(--mizan-btn-primary-fg);
  padding:var(--mizan-space-inset-compact) var(--mizan-space-inset-roomy);
  cursor:pointer;
  font:inherit;
  font-weight:800;
  white-space:nowrap;
}
.profile-name-editor-row button:hover{
  background:var(--mizan-btn-primary-bg-hover);
}
.profile-name-editor-row button:disabled{
  opacity:.55;
  cursor:wait;
}
.profile-name-editor-message{
  min-height:20px;
  margin:var(--mizan-space-2) 0 0;
  color:var(--mizan-success);
  font-size:var(--mizan-font-size-xs);
  opacity:.8;
}
@media(max-width:560px){
  .profile-name-editor{padding:var(--mizan-space-4)}
  .profile-name-editor-row{
    flex-direction:column;
  }
  .profile-name-editor-row button{
    width:100%;
  }
}
/* ===== Theme-aware dashboard surfaces — merged ===== */
html[data-theme="light"] .profile-name-editor{
  background:var(--mizan-surface);
  border-color:var(--mizan-primary-500-paper);
  box-shadow:var(--mizan-shadow-surface-soft);
}
html[data-theme="light"] .student-profile-card,
html[data-theme="light"] .profile-panel,
html[data-theme="light"] .profile-stat-card,
html[data-theme="light"] .student-info-grid>div{
  background:var(--mizan-surface);
  border-color:var(--mizan-border-light);
  color:var(--mizan-text);
}
html[data-theme="light"] .history-item{
  background:var(--mizan-bg-light);
  border-color:var(--mizan-border-light);
}
