/* RichFaces BlueSky Theme - Fiel ao original
 * Baseado em blueSky.skin.properties e skinning.ecss do RichFaces 4.0
 * Convertido para classes semânticas do Unite (.app-*)
 */

/* ===== Cores do Tema BlueSky =====
 * headerBackgroundColor: #BED6F8
 * headerGradientColor: #F2F7FF
 * panelBorderColor: #BED6F8
 * controlBackgroundColor: #ffffff
 * additionalBackgroundColor: #ECF4FE
 * generalLinkColor: #0078D0
 * hoverLinkColor: #0090FF
 * visitedLinkColor: #0090FF
 * trimColor: #D6E6FB
 * generalTextColor: #000000
 * controlTextColor: #000000
 */

 .app-page {
    min-height: 100vh;
    margin: 0;
    font-family: Arial, Verdana, sans-serif;
    font-size: 11px;
    color: #000000;
    background-color: #FFFFFF;
    padding: 0;
  }
  
  .app-link,
  .app-page a {
    color: #0078D0;
    text-decoration: none;
  }
  
  .app-link:hover,
  .app-page a:hover {
    color: #0090FF;
    text-decoration: underline;
  }
  
  .app-link:visited,
  .app-page a:visited {
    color: #0090FF;
  }
  
  .app-card {
    background-color: #FFFFFF;
    border: 1px solid #BED6F8;
    border-radius: 0;
    padding: 2rem;
    margin: 2rem auto 1.5rem;
    box-shadow: none;
    max-width: 520px;
    width: calc(100% - 2rem);
    box-sizing: border-box;
  }
  
  .app-card a {
    color: #0078D0;
  }
  
  .app-card a:hover {
    color: #0090FF;
  }
  
  .app-heading,
  .app-page h1,
  .app-page h2,
  .app-page h3 {
    margin-bottom: 1rem;
    font-weight: bold;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    color: #000000;
  }
  
  .app-form {
    width: 100%;
  }
  
  .app-label,
  .app-page label {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    color: #000000;
    font-weight: normal;
  }
  
  .app-input,
  .app-select,
  .app-textarea,
  .app-page input:not([type="checkbox"]):not([type="radio"]),
  .app-page select,
  .app-page textarea {
    display: block;
    width: 100%;
    padding: 0.25rem 0.5rem;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    line-height: 1.3;
    color: #000000;
    background: linear-gradient(to bottom, #F2F7FF 0%, #ffffff 100%);
    background-color: #ffffff;
    border: 1px inset #BED6F8;
    border-radius: 0;
    margin-bottom: 1rem;
    transition: border-color 0.15s ease-in-out, background 0.15s ease-in-out;
    box-sizing: border-box;
  }
  
  .app-input:focus,
  .app-select:focus,
  .app-textarea:focus {
    color: #000000;
    background: linear-gradient(to bottom, #ffffff 0%, #F2F7FF 100%);
    background-color: #FEFFDA;
    border-color: #BED6F8;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(190, 214, 248, 0.25);
  }
  
  .app-input:disabled,
  .app-select:disabled,
  .app-textarea:disabled {
    color: #BED6F8;
    cursor: default;
    background: #f5f5f5;
    background-color: #f5f5f5;
  }
  
  .app-button,
  .app-page button,
  .app-page input[type="submit"],
  .app-page input[type="button"] {
    display: inline-block;
    font-weight: normal;
    color: #000000;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background: linear-gradient(to bottom, #BED6F8 0%, #F2F7FF 100%);
    background-color: #BED6F8;
    border: 1px solid #BED6F8;
    padding: 0.25rem 0.5rem;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    line-height: 1.3;
    border-radius: 0;
    transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
  }
  
  .app-button:hover,
  .app-page button:hover,
  .app-page input[type="submit"]:hover,
  .app-page input[type="button"]:hover {
    background: linear-gradient(to bottom, #F2F7FF 0%, #BED6F8 100%);
    background-color: #BED6F8;
    border-color: #BED6F8;
  }
  
  .app-button:focus,
  .app-page button:focus,
  .app-page input[type="submit"]:focus,
  .app-page input[type="button"]:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(190, 214, 248, 0.5);
  }
  
  .app-button:disabled,
  .app-page button:disabled,
  .app-page input[type="submit"]:disabled,
  .app-page input[type="button"]:disabled {
    color: #8DB7F3;
    background-color: #cccccc;
    border-color: #cccccc;
    cursor: not-allowed;
  }
  
  .app-notification,
  .unite-notification {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    clear: both;
    padding: 0.4rem 0.75rem;
    margin: 0.5rem 0 1.25rem;
    border: 1px solid transparent;
    border-radius: 0;
  }
  
  .app-notification-list,
  .unite-notifications {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
  }
  
  .app-notification-list li,
  .unite-notifications li,
  .unite-notifications__item {
    position: relative;
    padding: 0.4rem 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0;
    background-color: #f8f9fa;
  }
  
  .unite-notification--info,
  .unite-notifications__item.unite-notification--info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
  }
  
  .unite-notification--success,
  .unite-notifications__item.unite-notification--success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
  }
  
  .unite-notification--warning,
  .unite-notifications__item.unite-notification--warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
  }
  
  .unite-notification--error,
  .unite-notifications__item.unite-notification--error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
  }
  
  .app-menu {
    margin: 0 0 1.5rem;
    padding: 0.4rem 0;
    background: linear-gradient(to bottom, #BED6F8 0%, #F2F7FF 100%);
    background-color: #BED6F8;
    width: 100%;
    border-bottom: 1px solid #BED6F8;
  }
  
  .app-menu__content {
    list-style: none;
    margin: 0;
    padding: 0 0.75rem;
    display: flex;
    gap: 0.65rem;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }
  
  .app-menu__content ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .app-menu a {
    color: #000000;
    text-decoration: none;
    font-weight: normal;
    padding: 0.4rem 0.5rem;
    border-radius: 0;
    background: transparent;
    border: none;
    transition: color 0.15s ease;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
  }
  
  .app-menu a:hover {
    color: #0078D0;
    text-decoration: underline;
  }
  
  .app-menu__toggle {
    display: none !important;
    background: transparent;
    border: 1px solid #BED6F8;
    color: #000000;
    font-size: 1.1rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0;
    cursor: pointer;
    font-family: Arial, Verdana, sans-serif;
  }
  
  .app-menu__toggle:hover {
    background-color: rgba(242, 247, 255, 0.5);
    border-color: #BED6F8;
  }
  
  .app-menu__items {
    display: flex;
    gap: 0.65rem;
    width: 100%;
  }
  
  .app-menu__items[hidden] {
    display: none;
  }
  
  @media (max-width: 640px) {
    .app-menu {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .app-menu__content {
      padding: 0 0.5rem;
    }
  
    .app-menu__toggle {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      margin: 0;
    }
  
    .app-menu__items {
      flex-direction: column;
      width: 100%;
      gap: 0;
    }
  
    .app-menu__items a {
      display: block;
      width: 100%;
      padding: 0.5rem 0.5rem;
      border-bottom: 1px solid rgba(190, 214, 248, 0.3);
    }
  
    .app-menu__items a:last-child {
      border-bottom: none;
    }
  }
  
  /* Estilos adicionais fieis ao RichFaces BlueSky */
  fieldset {
    border-width: 1px;
    border-style: solid;
    padding: 10px;
    border-color: #BED6F8;
    margin-bottom: 1rem;
  }
  
  hr {
    border-width: 1px;
    border-style: solid;
    border-color: #BED6F8;
    margin: 1rem 0;
  }
  
  legend {
    font-weight: bold;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    color: #000000;
    padding: 0 0.5rem;
  }
  
  /* Tabelas no estilo BlueSky */
  table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #C0C0C0;
    margin-bottom: 1rem;
    table-layout: auto;
  }
  
  table th {
    background-color: #BED6F8;
    color: #0B356C;
    font-weight: bold;
    padding: 0.5rem;
    border: 1px solid #C0C0C0;
    text-align: left !important;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
  }
  
  table td {
    background-color: #FFFFFF;
    color: #000000;
    padding: 0.5rem;
    border: 1px solid #C0C0C0;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
  }
  
  /* Cores alternadas nas linhas (zebra striping) */
  table tbody tr:nth-child(even) td {
    background-color: #ECF4FE;
  }
  
  table tbody tr:nth-child(odd) td {
    background-color: #FFFFFF;
  }
  
  table tfoot td {
    background-color: #cccccc;
  }

/* Garantir que tabelas dentro de content-page também tenham os estilos corretos */
.content-page table,
body.content-page table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #C0C0C0;
    margin-bottom: 1rem;
    table-layout: auto;
}

.content-page table th,
body.content-page table th {
    background-color: #BED6F8 !important;
    color: #0B356C !important;
    font-weight: bold;
    padding: 0.5rem;
    border: 1px solid #C0C0C0;
    text-align: left !important;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
}

.content-page table td,
body.content-page table td {
    padding: 0.5rem;
    border: 1px solid #C0C0C0;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
}

.content-page table tbody tr:nth-child(even) td,
body.content-page table tbody tr:nth-child(even) td {
    background-color: #ECF4FE !important;
}

.content-page table tbody tr:nth-child(odd) td,
body.content-page table tbody tr:nth-child(odd) td {
    background-color: #FFFFFF !important;
}

.content-page table tfoot td,
body.content-page table tfoot td {
    background-color: #cccccc;
}
  
  /* Áreas de edição - já definido no .app-input:focus acima */
  
  /* Cores de trim e adicionais */
  .app-card {
    background-color: #FFFFFF;
  }
  
  /* Links dentro de cards */
  .app-card a {
    color: #0078D0;
  }
  
  .app-card a:hover {
    color: #0090FF;
  }

/* ===== Layout Principal ===== */
.app-layout {
    display: flex;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* ===== Menu Lateral ===== */
.app-sidebar {
    width: 250px;
    min-width: 150px;
    max-width: 500px;
    background-color: #FFFFFF;
    border-right: 1px solid #BED6F8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.app-sidebar__header {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(to bottom, #BED6F8 0%, #F2F7FF 100%);
    background-color: #BED6F8;
    border-bottom: 1px solid #BED6F8;
    font-weight: bold;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    box-sizing: border-box;
}

.app-sidebar__logo {
    height: 40px;
    width: auto;
    max-width: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-sidebar__content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    background-color: #FFFFFF;
}

/* Campo de Busca */
.app-search-box {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0;
    background-color: transparent;
    border: none;
}

.app-search-input {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid #C0C0C0;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    color: #000000;
    background-color: #FFFFFF;
    box-sizing: border-box;
    line-height: 1.2;
    height: 24px;
    margin: 0;
}

.app-search-input:focus {
    outline: none;
    border-color: #0078D0;
    box-shadow: 0 0 0 1px #0078D0;
}

.app-search-button {
    padding: 0.25rem 0.75rem;
    border: 1px solid #BED6F8;
    background-color: #ECF4FE;
    color: #0B356C;
    font-size: 11px;
    cursor: pointer;
    font-family: Arial, Verdana, sans-serif;
    transition: background-color 0.15s ease;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1.2;
    height: 24px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
}

.app-search-button:hover {
    background-color: #D6E6FB;
}

.app-search-button:active {
    background-color: #BED6F8;
}

/* Resizer do Sidebar */
.app-sidebar__resizer {
    width: 4px;
    background-color: transparent;
    cursor: col-resize;
    position: absolute;
    right: 0;
    top: 40px;
    bottom: 0;
    z-index: 10;
    transition: background-color 0.15s ease;
}

.app-sidebar__resizer:hover {
    background-color: #BED6F8;
}

.app-sidebar__resizer:active {
    background-color: #0078D0;
}

/* ===== Tree View ===== */
.app-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
}

.app-tree__item {
    margin: 0;
    padding: 0;
}

.app-tree__node {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    color: #000000;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.app-tree__node:hover {
    background-color: rgba(242, 247, 255, 0.5);
    border-color: #BED6F8;
}

.app-tree__node--selected {
    background-color: #ECF4FE;
    border-color: #BED6F8;
    font-weight: bold;
}

.app-tree__toggle {
    width: 11px;
    height: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
    color: #000000;
    font-size: 7px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    border: 1px solid #BED6F8;
    background: linear-gradient(to bottom, #F2F7FF 0%, #ffffff 100%);
    background-color: #ffffff;
    flex-shrink: 0;
    margin-top: 0;
    align-self: center;
}

.app-tree__toggle:hover {
    background: linear-gradient(to bottom, #BED6F8 0%, #F2F7FF 100%);
    background-color: #BED6F8;
}

.app-tree__toggle--expanded::before {
    content: '−';
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-tree__toggle--collapsed::before {
    content: '+';
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-tree__icon {
    margin-right: 0.25rem;
    display: inline-block;
    flex-shrink: 0;
    align-self: center;
    font-size: 16px;
    line-height: 1;
    width: 16px;
    height: 16px;
    background-image: url('../../../img/folder.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
    overflow: hidden;
    vertical-align: middle;
}

.app-tree__icon--file {
    background-image: url('../../../img/document.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
    overflow: hidden;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.app-tree__label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-tree__children {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-left: 1.5rem;
    display: none;
}

.app-tree__children--expanded {
    display: block;
}

/* ===== Área de Conteúdo ===== */
.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #FFFFFF;
    min-height: 0; /* Necessário para que o overflow funcione em flex containers */
}

.app-content__header {
    padding: 0.5rem 1rem;
    background: linear-gradient(to bottom, #BED6F8 0%, #F2F7FF 100%);
    background-color: #BED6F8;
    border-bottom: 1px solid #BED6F8;
    font-weight: bold;
    min-height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    color: #000000;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-selector select {
    background-color: #ECF4FE;
    border: 1px solid #BED6F8;
    color: #0B356C;
    padding: 0.25rem 0.5rem;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
    cursor: pointer;
    border-radius: 0;
}

.language-selector select:hover {
    background-color: #D6E6FB;
}

.language-selector select:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(190, 214, 248, 0.5);
}

.app-content__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    background-color: #FFFFFF;
    min-height: 0; /* Necessário para que o overflow funcione em flex containers */
}

/* ===== Scrollbar Personalizado ===== */
.app-sidebar__content::-webkit-scrollbar,
.app-content__body::-webkit-scrollbar {
    width: 12px;
}

.app-sidebar__content::-webkit-scrollbar-track,
.app-content__body::-webkit-scrollbar-track {
    background: #ECF4FE;
}

.app-sidebar__content::-webkit-scrollbar-thumb,
.app-content__body::-webkit-scrollbar-thumb {
    background: #D6E6FB;
    border: 1px solid #BED6F8;
}

.app-sidebar__content::-webkit-scrollbar-thumb:hover,
.app-content__body::-webkit-scrollbar-thumb:hover {
    background: #BED6F8;
}

/* ===== Estilos para Conteúdo HTML Gerado ===== */
/* Estilos para body dentro de iframes/conteúdos gerados */
body.content-page {
    font-family: Arial, Verdana, sans-serif;
    font-size: 11px;
    color: #000000;
    background-color: #FFFFFF;
    padding: 1rem;
    line-height: 1.6;
    margin: 0;
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Estilos para Comentários Giscus ===== */
.giscus-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #BED6F8;
}

.giscus-container h2 {
    font-size: 14px !important;
    color: #0B356C !important;
    margin-bottom: 1.5rem !important;
    border-left: 4px solid #BED6F8 !important;
    padding-left: 0.75rem !important;
}

/* Ajustes para o iframe do Giscus */
.giscus-container iframe {
    max-width: 100%;
}

/* Estilos para o container de aviso de configuração */
.giscus-container .giscus-warning {
    padding: 1rem;
    background: #ECF4FE;
    border: 1px solid #BED6F8;
    border-radius: 0;
    color: #0B356C;
    margin-bottom: 1rem;
    font-size: 11px;
    font-family: Arial, Verdana, sans-serif;
}

.giscus-container .giscus-warning a {
    color: #0078D0;
    text-decoration: underline;
}

.giscus-container .giscus-warning a:hover {
    color: #0090FF;
}

/* Tema customizado BlueSky para Giscus */
/* O Giscus é carregado via iframe, então usamos CSS customizado */
/* Para aplicar um tema customizado, você precisa criar um arquivo CSS e referenciá-lo no data-theme */
/* Exemplo: data-theme="https://seu-dominio.com/themes/bluesky-giscus.css" */

/* Estilos para elementos dentro de content-page - maior especificidade */
body.content-page h1,
body.content-page .content-container h1,
.content-page h1,
.app-page .content-container h1 {
    font-size: 18px !important;
    color: #0B356C !important;
    border-bottom: 2px solid #BED6F8 !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 1.5rem !important;
    margin-top: 0 !important;
    font-weight: bold !important;
}

body.content-page h2,
body.content-page .content-container h2,
.content-page h2,
.app-page .content-container h2 {
    font-size: 14px !important;
    color: #0B356C !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    border-left: 4px solid #BED6F8 !important;
    padding-left: 0.75rem !important;
    font-weight: bold !important;
}

body.content-page h3,
body.content-page .content-container h3,
.content-page h3,
.app-page .content-container h3 {
    font-size: 12px !important;
    color: #0B356C !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
    font-weight: bold !important;
}

.content-page p,
body.content-page p {
    margin: 1rem 0;
    line-height: 1.6;
}

.content-page strong,
body.content-page strong {
    font-weight: bold;
    color: #000000;
}

.content-page em,
body.content-page em {
    font-style: italic;
}

.icon-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.info-box {
    background-color: #ECF4FE;
    border: 1px solid #BED6F8;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0;
}

.highlight-box {
    background-color: #FFF3CD;
    border: 1px solid #FFC107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0;
}

.success-box {
    background-color: #D4EDDA;
    border: 1px solid #C3E6CB;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0;
}

/* Container de código com botão de copiar */
.code-block-wrapper {
    position: relative;
    margin: 1.5rem 0;
}

.code-block-header {
    background-color: #BED6F8;
    color: #0B356C;
    padding: 0.5rem 1rem;
    border: 1px solid #BED6F8;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
}

.code-block-header .language-label {
    text-transform: uppercase;
}

.copy-code-btn {
    background-color: #ECF4FE;
    border: 1px solid #BED6F8;
    color: #0B356C;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 10px;
    font-family: Arial, Verdana, sans-serif;
    transition: background-color 0.15s ease;
}

.copy-code-btn:hover {
    background-color: #D6E6FB;
}

.copy-code-btn:active {
    background-color: #BED6F8;
}

.copy-code-btn.copied {
    background-color: #D4EDDA;
    color: #155724;
}

.content-page pre,
body.content-page pre,
.app-page pre,
body.app-page pre {
    background-color: #F8F8F8;
    border: 1px solid #BED6F8;
    padding: 0;
    overflow-x: auto;
    border-radius: 0;
    margin: 0;
    position: relative;
}

.content-page pre code,
body.content-page pre code,
.content-page pre code.hljs,
body.content-page pre code.hljs,
.hljs {
    display: block;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.0 !important;
    overflow-x: auto;
}

.content-page pre,
body.content-page pre,
.content-page pre.hljs,
body.content-page pre.hljs {
    line-height: 1.0 !important;
}

/* Números de linha */
.hljs-ln-numbers {
    text-align: right;
    color: #999;
    border-right: 1px solid #F0F0F0;
    padding-right: 1rem;
    padding-left: 0.75rem;
    margin-right: 1rem !important;
    user-select: none;
    line-height: 1.0 !important;
}

.hljs-ln-code {
    padding-left: 1rem !important;
    line-height: 1.0 !important;
}

.hljs-ln-numbers td,
.hljs-ln-code td {
    line-height: 1.0 !important;
    border: 0 !important; /* Remove borda das tabelas do syntax highlight */
}

/* Remove borda de todas as tabelas dentro de blocos de código */
pre code table td,
pre.hljs table td,
.hljs table td,
pre code table,
pre.hljs table,
.hljs table {
    border: 0 !important;
}

/* Estilo inline para código dentro de parágrafos */
.content-page code:not(pre code),
body.content-page code:not(pre code) {
    background-color: #ECF4FE;
    border: 1px solid #BED6F8;
    padding: 0.15rem 0.3rem;
    border-radius: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 10px;
    color: #0B356C;
}

.timeline {
    border-left: 3px solid #BED6F8;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

.timeline-item {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 0.5rem;
    line-height: 2.6;
    min-height: 2.6em;
}

.timeline-item::before {
    content: '●';
    position: absolute;
    left: -1.75rem;
    top: 0.2em;
    color: #0078D0;
    font-size: 1.2rem;
    line-height: 1;
    display: inline-block;
}

.content-page ul,
.content-page ol,
body.content-page ul,
body.content-page ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-page li,
body.content-page li {
    margin: 0.5rem 0;
}

.image-placeholder {
    background: linear-gradient(135deg, #ECF4FE 0%, #BED6F8 100%);
    border: 2px solid #BED6F8;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
    color: #0B356C;
    font-style: italic;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-card {
    background-color: #ECF4FE;
    border: 1px solid #BED6F8;
    padding: 1rem;
    border-radius: 0;
}

.emoji-large {
    font-size: 3rem;
}

/* ===== Mobile Menu Toggle Button ===== */
.app-mobile-menu-toggle {
    display: none !important;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    position: relative;
}

.app-mobile-menu-toggle span {
    width: 100%;
    height: 1.5px;
    background-color: #000000;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
    flex-shrink: 0;
}

.app-mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.app-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    height: 1.5px;
}

.app-mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.app-content__header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-content__logo-mobile {
    display: none !important;
    height: 24px;
    width: auto;
    object-fit: contain;
}

/* ===== Mobile Overlay ===== */
.app-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-mobile-overlay.active {
    opacity: 1;
}

/* ===== Mobile Styles ===== */
@media (max-width: 768px) {
    .app-mobile-menu-toggle {
        display: flex !important;
    }

    .app-content__logo-mobile {
        display: block !important;
    }

    .app-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    }

    .app-sidebar.mobile-open {
        left: 0;
    }

    .app-mobile-overlay {
        display: block;
    }

    .app-content {
        width: 100%;
    }
    
    .app-layout {
        min-height: 100vh;
        height: auto;
        overflow: visible;
    }
    
    html, body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .app-page {
        min-height: 100vh;
        overflow-x: hidden;
    }

    .app-sidebar__resizer {
        display: none;
    }

    .app-content__header {
        padding: 0.5rem 0.75rem;
        position: relative;
        z-index: 1001;
    }

    .app-content__header-left {
        position: relative;
        z-index: 1002;
    }

    .app-content__body {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto !important;
        overflow-x: hidden;
        min-height: 0; /* Garante que o scroll funcione corretamente no mobile */
        /* Garante que o padding inferior seja visível ao fazer scroll */
        padding-bottom: 2rem;
        height: auto !important;
        max-height: none !important;
    }
    
    .app-content {
        overflow: visible !important;
    }
    
    .app-layout {
        overflow: visible !important;
    }
}
  