:root {
    --bg: #101010;
    --panel: #1c1c1c;
    --panel-2: #232323;
    --line: #353535;
    --text: #ececec;
    --muted: #9f9f9f;
    --accent: #d18cff;
    --accent-2: #a855f7;
    --success: #5bd38a;
    --danger: #ff6b6b;
    --input: #2a2a2a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
}

.assistente-app-topbar {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    background: rgba(7, 10, 15, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.30);
    z-index: 1000;
}

.assistente-topbar-left,
.assistente-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.assistente-topbar-right {
    justify-content: flex-end;
}

.assistente-topbar-center {
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
    white-space: nowrap;
}

.assistente-topbar-btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 7px;
    background: #242424;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid #444;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.assistente-topbar-btn:hover {
    background: #333;
}

.assistente-menu {
    position: relative;
}

.assistente-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1200;
    min-width: 180px;
    padding: 6px;
    background: rgba(7, 10, 15, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48);
}

.assistente-menu-item {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
}

.assistente-menu-item:hover {
    background: rgba(255, 255, 255, 0.10);
}

.page {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: calc(100vh - 46px);
}

.sidebar {
    background: #171717;
    border-right: 1px solid var(--line);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.back-btn {
    text-decoration: none;
    color: var(--accent);
    font-weight: 700;
}

.module-title {
    margin: 0;
    color: var(--accent);
    font-size: 24px;
}

.module-subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.sidebar-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
}

.sidebar-panel h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 16px;
}

.sidebar input,
.sidebar select,
.sidebar textarea,
.content input,
.content select,
.content textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: var(--input);
    color: #fff;
    outline: none;
}

.sidebar input:focus,
.sidebar select:focus,
.sidebar textarea:focus,
.content input:focus,
.content select:focus,
.content textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(209, 140, 255, 0.14);
}

.sidebar-actions,
.form-actions,
.prompt-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

button {
    border: 1px solid #444;
    background: #2e2e2e;
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
}

.btn-primary {
    background: linear-gradient(180deg, #a855f7, #7e22ce);
    border-color: #9c4dff;
}

.btn-danger {
    background: linear-gradient(180deg, #ff6b6b, #d9485f);
    border-color: #ff7d7d;
}

.btn-success {
    background: linear-gradient(180deg, #39b56a, #239b56);
    border-color: #57d58b;
}

.list-prompts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.prompt-item {
    background: var(--panel-2);
    border: 1px solid #3b3b3b;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
}

.prompt-item:hover {
    border-color: var(--accent);
}

.prompt-item.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(209, 140, 255, 0.3);
    background: #2a2130;
}

.prompt-item-title {
    font-size: 14px;
    color: #fff;
    font-weight: 700;
}

.prompt-item-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
    color: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
}

.form-col-span-2 {
    grid-column: span 2;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 13px;
    color: #d8d8d8;
    font-weight: 600;
}

.field-help {
    font-size: 12px;
    color: var(--muted);
}

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

#promptFinal {
    min-height: 260px;
    font-family: Consolas, monospace;
    line-height: 1.55;
}

.status-bar {
    min-height: 22px;
    color: var(--muted);
    font-size: 13px;
}

.status-bar.success {
    color: var(--success);
}

.status-bar.error {
    color: var(--danger);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(209, 140, 255, 0.12);
    border: 1px solid rgba(209, 140, 255, 0.28);
    color: #efdcff;
    font-size: 12px;
}

.empty-state {
    color: var(--muted);
    font-size: 13px;
    border: 1px dashed #454545;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

@media (max-width: 1200px) {
    .page {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 860px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-col-span-2 {
        grid-column: span 1;
    }
}
.list-pastas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding-right: 4px;
    margin-top: 10px;
}

.pasta-item {
    background: var(--panel-2);
    border: 1px solid #3b3b3b;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
}

.pasta-item:hover {
    border-color: var(--accent);
}

.pasta-item.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(209, 140, 255, 0.3);
    background: #2a2130;
}

.pasta-item.temp {
    border-color: #d8b44a;
    box-shadow: 0 0 0 1px rgba(216, 180, 74, 0.28);
    background: #332c18;
}

.pasta-item-title {
    font-size: 14px;
    color: #fff;
    font-weight: 700;
}

.pasta-item-warning {
    font-size: 12px;
    color: #f0d77a;
    margin-top: 4px;
    line-height: 1.4;
}

.pasta-warning {
    color: #f0d77a;
}

.hidden {
    display: none !important;
}
.help-main-btn {
    width: 100%;
    min-height: 54px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(180deg, #a855f7, #7e22ce);
    border-color: #9c4dff;
}

.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

.help-modal {
    width: min(980px, 96vw);
    max-height: 90vh;
    overflow: auto;
    background: #171717;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 80px rgba(0, 0, 0, 0.45);
}

.help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: #171717;
}

.help-header h2 {
    margin: 0;
    color: var(--accent);
    font-size: 24px;
}

.help-close-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 18px;
}

.help-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.help-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}

.help-section h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
}

.help-section p {
    margin: 0 0 10px;
    color: #d7d7d7;
    line-height: 1.6;
}

.help-feedback-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
