/* ==============================
   Layout global
   ============================== */

.app-body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f5f7;
    color: #111827;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2.5rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

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

.app-header__logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
}

.app-header__logo-text {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

.app-header__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.app-header__nav-item {
    cursor: pointer;
}

.app-header__nav-item--active {
    color: #111827;
    font-weight: 600;
}

.app-header__nav-item.is-disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.app-header__nav-item.is-disabled:hover {
    text-decoration: none;
}

.plan-badge {
    margin-left: 0.6rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    display: none;
}

.plan-badge.creator {
    display: inline-block;
    background-color: #2563eb;
    color: #fff;
}

.plan-badge-elite {
    display: inline-block;
    background-color: #f59e0b;
    color: #111;
}

/* ==============================
   Layout principal
   ============================== */

.app-main {
    max-width: 1100px;
    margin: 1.5rem auto 2rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    gap: 1.5rem;
}

@media (max-width: 960px) {
    .app-main {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==============================
   Painel de formulário
   ============================== */

.app-panel {
    background-color: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.app-panel__header {
    margin-bottom: 1.25rem;
}

.app-panel__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.app-panel__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

/* ==============================
   Formulário
   ============================== */

.form-briefing {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    gap: 0.75rem;
}

.form-row--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: center;
}

.form-row:first-of-type {
    margin-top: 0.5rem;
}

.form-row:nth-of-type(1),
.form-row:nth-of-type(2),
.form-row:nth-of-type(3),
.form-row:nth-of-type(4) {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select {
    border-radius: 0.6rem;
    border: 1px solid #d1d5db;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    outline: none;
    background-color: #f9fafb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.form-group--compact input {
    max-width: 120px;
}

.form-help {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ==============================
   Checkboxes
   ============================== */

.checkbox-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.checkbox-group input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

/* ==============================
   Ações do formulário
   ============================== */

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-status {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ==============================
   Botões
   ============================== */

.btn-primary,
.btn-secondary {
    border-radius: 999px;
    border: none;
    font-size: 0.85rem;
    padding: 0.5rem 1.15rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 8px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:disabled {
    background-color: #93c5fd;
    box-shadow: none;
    cursor: default;
}

.btn-secondary {
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #374151;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

/* ==============================
   Bloco de resultado
   ============================== */

.app-result {
    display: flex;
    flex-direction: column;
}

.app-result__card {
    background-color: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.app-result__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.app-result__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.app-result__body {
    flex: 1;
    border-radius: 0.75rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 0.85rem 1rem;
    overflow-y: auto;
}

.app-result__content {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82rem;
    white-space: pre-wrap;
    color: #111827;
}

/* Responsividade extra para telas menores */

@media (max-width: 600px) {
    .app-header {
        padding: 0.6rem 1rem;
    }

    .app-main {
        margin-top: 1rem;
        padding-inline: 1rem;
    }

    .app-panel {
        padding: 1.1rem 1.25rem;
    }

    .app-result__card {
        padding: 1rem 1.1rem;
    }
}

/* ==============================
   Abas do painel
   ============================== */

.app-main-wrapper {
    max-width: 1100px;
    margin: 1.5rem auto 2rem;
    padding: 0 1.5rem;
}

.app-tabs {
    background-color: transparent;
}

.app-tabs__nav {
    display: inline-flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    padding: 0.15rem;
    background-color: #e5e7eb;
}

.app-tabs__button {
    border: none;
    background: transparent;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #4b5563;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.app-tabs__button.is-active {
    background-color: #ffffff;
    color: #111827;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.app-tab-pane {
    margin-top: 0.5rem;
}

.is-hidden {
    display: none;
}

/* ==============================
   Seção "Sobre o app"
   ============================== */

.app-about {
    background-color: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    font-size: 0.9rem;
    color: #374151;
}

.app-about__title {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
}

.app-about__subtitle {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.app-about__text {
    margin: 0.4rem 0;
}

.app-about__list {
    margin: 0.35rem 0 0.75rem 1.25rem;
    padding: 0;
}

.app-about__list--ordered {
    list-style-type: decimal;
    margin-left: 1.25rem;
}

.app-about__list li {
    margin-bottom: 0.25rem;
}


/* ==============================
   Modal – Limite atingido
   ============================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.is-visible {
    display: flex;
}

.modal {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    max-width: 420px;
    width: 92%;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
}

.modal-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.modal-text {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
}

.modal-list {
    margin: 0 0 1.25rem 1.1rem;
    padding: 0;
    font-size: 0.85rem;
    color: #374151;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}


.usage-text {
    display: block;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #374151;

}



/* ==============================
   HISTÓRICO DE CONTEÚDOS
   ============================== */

#tab-historico {
    max-width: 900px;
    margin: 0 auto;
}

#historico-lista {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Card individual */
.history-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: #f9fafb;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.history-meta {
    font-size: 0.7rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.history-content {
    font-size: 0.8rem;
    max-height: 90px;
    overflow: hidden;
    white-space: pre-wrap;
}

.history-content.expanded {
    max-height: none;
}

.history-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.history-actions button {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Ver mais / menos */
.history-actions button:first-child {
    background: #f3f4f6;
    color: #111827;
}

.history-actions button:first-child:hover {
    background: #e5e7eb;
}

/* Copiar */
.history-actions button:nth-child(2) {
    background: #2563eb;
    color: white;
}

.history-actions button:nth-child(2):hover {
    background: #1d4ed8;
}

/* Título (tema) */
.history-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.15rem;
}

/* Meta info (plataforma + data) */
.history-item small {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

/* Conteúdo gerado */
.history-item pre {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #374151;
    white-space: pre-wrap;
}

/* Separação visual opcional */
.history-item+.history-item {
    border-top: 1px dashed #e5e7eb;
}

/* Botões exportar */
.btn-export {
    background: #111827;
    color: white;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    cursor: pointer;
}

.btn-export:hover {
    background: #000;
}


.history-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
}

.history-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
}

.history-filters{
    margin-bottom: 16px;
}

.history-filters select{
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

/* Responsivo */
@media (max-width: 600px) {
    .history-item {
        padding: 1rem 1.1rem;
    }

    .history-item strong {
        font-size: 0.95rem;
    }

    .history-item pre {
        font-size: 0.83rem;
    }
}

.trial-banner {
    margin-bottom: 24px;
    width: 100%;
  
}

.trial-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.trial-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #111827;
}

.trial-text span {
    font-size: 0.95rem;
    color: #4b5563;
}

.trial-action a {
    white-space: nowrap;
}
