/* ============================================================
   styles/index.css — CAFA Emp — Sistema de Avaliação
   Cores Primárias: Laranja Escuro (#D9531E / #E65100), Branco (#FFFFFF) e Preto (#0C0C0E / #16161A)
   ============================================================ */

:root {
  --bg-main: #0c0c0e;
  --bg-card: #16161a;
  --bg-card-hover: #1e1e24;
  --bg-input: #1a1a20;
  --bg-sidebar: #121216;
  --border-color: #272730;
  --border-light: rgba(255, 255, 255, 0.08);

  /* Laranja Escuro & Destaques */
  --orange-primary: #d9531e;
  --orange-hover: #bf360c;
  --orange-glow: rgba(217, 83, 30, 0.25);
  --orange-light: #ff7043;
  --orange-badge: rgba(217, 83, 30, 0.15);

  /* Branco & Textos */
  --text-white: #ffffff;
  --text-primary: #f5f5f7;
  --text-secondary: #9e9ea8;
  --text-muted: #6b6b76;

  /* Status */
  --color-success: #2e7d32;
  --color-success-bg: rgba(46, 125, 50, 0.15);
  --color-danger: #c62828;
  --color-danger-bg: rgba(198, 40, 40, 0.15);
  --color-warning: #f57f17;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition: all 0.2s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--orange-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--orange-primary);
}

/* ============================================================
   TELA DE LOGIN
   ============================================================ */
.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, #1a1512 0%, #0c0c0e 90%);
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
}

.blob-1 {
  width: 420px;
  height: 420px;
  background: #d9531e;
  top: -80px;
  left: -80px;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: #bf360c;
  bottom: -60px;
  right: -60px;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
}

.login-card {
  flex: 1.1;
  padding: 44px;
}

.login-side {
  flex: 0.9;
  background: linear-gradient(135deg, #181513 0%, #12100f 100%);
  border-left: 1px solid var(--border-color);
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--orange-primary);
  color: var(--text-white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px var(--orange-glow);
}

.logo-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.logo-title span {
  color: var(--orange-primary);
}

.logo-sub {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
}

.login-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.side-content h3 {
  font-size: 20px;
  color: var(--text-white);
  margin-bottom: 12px;
}

.side-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.side-features {
  list-style: none;
}

.side-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-primary);
}

.side-features li i {
  color: var(--orange-primary);
}

.login-demo-box {
  margin-top: 24px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.login-demo-box .demo-title {
  color: var(--orange-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-demo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.login-demo-row + .login-demo-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
  padding-top: 6px;
}

.login-demo-row code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  color: #ffb74d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}


/* ============================================================
   FORMULÁRIOS & INPUTS
   ============================================================ */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group label i {
  color: var(--orange-primary);
  margin-right: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

.input-icon-right {
  position: relative;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
}

.toggle-pass:hover {
  color: var(--text-white);
}

.field-error {
  display: block;
  font-size: 12px;
  color: #ff5252;
  margin-top: 4px;
}

/* Botões */
.btn-primary,
.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--orange-primary);
  color: var(--text-white);
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary:hover,
.btn-login:hover {
  background: var(--orange-hover);
  color: var(--text-white);
  box-shadow: 0 4px 15px var(--orange-glow);
}

.btn-login {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-top: 8px;
}

.btn-secondary {
  background: #25252e;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #30303b;
  color: var(--text-white);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-danger {
  background: rgba(198, 40, 40, 0.2);
  color: #ef5350;
  border: 1px solid rgba(229, 57, 53, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-danger:hover {
  background: var(--color-danger);
  color: var(--text-white);
}

/* ============================================================
   LAYOUT DO SISTEMA (SIDEBAR + CONTEÚDO)
   ============================================================ */
.dashboard-body {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
  overflow: hidden;
  flex: 1;
}

.sidebar-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.sidebar-logo-img {
  height: 52px;
  width: auto;
  max-width: 185px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.sidebar-logo a:hover .sidebar-logo-img {
  transform: scale(1.02);
}

.sidebar-logo-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: none;
}

.sidebar.collapsed .sidebar-logo-img {
  display: none;
}

.sidebar.collapsed .sidebar-logo-icon {
  display: block;
}

.sidebar-logo i {
  color: var(--orange-primary);
  font-size: 20px;
}

.sidebar-logo span strong {
  color: var(--orange-primary);
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
}

.sidebar-toggle:hover {
  color: var(--text-white);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 3px;
  transition: var(--transition);
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
}

.nav-item.active {
  background: var(--orange-badge);
  color: var(--orange-light);
  border-left: 3px solid var(--orange-primary);
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

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

.user-avatar {
  width: 36px;
  height: 36px;
  background: #25252e;
  border: 1px solid var(--orange-primary);
  color: var(--orange-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text-secondary);
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.btn-logout:hover {
  color: #ff5252;
}

/* ============================================================
   CONTEÚDO PRINCIPAL & TOPBAR
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 18px;
  cursor: pointer;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
}

.page-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.badge-perfil.admin {
  background: rgba(217, 83, 30, 0.2);
  color: #ff8a65;
  border: 1px solid rgba(217, 83, 30, 0.4);
}

.badge-perfil.professor {
  background: rgba(33, 150, 243, 0.15);
  color: #90caf9;
  border: 1px solid rgba(33, 150, 243, 0.3);
}

.content-area {
  padding: 32px;
  flex: 1;
}

/* ============================================================
   CARDS & GRIDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

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

.stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-card.orange .stat-icon {
  background: var(--orange-badge);
  color: var(--orange-primary);
}

.stat-card.white .stat-icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.stat-card.green .stat-icon {
  background: var(--color-success-bg);
  color: #81c784;
}

.stat-card.blue .stat-icon {
  background: rgba(33, 150, 243, 0.15);
  color: #64b5f6;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

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

.card-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================================
   TABELAS
   ============================================================ */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  background: #111114;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tr:hover td {
  background: var(--bg-card-hover);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: var(--color-success-bg);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge-warning {
  background: rgba(245, 127, 23, 0.15);
  color: #ffb74d;
  border: 1px solid rgba(245, 127, 23, 0.3);
}

.badge-danger {
  background: var(--color-danger-bg);
  color: #e57373;
  border: 1px solid rgba(229, 57, 53, 0.3);
}

.badge-orange {
  background: var(--orange-badge);
  color: var(--orange-light);
  border: 1px solid rgba(217, 83, 30, 0.4);
}

/* ============================================================
   ESTILOS ESPECÍFICOS DO FORMULÁRIO DE AVALIAÇÃO DO GRUPO
   ============================================================ */
.eval-group-banner {
  background: linear-gradient(135deg, #1c1815 0%, #16161a 100%);
  border: 1px solid var(--orange-primary);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px var(--orange-glow);
}

.eval-group-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.eval-group-theme {
  font-size: 15px;
  color: var(--orange-light);
  margin-bottom: 18px;
}

.eval-students-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.eval-students-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.student-chip {
  background: #25252d;
  border: 1px solid #363642;
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.student-chip i {
  color: var(--orange-primary);
}

.student-chip .student-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-white);
}

.student-chip .student-turma {
  font-size: 11px;
  background: #16161a;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--orange-light);
}

/* Cards de Parâmetros */
.param-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 18px;
  transition: var(--transition);
}

.param-card:focus-within,
.param-card:hover {
  border-color: var(--orange-primary);
}

.param-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.param-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
}

.param-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.param-max-badge {
  font-size: 12px;
  padding: 3px 10px;
  background: #222228;
  border: 1px solid #33333d;
  border-radius: 12px;
  color: #bbb;
  white-space: nowrap;
}

.param-input-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.param-slider {
  flex: 1;
  accent-color: var(--orange-primary);
  height: 6px;
  background: #2b2b36;
  border-radius: 3px;
  cursor: pointer;
}

.param-score-input {
  width: 90px !important;
  text-align: center;
  font-size: 18px !important;
  font-weight: 700;
  color: var(--orange-light) !important;
}

/* Barra Flutuante ou Resumo de Nota */
.eval-summary-card {
  background: #1c1815;
  border: 2px solid var(--orange-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
}

.eval-score-preview {
  font-size: 38px;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
}

.eval-score-preview span {
  color: var(--orange-primary);
  font-size: 20px;
}

/* Alertas */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.alert-sucesso {
  background: var(--color-success-bg);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #a5d6a7;
}

.alert-erro {
  background: var(--color-danger-bg);
  border: 1px solid rgba(229, 57, 53, 0.4);
  color: #ef9a9a;
}

/* ============================================================
   OVERLAY & BACKDROP MOBILE
   ============================================================ */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Grids Flexíveis com Fallback Responsivo */
.page-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================================
   RESPONSIVIDADE COMPLETA (TABLETS & SMARTPHONES)
   ============================================================ */

/* --- TABLETS E TELAS MÉDIAS (<= 1024px) --- */
@media (max-width: 1024px) {
  .page-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .sidebar {
    width: 280px;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
    width: 100%;
  }

  .topbar-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
  }

  .topbar {
    padding: 0 20px;
  }

  .content-area {
    padding: 24px 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* --- SMARTPHONES (iPhone 13, 14, 15, 16, Androids <= 768px) --- */
@media (max-width: 768px) {
  /* Tela de Login Responsiva Mobile */
  .login-body {
    padding: 20px 14px;
    align-items: center;
  }

  .login-wrapper {
    flex-direction: column !important;
    max-width: 440px !important;
    width: 100% !important;
    margin: auto !important;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  }

  .login-side {
    display: none !important;
  }

  .login-card {
    padding: 30px 20px !important;
    width: 100% !important;
  }

  .login-logo img {
    max-height: 52px !important;
    max-width: 200px !important;
  }

  .login-heading {
    font-size: 21px !important;
    text-align: center;
  }

  .login-desc {
    text-align: center;
    font-size: 13px !important;
    margin-bottom: 20px !important;
  }

  /* Previne auto-zoom no iOS Safari (iPhone 13, 14, 15, 16) */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
    min-height: 48px !important;
  }

  .btn-login {
    height: 48px !important;
    font-size: 15px !important;
  }

  .sidebar {
    width: 82%;
    max-width: 300px;
  }

  .topbar {
    height: auto;
    min-height: 64px;
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-left {
    gap: 10px;
  }

  .page-title {
    font-size: 17px;
  }

  .page-sub {
    display: none;
  }

  .user-name {
    display: none;
  }

  .badge-perfil {
    font-size: 11px;
    padding: 3px 8px;
  }

  .content-area {
    padding: 16px 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-card {
    padding: 16px;
    gap: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .card {
    padding: 18px 14px;
    margin-bottom: 20px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card-header h3 {
    font-size: 15px;
  }

  /* Tabelas Adaptáveis com Rolagem Suave */
  .table-responsive {
    margin: 0 -14px;
    padding: 0 14px;
    -webkit-overflow-scrolling: touch;
  }

  .table th, .table td {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  /* Formulário de Avaliação (avaliar.php) */
  .eval-group-banner {
    padding: 18px 14px;
    margin-bottom: 20px;
  }

  .eval-group-title {
    font-size: 20px;
  }

  .eval-group-theme {
    font-size: 13.5px;
  }

  .param-card {
    padding: 16px 14px;
  }

  .param-header {
    flex-direction: column;
    gap: 6px;
  }

  .param-input-box {
    flex-wrap: wrap;
    gap: 12px;
  }

  .param-slider {
    width: 100%;
    order: 2;
  }

  .param-score-input {
    order: 1;
    width: 100% !important;
    height: 44px;
    font-size: 20px !important;
  }

  .eval-summary-card {
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    text-align: center;
  }

  .eval-score-preview {
    font-size: 32px;
  }

  /* Botões e Ações Touch-Friendly */
  .btn, button, input[type="submit"] {
    min-height: 44px; /* Touch target Apple / Google */
  }

  /* Linhas dinâmicas de adição de alunos (grupos.php) */
  .linha-novo-aluno {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* --- TELAS COMPACTAS (iPhone SE, Androids <= 375px) --- */
@media (max-width: 375px) {
  .topbar {
    padding: 10px;
  }

  .page-title {
    font-size: 15px;
  }

  .content-area {
    padding: 12px 8px;
  }

  .card {
    padding: 14px 10px;
  }

  .btn {
    font-size: 13px;
    padding: 10px 14px;
  }
}
