/* ========================================
   CARD VPS STATUS COMPLETO
   ======================================== */

.vps-status-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.vps-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.vps-logo {
    width: 48px;
    height: 48px;
    font-size: 2.5rem;
}

.vps-info h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.vps-plan {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.vps-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

/* Centralizar último card quando fica sozinho na linha */
.metric-card:last-child:nth-child(odd) {
    place-self: center;
    width: calc((100% - 32px) / 3);
    /* Mantém largura de 1 célula do grid (3 colunas com gap 16px) */
    min-width: 240px;
}

@media (max-width: 900px) {
    .metric-card:last-child:nth-child(odd) {
        width: calc((100% - 16px) / 2);
        /* 2 colunas em telas médias */
    }
}

@media (max-width: 600px) {
    .metric-card:last-child:nth-child(odd) {
        width: 100%;
        /* 1 coluna em mobile */
    }
}

.metric-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-icon {
    font-size: 1.2rem;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.metric-subtext {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Mini gráfico (sparkline SVG) */
.metric-graph {
    height: 50px;
    width: 100%;
    position: relative;
    margin-top: 12px;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
}

.sparkline-path {
    fill: none;
    stroke: url(#gradient-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.8;
}

.sparkline-area {
    fill: url(#gradient-area);
    opacity: 0.2;
}

/* Gráfico circular (donut) */
.metric-donut {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto;
}

.donut-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0deg,
            var(--primary) calc(var(--percentage) * 3.6deg),
            rgba(100, 116, 139, 0.2) calc(var(--percentage) * 3.6deg),
            rgba(100, 116, 139, 0.2) 360deg);
    position: relative;
}

.donut-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: var(--card-bg);
    border-radius: 50%;
}

.donut-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 1;
}

/* Barra de progresso aprimorada */
.metric-progress {
    width: 100%;
    height: 8px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.metric-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.metric-progress-fill.low {
    background: var(--gradient-success);
}

.metric-progress-fill.medium {
    background: var(--gradient-warning);
}

.metric-progress-fill.high {
    background: var(--gradient-danger);
}

/* Hostname especial */
.hostname-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.system-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}