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

/* ================= VARIÁVEIS ================= */
:root {
    --bg: #020617;
    --card: #020617;
    --border: #1e293b;
    --text: #e5e7eb;
    --muted: #94a3b8;

    --ok: #22c55e;
    --warn: #facc15;
    --danger: #ef4444;

    --radius: 16px;
}

/* ================= BODY ================= */
body {
    font-family: "Inter", Arial, sans-serif;
    background: radial-gradient(circle at top, #020617, #000);
    color: var(--text);
    min-height: 100vh;
    padding: 32px;
}

/* ================= HEADER ================= */
.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.top h1 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.btn-upload {
    background: #2563eb;
    padding: 10px 18px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-upload:hover {
    background: #1d4ed8;
}

/* ================= SCAN ================= */
.scan-box {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.scan-box input {
    flex: 1;
    max-width: 360px;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #020617;
    color: var(--text);
    font-size: 1rem;
}

.scan-box input::placeholder {
    color: var(--muted);
}

.scan-box button {
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--ok), #4ade80);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    color: #022c22;
    transition: 0.2s ease;
}

.scan-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(34,197,94,0.35);
}

/* ================= RESULTS GRID ================= */
#results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

/* ================= CARD ================= */
.card {
    background: linear-gradient(180deg, #020617, #020617f2);
    border-radius: var(--radius);
    padding: 24px;
    border-left: 8px solid;
    box-shadow: 0 18px 40px rgba(0,0,0,0.65);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* STATUS COLORS */
.card.ok { border-color: var(--ok); }
.card.atencao { border-color: var(--warn); }
.card.critico { border-color: var(--danger); }

/* ================= CARD CONTENT ================= */
.card h3 {
    font-size: 1.1rem;
    line-height: 1.35;
    margin-bottom: 4px;
}

.card p {
    font-size: 0.9rem;
    color: var(--muted);
}

.card p b {
    color: var(--text);
}

/* ================= HIGHLIGHT AREA ================= */
.highlight {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.highlight div {
    text-align: center;
    flex: 1;
}

.highlight span {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.5px;
}

.highlight strong {
    font-size: 1.5rem;
    font-weight: 800;
}

/* ================= STATUS BADGE ================= */
.status-badge {
    margin-top: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-block;
    color: #020617;
}

.card.ok .status-badge { background: var(--ok); }
.card.atencao .status-badge { background: var(--warn); }
.card.critico .status-badge { background: var(--danger); }

/* ================= RESPONSIVO ================= */
@media (max-width: 600px) {
    body {
        padding: 20px;
    }

    .scan-box {
        flex-direction: column;
    }

    .scan-box input {
        max-width: 100%;
    }
}


.cone {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid #fff;
}

.cone.black { background: black; }
.cone.blue { background: #2563eb; }
.cone.yellow { background: #facc15; }
.cone.green { background: #22c55e; }
.cone.orange { background: #fb923c; }
.cone.white { background: white; }
.cone.pink { background: #ec4899; }

.highlight {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    background: #0f172a;
    padding: 12px;
    border-radius: 10px;
}

.highlight span {
    font-size: 12px;
    color: #94a3b8;
}

.highlight strong {
    font-size: 20px;
    display: block;
}


.cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.dash-card {
    flex: 1;
    padding: 20px;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
}

.dash-card.ok { background: #22c55e20; border: 2px solid #22c55e; }
.dash-card.atencao { background: #facc1520; border: 2px solid #facc15; }
.dash-card.critico { background: #ef444420; border: 2px solid #ef4444; }

.cone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.cone-card {
    background: #0f172a;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.cone-label {
    font-size: 14px;
    color: #94a3b8;
}

.cone-count {
    font-size: 28px;
    font-weight: bold;
}


.chart-wrapper {
    max-width: 600px;
    margin: 40px auto;
}

canvas {
    width: 100% !important;
    height: 400px !important;
}

.cone-indicator {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    color: #000;
}