* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #101216;
    color: #eef1f5;
    font: 15px system-ui, Arial
}

header {
    padding: 20px max(20px, calc((100% - 900px)/2));
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #282d35;
    background: #15181d
}

header small {
    display: block;
    color: #8f98a6;
    margin-top: 3px
}

a {
    color: #cbd2dc;
    text-decoration: none
}

main {
    max-width: 900px;
    margin: 28px auto;
    padding: 0 20px
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px
}

/* O seletor 'section' já aplica o background, borda e padding aos cards */
.grid article,
section,
.login main {
    background: #171a20;
    border: 1px solid #282e37;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}

.grid small {
    color: #8f98a6
}

.grid strong {
    display: block;
    font-size: 1.45rem;
    margin: 8px 0 13px
}

/* Barras de progresso do Grid (CPU/RAM/Disco) */
.grid i {
    display: block;
    height: 5px;
    background: #303640;
    border-radius: 8px;
    overflow: hidden
}

.grid i:after {
    content: '';
    display: block;
    height: 100%;
    width: var(--w, 0);
    background: #dfe4e9;
    transition: width 0.3s ease;
}

h1 {
    margin: 0 0 3px;
    font-size: 1.5rem
}

h2 {
    font-size: 1rem;
    margin-top: 0;
}

h2 span {
    float: right;
    color: #9bd2a9;
    font-size: .8rem
}

/* ──────────────────────────────────────────
   NOVO: Estilos do Card Consumo do Plano
────────────────────────────────────────── */
.plan-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.plan-details .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.plan-details .row span {
    color: #8f98a6;
}

.plan-details hr {
    border: 0;
    border-top: 1px dashed #282e37;
    margin: 6px 0;
}

/* Barra de progresso do Plano (Maior e com cor) */
.bar-container {
    height: 8px;
    background: #20252d;
    border-radius: 8px;
    overflow: hidden;
    margin: 4px 0;
}

.bar-container i {
    display: block;
    height: 100%;
    width: var(--w, 0%);
    background: #4ade80; /* Verde dinâmico */
    border-radius: 8px;
    transition: width 0.4s ease;
}

.warning-text {
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.85rem;
    background: #2a2215;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #453314;
    text-align: center;
}

.highlight strong {
    color: #f87171;
}

.savings strong {
    color: #4ade80;
}

.btn-upgrade {
    width: 100%;
    margin-top: 6px;
    background: #22c55e;
    color: #052e16;
    padding: 11px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-upgrade:hover {
    background: #16a34a;
    color: #ffffff;
}

/* ────────────────────────────────────────── */

.stations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px
}

.stations a {
    background: #111419;
    padding: 13px;
    border-radius: 8px;
    transition: .15s
}

.stations a:hover {
    background: #20252d
}

.stations em {
    float: right;
    color: #9bd2a9;
    font-style: normal;
    font-size: .8rem
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px
}

.login main {
    width: min(390px, 100%)
}

.login h1 {
    margin-top: 24px
}

.login p,
.muted {
    color: #8f98a6
}

.login label,
.upload label {
    display: block;
    margin: 16px 0 6px;
    color: #aab3bf
}

.login input,
.upload input {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    border: 1px solid #303640;
    background: #0f1216;
    color: #fff
}

.login button,
.upload button,
.danger {
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer
}

.login button {
    width: 100%;
    margin-top: 20px
}

.error {
    background: #3b2023;
    padding: 9px;
    border-radius: 7px;
    color: #f2b8bc
}

.upload {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #282e37
}

.upload button {
    margin-top: 12px
}

.upload small {
    display: block;
    color: #8f98a6;
    margin-top: 9px
}

.table-wrap {
    overflow: auto
}

table {
    width: 100%;
    border-collapse: collapse
}

th,
td {
    text-align: left;
    padding: 12px 9px;
    border-bottom: 1px solid #282e37
}

th {
    color: #8f98a6;
    font-size: .8rem
}

.danger {
    background: #3a2023;
    color: #f1c2c5
}

.empty {
    text-align: center;
    color: #8f98a6;
    padding: 25px
}

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

    .stations {
        grid-template-columns: 1fr
    }

    main {
        margin-top: 18px
    }
}