/* Sistema de Navegação do Aluno — Design System */
:root {
  --bg: #1D1805;
  --card-bg: #15120A;
  --card-bg-light: #251F0A;
  --border: #3D3520;
  --yellow: #F2C419;
  --yellow-light: #FCD753;
  --gold: #D4A843;
  --white: #FFFFFF;
  --text: #E8E4D8;
  --text-muted: #B0A88C;
  --green: #25D366;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.logo img {
  display: block;
  height: 24px;
  width: auto;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.student-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.btn-sair {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid var(--yellow);
  border-radius: 8px;
  color: var(--yellow);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-sair:hover {
  background: var(--yellow);
  color: var(--bg);
}

/* Main */
.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.page-title {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--white);
  margin: 0 0 1.5rem;
}

.page-title em {
  font-family: "Source Serif 4", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--yellow);
}

/* Progress section */
.progress-section {
  position: sticky;
  top: 57px;
  z-index: 99;
  padding: 1rem 0;
  margin-bottom: 1rem;
  background: var(--bg);
}

.progress-bar-wrap {
  height: 8px;
  background: var(--bg);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--yellow));
  border-radius: 50px;
  transition: width 1.5s ease;
  width: 0;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

/* Guarantee card */
.guarantee-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg-light);
  border: 1px solid var(--gold);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.guarantee-card.activated {
  border-color: var(--green);
}

.guarantee-card.activated .guarantee-title {
  color: var(--green);
}

.guarantee-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: var(--gold);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.guarantee-card.activated .guarantee-icon {
  background: var(--green);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.guarantee-content {
  flex: 1;
  min-width: 0;
}

.guarantee-title {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.guarantee-progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.guarantee-progress {
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 0;
}

.guarantee-card.activated .guarantee-progress {
  background: var(--green);
}

/* Stage */
.stage {
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stage.visible {
  opacity: 1;
  transform: translateY(0);
}

.stage-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stage-title {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.stage-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  background: var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.stage-selectable {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  background: var(--card-bg-light);
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--yellow);
}

.stage-divider {
  height: 1px;
  background: var(--border);
  margin: 0 0 1rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
}

/* Task card */
.task {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-left: 3px solid transparent;
  transition: background 0.2s;
}

.task::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 1.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.task.completed {
  border-left-color: var(--green);
}

.task.completed::before {
  background: var(--green);
}

.task.current {
  background: var(--card-bg-light);
  border-left-color: var(--yellow);
  box-shadow: 0 0 0 1px rgba(242, 196, 25, 0.3);
}

.task.current::before {
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(242, 196, 25, 0.2);
}

.task.locked {
  opacity: 0.4;
  pointer-events: none;
}

.task.locked .task-title,
.task.locked .task-desc,
.task.locked .task-meta {
  filter: blur(3px);
  user-select: none;
}

.task.locked .task-title {
  color: var(--text-muted);
}

.task.locked::before {
  background: var(--text-muted);
}

.task.selectable {
  border-style: dashed;
}

.task-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.task-icon svg {
  width: 16px;
  height: 16px;
}

.task-icon.check {
  color: var(--green);
}

.task-icon.dot {
  color: var(--yellow);
}

.task-icon.lock {
  color: var(--text-muted);
}

.task-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.task-current-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.25rem;
}

.task-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin: 0;
}

.task.current .task-title {
  color: var(--white);
}

.task-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0.5rem;
  line-height: 1.4;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.task-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.task-week {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Current task pulse animation */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(242, 196, 25, 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(242, 196, 25, 0);
  }
}

.task.current {
  animation: pulse 2s infinite;
}

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-wrap {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.login-logo {
  display: block;
  margin-bottom: 1.5rem;
}

.login-logo img {
  height: 24px;
  width: auto;
}

.login-title {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--white);
  margin: 0 0 1.5rem;
}

.login-title em {
  font-family: "Source Serif 4", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--yellow);
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"],
.login-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
}

.login-form input:focus,
.login-form textarea:focus {
  outline: none;
  border-color: var(--yellow);
}

.form-error {
  font-size: 0.85rem;
  color: #e74c3c;
  margin-bottom: 0.5rem;
  min-height: 1.2em;
}

.btn-cta {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: 2px solid var(--yellow);
  border-radius: 8px;
  color: var(--yellow);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-cta:hover {
  background: var(--yellow);
  color: var(--bg);
}

.btn-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Completar button */
.btn-completar {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 2px solid var(--yellow);
  border-radius: 8px;
  color: var(--yellow);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin-top: 0.75rem;
}

.btn-completar:hover {
  background: var(--yellow);
  color: var(--bg);
}

/* Ação externa (ex: abrir intake SM Pages) */
.btn-acao-externa {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--yellow), var(--gold));
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 12px;
}

.btn-acao-externa:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(242, 196, 25, 0.3);
}

.btn-acao-externa:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-acao-externa i {
  margin-right: 6px;
}

/* Task files */
.task-files {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.task-files-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.task-files-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-files-list li {
  font-size: 0.8rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.task-file-link {
  color: var(--yellow);
}

.task-download-btn {
  font-size: 0.7rem;
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.task-concluida {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 24, 5, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  flex: 1;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0 0 0.5rem;
}

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

.modal-form .form-group {
  margin-bottom: 1rem;
}

.modal-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.modal-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  resize: vertical;
}

.upload-area {
  margin-bottom: 1rem;
}

.upload-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.upload-drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.upload-drop:hover,
.upload-drop.dragover {
  border-color: var(--yellow);
}

.upload-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.upload-drop input[type="file"] {
  display: none;
}

.upload-file-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--card-bg-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
}

.upload-file-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.upload-file-name {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-size {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 0.7rem;
}

.upload-list {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Admin */
.admin-main {
  max-width: 900px;
}

.admin-section {
  margin-bottom: 2rem;
}

.admin-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 1rem;
}

.admin-actions {
  margin-bottom: 1rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  margin-right: 0.25rem;
}

.btn-outline:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn-impersonate {
  padding: 4px 10px;
  background: rgba(242, 196, 25, 0.1);
  border: 1px solid rgba(242, 196, 25, 0.3);
  border-radius: 4px;
  color: var(--yellow);
  font-size: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  margin-right: 0.25rem;
}

.btn-impersonate:hover {
  background: rgba(242, 196, 25, 0.2);
}

.task-instrucoes {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.btn-toggle-instrucoes {
  width: 100%;
  padding: 10px 16px;
  background: var(--card-bg-light);
  border: none;
  color: var(--yellow);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-toggle-instrucoes:hover {
  background: rgba(242, 196, 25, 0.08);
}

.instrucoes-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 16px;
}

.task-instrucoes.open .instrucoes-content {
  max-height: 2000px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.instrucoes-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--yellow);
  margin: 16px 0 8px 0;
}

.instrucoes-heading:first-child {
  margin-top: 0;
}

.instrucoes-item {
  font-size: 0.8rem;
  color: var(--text);
  margin: 8px 0 2px 0;
}

.instrucoes-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 2px 0 2px 12px;
}

.instrucoes-content p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0;
}

.instrucoes-content br {
  display: block;
  content: "";
  margin: 4px 0;
}

/* ═══ TAREFAS CONCLUÍDAS EXPANSÍVEIS ═══ */
.task-header-clickable {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.task-expand-icon {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.task.expanded .task-expand-icon {
  transform: rotate(180deg);
}

.task-details-collapsible {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.task.expanded .task-details-collapsible {
  max-height: 2000px;
}

/* Repositório de arquivos */
.task-files-repo { margin-top: 12px; }

.task-files-repo-title {
  font-size: 0.75rem;
  color: var(--yellow);
  font-weight: 600;
  margin-bottom: 8px;
}
.task-files-repo-title i { margin-right: 6px; }

.file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 4px;
  text-decoration: none;
  transition: border-color 0.2s;
}
.file-card:hover { border-color: var(--yellow); }

.file-card-icon { font-size: 1.2rem; color: var(--yellow); width: 24px; text-align: center; }
.file-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-card-name { font-size: 0.8rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card-meta { font-size: 0.65rem; color: var(--text-muted); }
.file-card-dl { font-size: 0.75rem; color: var(--text-muted); opacity: 0; transition: opacity 0.2s; }
.file-card:hover .file-card-dl { opacity: 1; color: var(--yellow); }

/* Notas */
.task-notas { margin-top: 10px; padding: 10px; background: var(--card-bg-light); border-radius: 6px; }
.task-notas-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.task-notas-text { font-size: 0.8rem; color: var(--text); line-height: 1.5; }

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  font-size: 0.9rem;
  color: var(--text);
}

.stage-admin {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.stage-admin h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--white);
}

.stage-admin ul {
  margin: 0;
  padding-left: 1.25rem;
}

.stage-admin li {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--text);
}

.etapa-admin {
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.etapa-admin h3 {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
  color: var(--white);
}

.text-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Admin forms — estilos genéricos para inputs dentro de modais e admin */
.modal-form .form-group,
.admin-form .form-group {
  margin-bottom: 1rem;
}

.modal-form label,
.admin-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.modal-form input[type="text"],
.modal-form input[type="email"],
.modal-form input[type="password"],
.modal-form input[type="number"],
.modal-form input[type="url"],
.modal-form select,
.modal-form textarea,
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  outline: none;
  border-color: var(--yellow);
}

.modal-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B0A88C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.modal-form input[type="checkbox"] {
  width: auto;
  accent-color: var(--yellow);
}

.form-group-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group-row .label-inline {
  margin: 0;
  display: inline;
}

/* Etapa card no editor — versão expandida */
.etapa-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.etapa-admin-info {
  flex: 1;
  min-width: 0;
}

.etapa-admin-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Tarefas dentro de etapa expandida */
.tarefa-admin-list {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.tarefa-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
  background: var(--card-bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
}

.tarefa-admin-item .tarefa-title {
  flex: 1;
  color: var(--text);
}

.tarefa-admin-item .tarefa-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.tarefa-admin-item .tarefa-actions {
  display: flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

/* Botão ghost para ações inline */
.btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.85rem;
  border-radius: 4px;
}

.btn-ghost:hover {
  color: var(--yellow);
  background: var(--card-bg-light);
}

/* Lead context no admin */
.lead-context {
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.lead-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.lead-field {
  font-size: 0.8rem;
  color: var(--text);
}

.lead-field strong {
  color: var(--text-muted);
}

.lead-ig, .lead-diag {
  font-size: 0.8rem;
  color: var(--text);
  margin: 4px 0;
}

.lead-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.tag-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border: 1px solid;
  border-radius: 50px;
  font-weight: 600;
}

/* Botão matricular no painel diagnóstico */
.btn-matricular {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: transparent;
  border: 2px solid #25D366;
  border-radius: 8px;
  color: #25D366;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-matricular:hover {
  background: #25D366;
  color: #1D1805;
}

/* Agendamento Cal.com */
.btn-agendar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  margin-top: 0.75rem;
  background: transparent;
  border: 2px solid #4A90D9;
  border-radius: 8px;
  color: #4A90D9;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-agendar:hover {
  background: #4A90D9;
  color: #FFFFFF;
}

.agendamento-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.agendamento-badge.agendado {
  background: rgba(74, 144, 217, 0.1);
  border: 1px solid #4A90D9;
  color: #4A90D9;
}

.agendamento-badge.realizado {
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid #25D366;
  color: #25D366;
}

.task-agendamento-info {
  margin-top: 0.5rem;
}

/* Responsive */
@media (min-width: 480px) {
  .main {
    padding: 2rem 1.5rem 4rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .navbar {
    padding: 1rem 2rem;
  }

  .main {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ═══ ADMIN: Gestão do aluno ═══ */
.admin-stage { margin-bottom: 20px; }
.admin-stage-title { font-size: 0.9rem; color: var(--yellow); margin-bottom: 8px; }

.admin-task {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 6px;
}
.admin-task-done { border-left: 3px solid #25D366; }
.admin-task-pending { border-left: 3px solid var(--yellow); opacity: 0.7; }

.admin-task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.admin-task-date { font-size: 0.7rem; color: var(--text-muted); }

.admin-task-files { margin: 8px 0; }
.admin-file-row {
  display: flex;
  align-items: center;
  padding: 4px 0;
  gap: 4px;
}

.admin-task-notas {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0;
  padding: 6px 10px;
  background: var(--card-bg-light);
  border-radius: 4px;
}

.admin-task-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-warning { border-color: #FF6B35 !important; color: #FF6B35 !important; }
.btn-warning:hover { background: rgba(255, 107, 53, 0.1) !important; }
.btn-danger { background: none; border: none; color: #ff4444; cursor: pointer; padding: 2px 6px; }
.btn-danger:hover { color: #ff6666; }

/* ═══ APP LAYOUT COM SIDEBAR ═══ */
.app-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-group { margin-bottom: 24px; }

.sidebar-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 2px;
}
.sidebar-item:hover { background: rgba(242, 196, 25, 0.06); }

.sidebar-item-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg-light);
  border-radius: 6px;
  color: var(--yellow);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sidebar-item-title {
  font-size: 0.82rem;
  color: var(--white);
  font-weight: 500;
  display: block;
}

.sidebar-item-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Mobile tabs */
.mobile-tabs {
  display: none;
  flex-direction: row;
  padding: 8px 16px;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.mobile-tab {
  flex: 1;
  padding: 10px 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-tab.active {
  background: rgba(242, 196, 25, 0.1);
  border-color: var(--yellow);
  color: var(--yellow);
}

@media (max-width: 900px) {
  .app-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    border-right: none;
    position: static;
    height: auto;
    display: none;
    padding: 16px;
  }
  .mobile-tabs { display: flex; }
}
