/* Painel — identidade visual editorial. Somente apresentação em tela. */
@media screen {
  :root {
    --bg-primary: #f5f4ef;
    --bg-surface: #ffffff;
    --border-color: #dce2db;
    --text-main: #243b33;
    --text-muted: #617168;
    --primary: #193e32;
    --primary-hover: #245543;
    --accent: #21664f;
    --accent-hover: #184d3c;
    --accent-soft: #e9f2eb;
    --gold-soft: #f5eddf;
    --success: #267047;
    --warning: #8b611f;
    --danger: #a13941;
    --shadow: 0 12px 36px rgba(29, 53, 42, .055);
  }

  body {
    background: radial-gradient(ellipse at 95% 0%, #ede9dd 0, transparent 48%), var(--bg-primary);
    -webkit-font-smoothing: antialiased;
  }
  body > header {
    flex-shrink: 0;
    padding: 16px 24px;
    background: #fcfcf9;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(29,53,42,.025);
  }
  .header-top { gap: 18px; }
  .user-title { min-width: 0; gap: 14px; }
  .user-title h1 { font-size: 1rem; line-height: 1.45; letter-spacing: -.015em; }
  .user-title h1 i { font-weight: 400; color: var(--text-muted); }
  .header-actions { justify-content: flex-end; gap: 8px; }
  .header-actions .btn-sec, .btn-toggle-sidebar { min-height: 38px; padding: 8px 12px; }
  .btn-toggle-sidebar { background: #fff; border-color: var(--border-color); font-weight: 500; }
  .header-actions a { text-decoration: none; }

  #mainSidebar {
    background: #fdfefa;
    border-right: 1px solid var(--border-color);
    padding: 16px 12px 12px;
    backdrop-filter: none;
  }
  .sidebar-menu-scroll { padding-right: 3px; }
  .menu-category { margin-bottom: 5px; }
  .menu-header {
    padding: 12px;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.45;
    transition: background-color .16s ease, color .16s ease;
  }
  .menu-header.active { background: var(--accent-soft); color: var(--primary); }
  .menu-header:hover { background: #f0f4ee; }
  .menu-header .icon { color: var(--text-muted); }
  .submenu-item { line-height: 1.5; font-size: .81rem; border-radius: 8px; }
  .submenu-item.active { box-shadow: inset 3px 0 0 var(--accent); }
  .submenu-list, .sub-submenu-group { background: transparent; }
  main { min-width: 0; padding: 24px; gap: 20px; }
  /* Tela Inicial: o título e o nome da coluna de favoritos na voz editorial (serifa). */
  .inicio-titulo {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -.035em;
  }
  .favoritos-titulo {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.12rem;
    font-weight: 400;
    letter-spacing: -.01em;
  }
  .acesso-rapido { box-shadow: 0 2px 5px rgba(29,53,42,.02); }
  .acesso-rapido-logo { border-color: #e7ebe5; }

  .btn-sec, .btn-clear, .btn-tool {
    background: #fff;
    border-color: var(--border-color);
    border-radius: 9px;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
  }
  .btn-sec:hover { background: var(--accent-soft); color: var(--primary); border-color: #adc3b4; }
  .btn-execute { background: var(--accent); border-radius: 10px; box-shadow: 0 3px 8px rgba(33,102,79,.12); font-weight: 600; }
  .btn-execute:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(33,102,79,.18); }
  button:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
  button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #6b967e; outline-offset: 3px; }
  input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #6b967e; outline-offset: 2px; }
  .search-input, .temp-select, textarea.input-text {
    border-color: #cbd6cc;
    border-radius: 10px;
    background-color: #fff;
    color: var(--text-main);
  }
  textarea.input-text { padding: 14px; line-height: 1.65; }
  textarea.prompt-text-fixed { background: #f5f7f2; }
  .search-input::placeholder, textarea.input-text::placeholder { color: #6c7c71; opacity: 1; }
  .module-header-title { font-family: Georgia, 'Times New Roman', serif; font-size: 1.25rem; font-weight: 500; letter-spacing: -.015em; }
  .source-pdf-box, .editor-container, .panel-card { border-color: var(--border-color); border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(29,53,42,.025); }
  .source-pdf-box { background: #fbfcf8; border-style: dashed; }
  .editor-header label, .panel-card label { color: #546a5d; font-size: .69rem; letter-spacing: .08em; }
  .editor-format-bar { background: #f5f7f2; border-radius: 10px; }
  .pdf-tag { background: var(--accent-soft); color: var(--accent); border-color: #d1e2d4; }
  .minuta-card { border-radius: 14px; border-color: var(--border-color); box-shadow: 0 4px 16px rgba(29,53,42,.035); }
  .table-header-tools { padding-bottom: 16px; gap: 12px; }
  .modal-card, .appjur-dialog > section { border-radius: 18px; box-shadow: 0 24px 80px rgba(19,45,31,.17); }
  .settings-group { border-color: var(--border-color); background: #f8faf6; border-radius: 12px; }
  .settings-group-title { color: var(--primary); letter-spacing: .07em; }
  #view-sei { background: transparent; }
  .sei-top { background: #fafbf7; border-radius: 14px 14px 0 0; }
  .sei-top h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; font-size: 1.4rem; }
  .sei-chat, .sei-work { border-radius: 14px; box-shadow: var(--shadow); }
  .sei-context, .sei-composer { background: #f8faf6; }
  .sei-message.user { background: var(--accent-soft); }

  @media (max-width: 1100px) {
    body > header { padding: 12px 16px; }
    .header-top { flex-wrap: wrap; gap: 10px; }
    .header-actions { margin-left: auto; }
    main { padding: 16px; }
  }
  @media (max-width: 760px) {
    body { height: 100dvh; }
    body > header { padding: 10px 12px; }
    .user-title { gap: 8px; }
    .user-title h1 { font-size: .85rem; }
    .header-actions { width: 100%; justify-content: flex-start; }
    .header-actions .btn-sec { min-height: 40px; font-size: .74rem; padding: 8px 10px; }
    #mainSidebar { width: var(--sidebar-width); max-width: 88vw; }
    main { padding: 12px; }
    .acesso-rapido { min-height: 64px; padding: 11px 13px; }
    .search-input { max-width: 100%; }
    .modal-card { max-height: 90dvh; }
    .panel-header-row { flex-wrap: wrap; gap: 8px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .btn-sec, .btn-execute, .menu-header, .acesso-rapido, .minuta-card { transition: none; }
    .acesso-rapido:hover { transform: none; }
  }
}
