/* Terminal Brasil - Estilos */

.brasil-terminal-page {
    background: #0d1117;
    color: #c9d1d9;
    min-height: 100vh;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.terminal-wrapper {
    display: flex;
    height: 100vh;
}

.terminal-sidebar {
    width: 280px;
    background: #161b22;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #30363d;
}

.sidebar-title {
    color: #58a6ff;
    font-size: 24px;
    margin-bottom: 5px;
}

.sidebar-subtitle {
    color: #8b949e;
    font-size: 12px;
}

/* Sidebar expansível */
.sidebar-search {
    width: 100%;
    background: #0d1117 !important;
    border: 1px solid #30363d !important;
    border-radius: 6px;
    padding: 8px;
    color: #c9d1d9 !important;
    font-size: 12px;
}

.category-section {
    margin-bottom: 10px;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #c9d1d9;
    font-weight: 500;
}

.category-header:hover {
    background: #161b22;
    border-color: #58a6ff;
}

.expand-icon {
    margin-right: 8px;
    font-size: 10px;
    color: #58a6ff;
    transition: transform 0.2s;
}

.category-name {
    flex: 1;
}

.category-content {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 2px solid #21262d;
    margin-top: 5px;
}

.subcategory-section {
    margin-bottom: 10px;
}

.subcategory-header {
    color: #58a6ff;
    font-size: 12px;
    font-weight: 600;
    margin: 10px 0 5px 0;
    padding-left: 5px;
}

.indicator-link {
    display: block;
    padding: 4px 8px;
    color: #8b949e;
    text-decoration: none;
    font-size: 11px;
    font-family: monospace;
    border-radius: 4px;
    transition: all 0.2s;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.indicator-link:hover {
    background: #161b22;
    color: #58a6ff;
    text-decoration: none;
    transform: translateX(2px);
}

.sidebar-section {
    color: #c9d1d9;
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
}

.terminal-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.terminal-container {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.terminal-input-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 10px;
}

.terminal-prompt {
    color: #f85149;
    font-size: 18px;
    margin-right: 10px;
}

.terminal-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #c9d1d9 !important;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.terminal-button {
    background: #238636;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.terminal-button:hover {
    background: #2ea043;
}

.terminal-button:active {
    transform: translateY(1px);
}

.terminal-output {
    min-height: 300px;
}

.terminal-error {
    color: #f85149;
    padding: 10px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 6px;
    margin: 10px 0;
}

.terminal-help {
    color: #58a6ff;
    background: #161b22;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}

.terminal-title {
    color: #58a6ff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.terminal-category {
    color: #c9d1d9;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 5px;
}

.category-link {
    display: block;
    padding: 8px 12px;
    color: #c9d1d9;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.category-link:hover {
    background: #21262d;
    color: #58a6ff;
    text-decoration: none;
}

.quick-cmd {
    display: block;
    padding: 6px 10px;
    color: #58a6ff;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    margin-bottom: 8px;
    font-family: monospace;
    transition: all 0.2s;
}

.quick-cmd:hover {
    background: #161b22;
    border-color: #58a6ff;
    text-decoration: none;
    color: #58a6ff;
}

/* Toggle view */
.view-toggle {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #30363d;
}

/* Compare Lab */
.compare-dropdown {
    background: #0d1117 !important;
    border: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

.compare-dropdown .Select__control {
    background: #0d1117 !important;
    border-color: #30363d !important;
}

.compare-dropdown .Select__menu {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
}

.compare-dropdown .Select__option {
    background: #161b22 !important;
    color: #c9d1d9 !important;
}

.compare-dropdown .Select__option--is-focused {
    background: #21262d !important;
}

.compare-dropdown .Select__option--is-selected {
    background: #238636 !important;
}

.compare-input {
    background: #0d1117 !important;
    border: 1px solid #30363d !important;
    border-radius: 6px;
    padding: 6px 10px;
    color: #c9d1d9 !important;
    font-size: 12px;
    font-family: monospace;
}

.compare-checkbox {
    color: #c9d1d9;
    font-size: 12px;
}

.compare-checkbox input[type="checkbox"] {
    margin-right: 5px;
    accent-color: #238636;
}

.history-entry {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #30363d;
}

.history-command {
    color: #8b949e;
    font-size: 12px;
    display: block;
    margin-bottom: 10px;
    font-family: monospace;
}

.history-output {
    padding-left: 20px;
}

.category-panel {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.panel-title {
    color: #58a6ff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.panel-subtitle {
    color: #c9d1d9;
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
}

.indicator-card {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.indicator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-title {
    color: #58a6ff;
    font-size: 14px;
    font-weight: 600;
}

.card-ticker {
    color: #8b949e;
    font-size: 12px;
    font-family: monospace;
}

.card-info {
    color: #8b949e;
    font-size: 11px;
}

/* Ajustes para tabelas no terminal */
.brasil-terminal-page .dash-table {
    font-family: 'SF Mono', Monaco, monospace;
}

.brasil-terminal-page .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
    background-color: #0d1117 !important;
    color: #c9d1d9 !important;
    border-color: #30363d !important;
}

.brasil-terminal-page .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
    background-color: #161b22 !important;
    color: #58a6ff !important;
    font-weight: 600;
    border-color: #30363d !important;
}

/* Scrollbar customizada */
.terminal-sidebar::-webkit-scrollbar,
.terminal-main::-webkit-scrollbar {
    width: 8px;
}

.terminal-sidebar::-webkit-scrollbar-track,
.terminal-main::-webkit-scrollbar-track {
    background: #0d1117;
}

.terminal-sidebar::-webkit-scrollbar-thumb,
.terminal-main::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.terminal-sidebar::-webkit-scrollbar-thumb:hover,
.terminal-main::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* Animação de digitação */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-prompt {
    animation: blink 1s infinite;
}

/* Responsividade */
@media (max-width: 768px) {
    .terminal-wrapper {
        flex-direction: column;
    }
    
    .terminal-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #30363d;
    }
}