﻿/* ================================================================
   PEDAGOGIA TEC — SISTEMA DE DESIGN
   Base de TODAS as páginas (home, ferramentas, perfil, admin, suporte).
   home.css adiciona apenas o layout exclusivo da página inicial.

   Sumário
    1. Tokens (cores, raios, sombras)
    2. Base e reset
    3. Layout das ferramentas
    4. Cabeçalho das ferramentas
    5. Título da ferramenta (hero)
    6. Formulários
    7. Botões e chips
    8. Pré-visualização e modal ampliado
    9. Áreas de upload
   10. Agrupador de atividades (pdf-imagem-comp)
   11. Carregamento e avisos (toast)
   12. Barra fixa do celular
   13. Conteúdo educativo e FAQ
   14. Rodapé
   15. Login, menu do usuário e modal
   16. Utilitários e animações
   17. Responsivo
   ================================================================ */

/* ================================================================
   1. TOKENS
   ================================================================ */
:root, body.dark-theme {
  --bg: #131418;
  --bg-dark: #131418;
  --surface: #1b1c21;
  --surface-2: #212228;
  --surface-hover: #25272d;
  --field-bg: #16171b;
  --glass-bg: rgba(27, 28, 33, 0.92);
  --border: #2c2e35;
  --border-hover: #41444c;
  --glass-border: #2c2e35;
  --glass-border-hover: #41444c;

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-contrast: #ffffff;
  --primary-light: rgba(59, 130, 246, 0.12);
  --primary-border: rgba(59, 130, 246, 0.35);

  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: rgba(59, 130, 246, 0.1);

  --secondary: #25272d;
  --secondary-hover: #2f3138;

  --text: #ededed;
  --text-main: #ededed;
  --text-body: #d4d4d4;
  --text-secondary: #b3b3b3;
  --text-muted: #8f8f8f;
  --text-subtle: #6b6b6b;

  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --accent-gold: #f59e0b;
  --accent-gold-soft: rgba(245, 158, 11, 0.15);

  --tag-new: #fbbf24;
  --tag-new-bg: rgba(245, 158, 11, 0.12);
  --tag-essential: #60a5fa;
  --tag-essential-bg: rgba(59, 130, 246, 0.12);

  --gradient-accent: linear-gradient(135deg, #ededed, #b3b3b3);

  --radius: 6px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-full: 9999px;

  --transition: all 0.15s ease;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --card-shadow: none;
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.35);

  --header-height: 56px;
  color-scheme: dark;
}

/* ================================================================
   2. BASE E RESET
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* "hidden" em html e body transforma o body em área de rolagem e desliga
   o position: sticky (cabeçalho e filtros). "clip" corta sem esse efeito. */
@supports (overflow-x: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-body);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

a {
  color: var(--accent);
}

img,
canvas,
svg,
video {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }

/* Fundos decorativos antigos: desativados no design atual */
.bg-blobs,
.blob {
  display: none !important;
}

/* ================================================================
   3. LAYOUT DAS FERRAMENTAS
   ================================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.tool-page {
  min-height: 100vh;
  background-color: var(--bg);
}

.tool-main {
  padding: 2rem 0 3rem;
}

.main-content {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.left-panel,
.right-panel,
.glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  min-width: 0;
}

.left-panel,
.right-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Painel de configurações acompanha a rolagem no desktop */
@media (min-width: 1025px) {
  .main-content > .right-panel {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
  }
}

.left-panel h3,
.right-panel h3,
.left-panel h4,
.right-panel h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.panel-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.subtitle {
  color: var(--text-muted);
  font-weight: 500;
}

.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ================================================================
   4. CABEÇALHO DAS FERRAMENTAS
   ================================================================ */
.slim-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(19, 20, 24, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.slim-header-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.header-logo:hover {
  color: #fff;
}

.tool-title {
  flex: 1;
  min-width: 0;
  padding-left: 0.75rem;
  margin-left: 0.25rem;
  border-left: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#themeToggleSlot:empty {
  display: none;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.tool-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 32px;
  padding: 0 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tool-action-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.tool-action-btn.is-active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ================================================================
   5. TÍTULO DA FERRAMENTA (HERO)
   ================================================================ */
.tool-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 1.75rem;
}

.tool-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.tool-hero p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 660px;
  margin: 0 auto;
}

.tool-hero strong {
  color: var(--text-secondary);
}

.bncc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--success-soft);
  color: #86efac;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ================================================================
   6. FORMULÁRIOS
   ================================================================ */
.left-panel label,
.right-panel label,
.form-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
}

.input-dark,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="password"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  background: var(--field-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  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='%23a3a3a3' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

select option {
  background: var(--surface);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.input-dark::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-subtle);
}

.input-dark:hover,
select:hover,
textarea:hover,
input[type="text"]:hover,
input[type="number"]:hover {
  border-color: var(--border-hover);
}

.input-dark:focus,
select:focus,
textarea:focus,
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input[type="color"] {
  width: 44px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--field-bg);
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

input[type="file"] {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.input-large {
  font-size: 0.95rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.form-row > div,
.control-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Blocos recolhíveis (ex.: "Cabeçalho da Folha") */
.left-panel details,
.right-panel details {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.75rem 0.9rem !important;
}

.left-panel details > summary,
.right-panel details > summary {
  cursor: pointer;
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.85rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.left-panel details > summary::-webkit-details-marker,
.right-panel details > summary::-webkit-details-marker {
  display: none;
}

.left-panel details > summary::after,
.right-panel details > summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.left-panel details:not([open]) > summary::after,
.right-panel details:not([open]) > summary::after {
  transform: rotate(-90deg);
}

/* ================================================================
   7. BOTÕES E CHIPS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--secondary-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.w-full {
  width: 100%;
}

.btn-primary,
.btn-download-pulse,
.btn-accent,
.btn-export-all {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast) !important;
  box-shadow: none;
}

.btn-primary:hover,
.btn-download-pulse:hover,
.btn-accent:hover,
.btn-export-all:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: none;
}

.btn-download-pulse {
  animation: none;
  font-weight: 700;
}

.btn-secondary {
  background: var(--secondary);
  border-color: var(--border);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-outline.active,
.btn-outline[aria-pressed="true"] {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--accent-hover);
}

.btn-danger-icon {
  background: transparent;
  color: var(--text-muted);
  padding: 0.25rem;
  font-size: 1.1rem;
}

.btn-danger-icon:hover {
  color: var(--danger);
  background: transparent;
}

/* Chips de modelos prontos */
.btn-preset,
.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border) !important;
  background: var(--surface-2) !important;
  color: var(--text-secondary) !important;
  font-family: inherit;
  font-size: 0.78rem !important;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-preset:hover,
.preset-chip:hover {
  color: var(--text) !important;
  border-color: var(--border-hover) !important;
}

.btn-preset.active,
.preset-chip.active {
  background: var(--primary-light) !important;
  border-color: var(--primary-border) !important;
  color: var(--accent-hover) !important;
}

/* Linha de ações principais do painel (baixar, gabarito...) */
.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.panel-actions .btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

/* ================================================================
   8. PRÉ-VISUALIZAÇÃO E MODAL AMPLIADO
   ================================================================ */
.preview-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.preview-box > div:first-child h4,
#previewTitle {
  color: var(--text) !important;
  font-size: 0.95rem;
  font-weight: 700;
}

.preview-box canvas,
.preview-box img.preview-page {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Barra de ações do preview: quebra linha no celular */
.preview-toolbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.preview-toolbar > div {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tutorial-overlay,
#previewModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: ptecFade 0.2s ease;
}

.tutorial-overlay.hidden,
#previewModal.hidden {
  display: none !important;
}

.tutorial-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}

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

.tutorial-header h2 {
  font-size: 1.25rem;
}

.tutorial-steps {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.tutorial-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.step-number {
  min-width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.tutorial-tips {
  background: var(--success-soft);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

.tutorial-tips h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #86efac;
}

.tutorial-tips ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tutorial-tips li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
}

.tutorial-tips li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--success);
}

.tutorial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.disclaimer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.disclaimer-section h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.disclaimer-section p,
.disclaimer-section li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.disclaimer-section ul {
  padding-left: 1.2rem;
}

.disclaimer-date {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* ================================================================
   9. ÁREAS DE UPLOAD
   ================================================================ */
.upload-container,
.upload-area {
  position: relative;
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: var(--transition);
}

.upload-area {
  padding: 1.75rem 1rem;
}

.upload-container:hover,
.upload-container.drag-active,
.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-container .upload-content,
.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-area .upload-content {
  pointer-events: none;
}

.upload-icon {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--text-muted);
}

.upload-container h3 {
  font-size: 1.15rem;
}

.upload-container p,
.upload-hint {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.hidden-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ================================================================
   10. AGRUPADOR DE ATIVIDADES (pdf-imagem-comp)
   ================================================================ */
.pool-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.6rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.thumbnail-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #fff;
  transition: var(--transition);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-item .filename {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.62rem;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumbnail-item.selected {
  border-color: var(--primary);
}

.thumbnail-item.in-group {
  border-color: var(--success);
  opacity: 0.55;
  pointer-events: none;
}

.thumbnail-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

.thumbnail-item:hover .thumbnail-remove,
.thumbnail-item:focus-within .thumbnail-remove {
  opacity: 1;
}

@media (hover: none) {
  .thumbnail-remove { opacity: 1; }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-md);
}

.grouping-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.groups-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.group-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.group-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.group-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
}

.group-images {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.group-thumb-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  cursor: grab;
}

.group-thumb-wrapper.drag-over {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.group-thumb-wrapper img.group-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-thumb-rotate,
.group-thumb-del {
  position: absolute;
  top: 3px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-thumb-rotate { left: 3px; background: rgba(0, 0, 0, 0.7); }
.group-thumb-del { right: 3px; background: var(--danger); }

.group-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.group-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ================================================================
   11. CARREGAMENTO E AVISOS
   ================================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.loading-overlay.active,
.loading-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.loading-overlay.hidden:not(.active) {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ptecSpin 0.9s linear infinite;
}

.loading-text {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  max-width: 320px;
  padding: 0 1rem;
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10000;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 2rem);
}

.toast {
  pointer-events: auto;
  background: #1c1c1c;
  color: var(--text);
  border: 1px solid var(--border-hover);
  border-left: 3px solid var(--accent);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  animation: ptecToastIn 0.25s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--accent); }

.toast-out {
  opacity: 0;
  transform: translateY(8px);
}

.text-danger {
  color: var(--danger);
  font-weight: 700;
}

/* ================================================================
   12. BARRA FIXA DO CELULAR
   ================================================================ */
.mobile-sticky-bar {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-sticky-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    gap: 0.6rem;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
    background: rgba(19, 20, 24, 0.96);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .mobile-sticky-bar .btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.92rem;
  }

  /* body.tem-barra-fixa (posta pelo ptec-core.js) cobre iOS < 15.4, sem :has().
     Regras separadas: uma lista com :has() é descartada inteira nesses navegadores. */
  body.tem-barra-fixa {
    padding-bottom: 4.5rem;
  }

  body:has(.mobile-sticky-bar) {
    padding-bottom: 4.5rem;
  }

  body.tem-barra-fixa .toast-container {
    bottom: 5.5rem;
  }

  body:has(.mobile-sticky-bar) .toast-container {
    bottom: 5.5rem;
  }
}

/* ================================================================
   13. CONTEÚDO EDUCATIVO (SEO) E FAQ
   ================================================================ */
.seo-content-section {
  max-width: 900px;
  margin: 3rem auto 0;
}

.seo-content-section > .glass-panel,
.seo-content-section.glass-panel {
  padding: 2rem !important;
}

.seo-content-section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.seo-content-section h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

.seo-content-section p,
.seo-content-section li {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.75;
}

.seo-content-section p + p {
  margin-top: 0.75rem;
}

.seo-content-section ul,
.seo-content-section ol {
  padding-left: 1.3rem;
  margin: 0.5rem 0;
}

.seo-content-section strong {
  color: var(--text-secondary);
}

/* Exemplos prontos (links que abrem a ferramenta com um modelo) e "Veja também" */
.seo-content-section .seo-exemplos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.seo-content-section .seo-exemplos a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.seo-content-section .seo-exemplos a:hover { border-color: var(--primary); color: var(--primary); }
.seo-content-section .seo-exemplo {
  border-left: 3px solid var(--primary);
  background: var(--surface-2);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.seo-content-section .seo-veja {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}
.seo-content-section .seo-veja a { font-weight: 600; }

.faq-accordion,
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.faq-accordion details,
.faq-container details,
.faq-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-accordion summary,
.faq-container summary,
.faq-question {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-accordion summary::-webkit-details-marker,
.faq-container summary::-webkit-details-marker {
  display: none;
}

.faq-accordion summary::after,
.faq-container summary::after {
  content: '+';
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.faq-accordion details[open] summary::after,
.faq-container details[open] summary::after {
  content: '−';
}

.faq-accordion details > p,
.faq-accordion details > div,
.faq-container details > p,
.faq-container details > div,
.faq-answer,
.faq-content {
  padding: 0 1rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ================================================================
   14. RODAPÉ
   ================================================================ */
.app-footer,
.footer-rich {
  margin-top: 4rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.footer-rich-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 0 2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col p {
  font-size: 0.86rem;
  line-height: 1.6;
}

.footer-col a {
  display: block;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom-line {
  text-align: center;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* ================================================================
   15. LOGIN, MENU DO USUÁRIO E MODAL
   ================================================================ */
.auth-btn-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-google-skin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 34px;
  padding: 0 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-hover);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-google-skin:hover {
  background: var(--surface-hover);
  border-color: #4a4a4a;
}

.btn-google-skin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-google-skin .google-icon {
  flex-shrink: 0;
}

/* Botão oficial do Google invisível por cima do botão estilizado */
.google-hidden-anchor {
  position: absolute;
  inset: 0;
  opacity: 0.001;
  overflow: hidden;
  z-index: 2;
  cursor: pointer;
}

.google-hidden-anchor > div,
.google-hidden-anchor iframe {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  transform: scale(1.4);
  transform-origin: left center;
}

.user-menu-wrapper {
  position: relative;
}

/* Sininho de notificações (ao lado da foto, só com conta) — js/auth.js */
.user-area {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ptec-sino {
  position: relative;
}

.ptec-sino-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.ptec-sino-btn:hover,
.ptec-sino-btn[aria-expanded="true"] {
  background: var(--surface-2);
  color: var(--text);
}

.ptec-sino-bolinha {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface, #fff);
}

.ptec-sino-bolinha[hidden] {
  display: none;
}

.ptec-sino-painel {
  position: absolute;
  top: calc(100% + 8px);
  right: -44px;
  width: 340px;
  max-height: min(480px, 75vh);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
  animation: ptecFade 0.15s ease;
}

.ptec-sino-painel[hidden] {
  display: none;
}

.ptec-sino-topo {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.92rem;
}

.ptec-sino-lista {
  overflow-y: auto;
  padding: 0.3rem;
}

.ptec-sino-item {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem;
  border: none;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.ptec-sino-item:hover {
  background: var(--surface-2);
}

.ptec-sino-item.nova {
  background: rgba(59, 130, 246, 0.12);
}

.ptec-sino-item.nova:hover {
  background: rgba(59, 130, 246, 0.2);
}

.ptec-sino-icone {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 0.95rem;
}

.ptec-sino-corpo {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.ptec-sino-titulo {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.ptec-sino-item.nova .ptec-sino-titulo::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: #2563eb;
  vertical-align: middle;
}

.ptec-sino-texto {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.ptec-sino-item.aberta .ptec-sino-texto {
  -webkit-line-clamp: unset;
  display: block;
}

.ptec-sino-quando {
  color: var(--text-subtle, var(--text-muted));
  font-size: 0.72rem;
}

.ptec-sino-vazio {
  padding: 1.6rem 1rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 520px) {
  .ptec-sino-painel {
    position: fixed;
    top: 60px;
    left: 10px;
    right: 10px;
    width: auto;
  }
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.user-avatar-btn:hover {
  border-color: var(--border-hover);
}

.user-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
}

.user-dropdown.open {
  display: block;
  animation: ptecFade 0.15s ease;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem;
}

.user-dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
}

.user-dropdown-email {
  color: var(--text-muted);
  font-size: 0.75rem;
  word-break: break-all;
}

.user-dropdown-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.3rem 0;
}

.user-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user-dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.user-dropdown-admin {
  color: var(--accent);
  font-weight: 600;
}

.user-dropdown-logout:hover {
  color: #fca5a5;
  background: var(--danger-soft);
}

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.auth-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transform: translateY(8px);
  transition: transform 0.2s ease;
}

.auth-modal-overlay.open .auth-modal-card {
  transform: translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.auth-modal-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.auth-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 1.4rem;
}

.auth-modal-actions {
  display: flex;
  justify-content: center;
}

.auth-modal-actions .btn-google-skin {
  height: 42px;
  padding: 0 1.3rem;
  font-size: 0.92rem;
}

.auth-modal-actions[hidden],
.auth-modal-app[hidden] {
  display: none !important;
}

/* Instagram/Facebook: como abrir o site no navegador do celular */
.auth-modal-app {
  text-align: left;
}

.auth-app-alerta {
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.auth-app-passo {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.auth-app-botoes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-app-botoes .btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

.auth-app-tentar {
  display: block;
  margin: 0.8rem auto 0;
  padding: 0.3rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  color: var(--text-subtle);
  text-decoration: underline;
  cursor: pointer;
}

/* "Continuar sem conta" no modal de navegador interno */
.auth-app-separador {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.9rem 0 0.5rem;
  color: var(--text-subtle);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-app-separador::before,
.auth-app-separador::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-app-sem-conta {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

/* Feedback visual ao copiar o link */
.auth-app-botoes .btn.copiado {
  border-color: var(--success);
  color: var(--success);
  pointer-events: none;
}

.auth-modal-note {
  margin-top: 1.1rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.auth-modal-note a {
  color: var(--text-muted);
}

/* ================================================================
   16. UTILITÁRIOS E ANIMAÇÕES
   ================================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.animate-in {
  animation: ptecRise 0.35s ease both;
}

@keyframes ptecSpin { to { transform: rotate(360deg); } }
@keyframes ptecFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ptecRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ptecToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================================
   17. RESPONSIVO
   ================================================================ */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-action-label {
    display: none;
  }

  .tool-action-btn {
    width: 34px;
    padding: 0;
    justify-content: center;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 52px;
  }

  .container,
  .slim-header-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tool-main {
    padding-top: 1.25rem;
  }

  .header-logo span,
  .tool-title {
    display: none;
  }

  /* No celular o nome da ferramenta aparece no lugar do logo */
  .slim-header-content {
    gap: 0.5rem;
  }

  .slim-header-content::after {
    content: none;
  }

  .left-panel,
  .right-panel {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .seo-content-section > .glass-panel,
  .seo-content-section.glass-panel {
    padding: 1.25rem !important;
  }

  .footer-rich-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 2.25rem 0 1.5rem;
  }

  .btn-google-skin .google-btn-text {
    font-size: 0.78rem;
  }
}

@media (max-width: 420px) {
  .btn-google-skin {
    padding: 0 0.6rem;
  }

  .btn-google-skin .google-btn-text {
    display: none;
  }

  .tool-hero h1 {
    font-size: 1.45rem;
  }
}

/* ================================================================
   18. CHAT DE SUPORTE (js/chat-widget.js)
   ================================================================ */
.chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9990;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background 0.15s ease;
}

.chat-fab:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.chat-fab-close {
  display: none;
  font-size: 1.1rem;
}

.chat-fab.is-open .chat-fab-icon { display: none; }
.chat-fab.is-open .chat-fab-close { display: block; }

.chat-fab-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg);
}

.chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.25rem;
  z-index: 9991;
  width: 370px;
  max-width: calc(100vw - 2rem);
  max-height: min(600px, calc(100vh - 7rem));
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.chat-panel.open {
  display: flex;
  animation: ptecRise 0.2s ease;
}

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

.chat-panel-header h3 {
  font-size: 0.98rem;
}

.chat-panel-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.chat-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
  border-radius: var(--radius);
}

.chat-panel-close:hover {
  color: var(--text);
}

.chat-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.chat-tab {
  flex: 1;
  position: relative;
  padding: 0.65rem 0.5rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-tab.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.chat-tab-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 0.3rem;
  border-radius: 50%;
  background: var(--danger);
  vertical-align: middle;
}

.chat-panel-body {
  padding: 1rem 1.1rem 1.1rem;
  overflow-y: auto;
  flex: 1;
}

.chat-view {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.chat-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}

.chat-pill {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.chat-pill:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.chat-pill.active {
  border-color: var(--primary-border);
  background: var(--primary-light);
  color: var(--accent-hover);
}

.chat-guest-fields {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.chat-label span {
  font-weight: 400;
  color: var(--text-subtle);
}

.chat-input {
  font-size: 0.86rem !important;
}

.chat-logged-as {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
}

.chat-logged-as strong {
  color: var(--text);
}

.chat-context {
  font-size: 0.74rem;
  color: var(--text-subtle);
}

.chat-context strong {
  color: var(--text-muted);
  font-weight: 600;
}

.chat-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.chat-error {
  font-size: 0.8rem;
  color: #fca5a5;
}

.chat-send-btn {
  width: 100%;
  margin-top: 0.25rem;
}

.chat-success {
  align-items: center;
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.chat-success-icon {
  font-size: 2.2rem;
}

.chat-success h4 {
  font-size: 1rem;
}

.chat-success p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.chat-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.chat-thread-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Conversa em formato de chat */
.chat-linha {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
}

.chat-linha-eu { justify-content: flex-end; }

.chat-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b1220;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.chat-status {
  font-weight: 700;
  color: var(--text-muted);
}

.chat-status-respondido { color: #86efac; }
.chat-status-novo { color: inherit; }

.chat-bubble {
  max-width: 82%;
  padding: 0.55rem 0.75rem;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble-me {
  background: var(--accent);
  color: #0b1220;
  border-bottom-right-radius: 5px;
}

.chat-bubble-team {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 5px;
}

.chat-bubble-date {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  opacity: 0.7;
  text-align: right;
}

.chat-bubble-team .chat-bubble-date { text-align: left; }

/* Campo de responder, preso no pé da conversa */
.chat-responder {
  position: sticky;
  bottom: -1.1rem;
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  margin: 0.4rem -1.1rem -1.1rem;
  padding: 0.65rem 1.1rem 0.85rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.chat-responder .chat-input {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border-radius: 20px;
  padding: 0.55rem 0.9rem;
  line-height: 1.4;
}

.chat-responder-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #0b1220;
  cursor: pointer;
}

.chat-responder-btn:hover { filter: brightness(1.08); }
.chat-responder-btn:disabled { opacity: 0.6; cursor: wait; }

body.tem-barra-fixa .chat-fab {
  bottom: 1.25rem;
}

body:has(.mobile-sticky-bar) .chat-fab {
  bottom: 1.25rem;
}

@media (max-width: 1024px) {
  body.tem-barra-fixa .chat-fab {
    bottom: 5rem;
  }

  body:has(.mobile-sticky-bar) .chat-fab {
    bottom: 5rem;
  }

  body.tem-barra-fixa .chat-panel {
    bottom: 9rem;
  }

  body:has(.mobile-sticky-bar) .chat-panel {
    bottom: 9rem;
  }
}

@media (max-width: 480px) {
  /* Regras separadas: em iOS < 15.4 uma lista com :has() seria descartada inteira */
  .chat-panel,
  body.tem-barra-fixa .chat-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 9995;
  }

  body:has(.mobile-sticky-bar) .chat-panel {
    bottom: 0;
  }

  .chat-fab {
    right: 1rem;
    bottom: 1rem;
    width: 48px;
    height: 48px;
  }

  .chat-fab.is-open {
    display: none;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Linhas de título dos painéis e botões longos quebram no celular */
.left-panel > div[style*="space-between"],
.right-panel > div[style*="space-between"] {
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 600px) {
  .btn {
    white-space: normal;
    text-align: center;
  }
}

/* Enquanto o login é pedido, avisos das ferramentas ficam ocultos */
body.ptec-login-open .toast-container {
  display: none;
}

/* ================================================================
   19. ÍCONES (assets/icons.svg — Lucide, licença ISC)
   Uso: <svg class="ico"><use href="assets/icons.svg#download"/></svg>
   ================================================================ */
.ico {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.18em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico-lg {
  width: 1.4em;
  height: 1.4em;
}

.tc-fav-btn.favorited .ico,
.tool-action-btn.is-active .ico {
  fill: currentColor;
}

.auth-modal-icon {
  color: var(--accent);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.user-dropdown-item .ico {
  color: var(--text-muted);
}

.chat-pill .ico {
  width: 0.95em;
  height: 0.95em;
}

/* Rótulos, títulos e botões com ícone */
.btn .ico,
.btn-google-skin .ico,
.preset-chip .ico,
.btn-preset .ico {
  width: 1em;
  height: 1em;
}

.left-panel h3 .ico,
.right-panel h3 .ico,
.preview-box h4 .ico,
summary .ico,
.hero-badge .ico {
  color: var(--accent);
}

/* ================================================================
   20. CARTÃO "GERAR COM IA" (js/ptec-ia.js)
   ================================================================ */
.left-panel details.ia-card,
.right-panel details.ia-card,
details.ia-card {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02)) !important;
  border: 1px solid var(--primary-border) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.75rem 0.9rem !important;
  margin-bottom: 0.9rem;
  width: 100%;
}

details.ia-card > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text) !important;
  font-weight: 700;
  font-size: 0.88rem;
}

details.ia-card > summary .ico {
  color: var(--accent);
}

.ia-badge {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent-hover);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  padding: 0.08rem 0.45rem;
}

details.ia-card > summary::after {
  display: none !important;
}

.ia-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.ia-desc,
.ia-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ia-note {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.ia-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.ia-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.ia-field-wide {
  grid-column: 1 / -1;
}

.ia-field label {
  font-size: 0.74rem !important;
  font-weight: 600;
  color: var(--text-secondary);
}

.ia-field label small {
  font-weight: 400;
  color: var(--text-subtle);
}

.ia-field input,
.ia-field select {
  padding: 0.45rem 0.6rem;
  font-size: 0.84rem;
}

.ia-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ia-count {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.ia-count.is-sem-credito {
  color: var(--warning);
}

.ia-card.is-loading .ia-btn .ico {
  animation: ptecSpin 1.2s linear infinite;
}

/* Sugestões de tema */
.ia-sugestoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.ia-chip {
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition);
}

.ia-chip:hover {
  border-color: var(--primary-border);
  color: var(--text);
}

/* Mensagem do cartão (pronto, erro, aviso) */
.ia-status {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.ia-status .ico {
  vertical-align: -0.2em;
}

.ia-status a {
  color: var(--accent);
  font-weight: 600;
}

.ia-status.is-ok {
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
}

.ia-status.is-erro {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.ia-status.is-aviso {
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

/* ================================================================
   21. CONTROLE PELO CELULAR (js/ptec-remote.js)
   ================================================================ */
#ptecRemoteBtn.is-active {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--success-soft);
}

.remote-modal {
  position: fixed;
  inset: 0;
  z-index: 9994;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.remote-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 1.75rem 1.5rem 1.4rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.remote-card h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.remote-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.remote-qr {
  display: flex;
  justify-content: center;
  margin: 1.1rem auto 0.9rem;
  padding: 10px;
  width: max-content;
  background: #fff;
  border-radius: var(--radius-md);
}

.remote-code {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--text);
}

.remote-link {
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.remote-status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.remote-status.ok {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
}

.remote-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

/* ================================================================
   22. MINHAS ATIVIDADES (salvar/abrir)
   ================================================================ */
.salvar-card {
  text-align: left;
  max-width: 440px;
}

.salvar-card h3 {
  justify-content: flex-start;
}

.salvar-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.salvar-form input {
  flex: 1;
}

.salvar-sobrescrever {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.salvar-subtitulo {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1rem 0 0.5rem;
}

.salvar-lista {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 260px;
  overflow-y: auto;
}

.salvar-item {
  display: flex;
  gap: 0.35rem;
}

.salvar-abrir {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.salvar-abrir span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.salvar-abrir:hover {
  border-color: var(--border-hover);
}

.salvar-excluir {
  width: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.salvar-excluir:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.salvar-vazio {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Link do Instagram no rodapé (inserido pelo ptec-core.js em todas as páginas) */
a.footer-insta,
.footer-col a.footer-insta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

a.footer-insta svg {
  width: 16px;
  height: 16px;
}

a.footer-insta:hover,
.footer-col a.footer-insta:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888);
}

/* ============================================================
   "VER COMO PROFESSOR" — faixa fixa no topo (aberta pelo painel admin, ver js/auth.js)
   ============================================================ */
.ptec-ver-como {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  padding: 0.55rem 1rem;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #1a1204;
  font-size: 0.88rem;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.ptec-ver-como-olho { font-size: 1.1rem; }
.ptec-ver-como-tempo {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ptec-ver-como-sair {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: #1a1204;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ptec-ver-como-sair:hover { background: #000; }
html.ptec-com-ver-como body { padding-top: var(--vc-h, 44px); }
html.ptec-com-ver-como .home-header,
html.ptec-com-ver-como .slim-header { top: var(--vc-h, 44px); }

/* ============================================================
   RECADO DO ADMIN — cartão que aparece uma vez quando o professor volta (js/auth.js)
   ============================================================ */
.ptec-recado {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 8500;
  width: min(380px, calc(100vw - 2rem));
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ptec-recado.visivel { opacity: 1; transform: none; }
.ptec-recado-card {
  padding: 1.1rem 1.2rem 1rem;
  border-radius: 18px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(236, 72, 153, 0.16), transparent 60%), var(--surface, #1b1c22);
  border: 1px solid rgba(236, 72, 153, 0.35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: var(--text, #f4f4f5);
}
.ptec-recado-topo { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.6rem; }
.ptec-recado-icone {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(236, 72, 153, 0.18); font-size: 1.3rem; line-height: 1; flex-shrink: 0;
}
.ptec-recado-topo div strong { display: block; font-size: 0.98rem; }
.ptec-recado-topo div span { display: block; font-size: 0.76rem; color: var(--text-muted, #a1a1aa); }
.ptec-recado-fechar {
  margin-left: auto; align-self: flex-start;
  border: 0; background: none; color: var(--text-muted, #a1a1aa);
  font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0.1rem 0.3rem;
}
.ptec-recado-fechar:hover { color: var(--text, #fff); }
.ptec-recado-texto { margin: 0 0 0.8rem; font-size: 0.94rem; line-height: 1.55; word-break: break-word; }
.ptec-recado-novas { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.9rem; }
.ptec-recado-novas span { width: 100%; font-size: 0.74rem; font-weight: 700; color: var(--text-muted, #a1a1aa); text-transform: uppercase; letter-spacing: 0.05em; }
.ptec-recado-novas a {
  padding: 0.3rem 0.65rem; border-radius: 99px;
  background: var(--surface-hover, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  color: var(--text, #fff); font-size: 0.8rem; font-weight: 600; text-decoration: none;
}
.ptec-recado-novas a:hover { border-color: rgba(236, 72, 153, 0.5); }
.ptec-recado-acoes { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ptec-recado-card.previa { pointer-events: none; box-shadow: none; }
@media (max-width: 600px) {
  .ptec-recado { left: 0.75rem; right: 0.75rem; bottom: 5.2rem; width: auto; }
}

/* Usuário nº 100, 250...: o cartão colecionável tem estilo próprio, em js/cartao-marco.js */
@media (prefers-reduced-motion: reduce) {
  .ptec-recado { transition: none; }
}

/* Impressão pelo navegador (Ctrl+P) sem conta: só o aviso (ptec-core.js) */
@media print {
  body.ptec-print-bloqueado * { visibility: hidden !important; }
  body.ptec-print-bloqueado::before {
    content: "Para imprimir esta folha, entre com a sua conta Google (grátis) em pedagogiatec.com.br";
    visibility: visible !important; display: block; position: fixed; top: 40mm; left: 20mm; right: 20mm;
    font: 700 18pt/1.4 Arial, sans-serif; color: #111827; text-align: center;
  }
}
