* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #0b0c10;
    min-height: 100vh;
    color: #e0e0e0;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    background-color: transparent;
}

.app-header {
    display: flex;
    align-items: center;
    padding: 10px 0 20px 10px;
    width: 100%;
}

.main-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
    margin-top: 20px;
}

.dashboard-column {
    flex: 1.8;
    min-width: 0;
}

.history-column {
    flex: 1;
    min-width: 350px;
}

.history-card {
    padding: 20px;
    background: #1a1b1e;
    border: 1px solid #333;
}

.market-date-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.header-title {
    color: #00ffb0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 2px;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.card-full {
    grid-column: span 2;
}

.card {
    background-color: transparent;
    border-radius: 4px;
    padding: 24px 32px;
    border: 1px solid #333333;
}

.card-full {
    width: 100%;
}

.card-seul {
    padding: 20px 32px;
}

.card-label {
    font-size: 14px;
    font-weight: normal;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.card-value.large {
    font-size: 64px;
    font-weight: bold;
    line-height: 1;
    color: #ffffff;
    display: flex;
    align-items: baseline;
}

.unit-c {
    font-size: 0.4em; 
    margin-left: 5px;
    font-weight: normal;
}

.card-value.large .unit-c {
    color: #888888;
}

.stat-value .unit-c {
    color: #00ffb0;
}

.card-title-large {
    font-size: 24px;
    font-weight: bold;
    color: #00ffb0;
    letter-spacing: 1px;
}

.methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    grid-column: span 2; /* Ocupa a largura total do dashboard */
}

.card {
    background-color: #16171b;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #333;
    width: 100%;
}

.card-header {
    font-size: 14px;
    font-weight: normal;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.card-stats {
    display: flex;
    justify-content: space-between;
}

.three-cols {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    justify-items: center;
}

.two-cols {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    justify-items: center;
}

.stat-col {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    font-weight: normal;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #ffffff;
    line-height: 1;
    display: flex;
    align-items: baseline;
}

.stat-value .unit-c {
    font-size: 0.5em; 
    font-weight: normal;
    color: #00ffb0;
}

.editable-number {
    border-bottom: 2px dashed #444444;
    cursor: text;
    min-width: 40px;
    display: inline-block;
    text-align: center;
    color: #ffffff;
}
.editable-number:focus {
    outline: none;
    border-bottom: 2px solid #00ffb0;
}

.card-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-content {
    flex: 1;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-left: 20px;
    border-left: 1px solid #222222;
}

.action-btn {
    background: transparent;
    border: none;
    font-size: 36px;
    cursor: pointer;
    opacity: 0.2;
    transition: all 0.2s;
    font-family: sans-serif;
    padding: 0 10px;
}

.action-btn:hover {
    transform: scale(1.1);
    opacity: 0.6;
}

.btn-success {
    color: #00ffb0;
}

.btn-danger {
    color: #ff003c;
}

.action-btn.active {
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 0 10px currentColor;
}

@media (max-width: 768px) {
    .methods-grid {
        grid-template-columns: 1fr;
    }
    .card-value.large {
        font-size: 52px;
    }
    .two-cols {
        gap: 60px;
    }
}

.card-poly-header {
    padding: 15px 32px;
    background-color: transparent;
    border-color: #333;
}

.market-date-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.arrow-btn {
    background: transparent;
    border: 1px solid #00ffb0;
    color: #00ffb0;
    font-size: 20px;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-family: monospace;
    transition: all 0.2s;
}

.arrow-btn:hover {
    background: #00ffb0;
    color: #000;
}

.market-date-display {
    font-size: 20px;
    color: #fff;
    font-weight: bold;
}

#market-day-number {
    color: #00ffb0;
}

.market-date-picker {
    position: relative;
    background: transparent;
    border: none;
    color: #00ffb0;
    font-family: inherit;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    border-bottom: 1px dashed #444;
    color-scheme: dark;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 20px;
    padding-right: 30px;
}

.market-date-picker::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    opacity: 0; /* Invisível mas cobre todo o campo */
    cursor: pointer;
}

.seul-time-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.seul-arrows {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.seul-arrow-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    font-family: sans-serif;
    transition: color 0.2s;
}
.seul-arrow-btn:hover {
    color: #00ffb0;
}

/* NOVO DESIGN DOS PREÇOS - Vertical com Cores Vibrantes */
.stat-prices {
    margin-top: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-top: 1px solid #222;
    padding-top: 8px;
}

.price-row-s {
    color: #00ff00 !important; /* Verde puro */
}

.price-row-n {
    color: #ff0000 !important; /* Vermelho puro */
}

.price-s, .price-n {
    margin-left: 4px;
}

/* Método Three Calculation Display */
.method-calc-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.calc-value {
    font-size: 18px;
    font-weight: bold;
    color: #00ffb0;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
}

.calc-input-wrapper {
    color: #00ffb0;
    font-weight: bold;
    font-size: 18px;
}

.distribution-container {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 255, 176, 0.05);
    border-radius: 4px;
}

.dist-col {
    flex: 1;
    text-align: center;
    font-size: 11px;
}

.dist-label {
    color: #888;
    margin-bottom: 2px;
    font-weight: bold;
}

.dist-quo-val {
    color: #00ffb0;
    font-weight: 800;
}

.method-calc-container.stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 15px;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.result-row {
    width: 100%;
    padding-top: 5px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.calc-value-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.profit-value {
    font-size: 18px;
    font-weight: bold;
    color: #888;
}

.distribution-container.single-quo {
    justify-content: center;
    padding: 12px;
    background: rgba(0, 255, 176, 0.08);
}

.single-quo .dist-quo-val {
    font-size: 20px;
    margin-left: 10px;
}

/* Prediction Card Styles */
.prediction-card {
    margin-top: 15px;
    background: #16171b;
}

.prediction-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: left;
}

.pred-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 2px;
    letter-spacing: 1px;
}

.pred-value {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.prediction-card .card-actions {
    border-left: 1px solid #222;
    padding-left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-width: 80px;
}

.prediction-card .status-display {
    position: absolute;
    background: transparent !important;
    border: none !important;
    font-size: 36px !important;
    opacity: 0;
    transition: all 0.3s ease;
    font-family: sans-serif !important;
    padding: 0 10px;
    pointer-events: none !important;
    cursor: default !important;
    line-height: 1;
}

.prediction-card .status-display.active {
    opacity: 1;
    text-shadow: 0 0 20px currentColor;
    transform: scale(1.1);
}

/* --- RESPONSIVIDADE (100% RESPONSIVO) --- */
@media (max-width: 1300px) {
    body {
        padding: 10px;
    }

    .main-layout {
        flex-direction: column;
        padding: 0 10px;
        gap: 20px;
    }

    .dashboard-column, .history-column {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .card-full {
        grid-column: span 1;
    }

    .card-actions {
        min-width: 60px;
    }
}

@media (max-width: 600px) {
    .header-title {
        font-size: 24px;
    }

    .card {
        padding: 15px;
    }

    .card-actions {
        min-width: 50px;
    }

    .status-display {
        font-size: 28px !important;
    }

    .three-cols, .two-cols {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}