﻿body {
    background: #0f172a;
    color: #e2e8f0;
    font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
}

header {
    background: #020617;
    padding: 10px 15px;
    font-size: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.logo {
    font-family: 'Trebuchet MS', sans-serif;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.balance {
    color: #facc15;
}

.saldo {
    font-weight: bold;
}

.container {
    padding: 20px;
    padding-bottom: 80px;
}

button {
    background: #1e293b;
    color: white;
    font-size: 14px !important;
    padding: 10px 16px !important;
    border-radius: 9px !important;
    transition: all 0.3s ease !important;
    border: 1px solid #38bdf8 !important;
    margin-right: 10px;
    cursor: pointer;
    border: 1px solid #38bdf8 !important;
}

    button:hover {
        background: linear-gradient(135deg, #0ea5e9, #0284c7);
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    }

.btn-reset {
    border-color: #f87171 !important;
}

    .btn-reset:hover {
        background: #ff5b5b !important; /* SEU VERMELHO ORIGINAL */
        color: white !important;
        border-color: #ff5b5b !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(255, 91, 91, 0.5) !important;
    }

input {
    padding: 8px;
    background: #020617;
    border: 1px solid #334155;
    color: white;
    border-radius: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #020617;
    padding: 10px;
}

td {
    padding: 10px;
    text-align: center;
}

tr:nth-child(even) {
    background: #020617;
}

.pnlpos {
    color: #22c55e;
}

.pnlneg {
    color: #ef4444;
}

.buyText {
    color: #38bdf8 !important;
}

.card {
    background: #020617;
    padding: 5px;
    border-radius: 8px;
    margin-top: 2px;
}

.statusLine {
    display: flex;
    justify-content: space-between;
}

span {
    font-size: 18px;
}

.sell-btn {
    background-color: #ef4444 !important; /* vermelho */
    color: white !important;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

    .sell-btn:hover {
        background-color: #f87171 !important; /* vermelho mais claro */
        color: white !important;
    }

#resumo {
    padding: 0 15px; /* esquerda e direita */
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #020617;
    color: #64748b;
    padding: 5px;
    font-size: 14px;
    border-top: 1px solid #1e293b;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    align-items: start;
    padding: 10px;
}

/* Lado esquerdo */
.card-left {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    padding: 5px;
    border: 1px solid #475569;
    font-size: 14px;
    font-weight: 700;
}

/* Lado direito */
.card-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Grupos de controle */
.control-group {
    background: rgba(30, 41, 59, 0.8);
    padding: 5px;
    border-radius: 10px;
    border: 1px solid #475569;
    backdrop-filter: blur(10px);
}

.control-label {
    font-size: 14px;
    color: #94a3b8;
    white-space: nowrap;
    padding: 10px 12px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid #475569;
    border-radius: 8px;
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 10px;
    border: 1px solid #475569;
}

.status-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-text {
    font-size: 16px;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid #38bdf8;
}

.toggle-btn {
    font-weight: 700 !important;
    font-size: 14px !important;
    padding: 10px 16px !important;
    border-radius: 9px !important;
    transition: all 0.3s ease !important;
    border: 1px solid #38bdf8 !important;
    cursor: pointer !important;
    min-width: 100px !important;
    text-align: center !important;
    color: white !important;
}

    .toggle-btn.on:hover {
        background: #ef4444 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
    }

    .toggle-btn.off:hover {
        background: #22c55e !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4) !important;
    }

    .toggle-btn:active {
        transform: translateY(0) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    }

#toggleBtn {
    width: 100% !important;
    max-width: 240px !important;
    margin: 0 auto !important;
    display: block !important;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.value-display {
    color: #facc15;
    background: rgba(250, 204, 21, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #facc15;
    width: 100px;
    height: 20px;
    text-align: center;
    font-size: 17px;
}

.input-modern {
    flex: 1;
    width: 90px;
    min-width: 90px;
    max-width: 100px;
    padding: 10px 14px;
    font-size: 16px;
    text-align: center;
    border: 2px solid #475569;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .input-modern:focus {
        outline: none;
        border-color: #38bdf8;
        box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
    }

.hidden-input {
    display: none;
}

/* Responsivo */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
