/* ==========================================
   EMBED DASHBOARD — CSS MINIMALIS
========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    /* Ubah padding bawah body menjadi lebih kecil, misal 8px atau 4px */
    padding: 16px 16px 8px 16px; 
    font-size: 13px;
}


.embed-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================
   HEADER
========================================== */
.embed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 12px;
    border: 1px solid #1e293b;
    margin-bottom: 14px;
}
.embed-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}
.embed-title strong {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}
.dot-live {
    position: relative;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-live::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #10b981;
    animation: pulseRing 1.8s ease-out infinite;
}
@keyframes pulseRing {
    0%   { transform: scale(1); opacity: .8; }
    100% { transform: scale(3); opacity: 0; }
}
.embed-date {
    font-size: 11px;
    color: #94a3b8;
}

/* ==========================================
   STAT CARDS
========================================== */
.embed-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.stat-card {
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid;
    position: relative;
    overflow: hidden;
}
.stat-card.blue {
    background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(139,92,246,.08));
    border-color: rgba(59,130,246,.3);
}
.stat-card.green {
    background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(5,150,105,.08));
    border-color: rgba(16,185,129,.3);
}
.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #94a3b8;
    margin-bottom: 6px;
}
.stat-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.5px;
}
.stat-card.blue .stat-value { color: #60a5fa; }
.stat-card.green .stat-value { color: #34d399; }
.stat-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ==========================================
   TABEL
========================================== */
.embed-table-wrap {
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    overflow: hidden;
    margin-bottom: 14px;
}
.table-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    font-weight: 600;
    font-size: 13px;
}
.badge-live {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(16,185,129,.2);
    color: #34d399;
    border: 1px solid rgba(16,185,129,.4);
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .6; }
}

.embed-table {
    width: 100%;
    border-collapse: collapse;
}
.embed-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #94a3b8;
    background: #0f172a;
    border-bottom: 1px solid #334155;
}
.embed-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #334155;
    font-size: 12px;
}
.embed-table tbody tr:hover {
    background: rgba(59,130,246,.06);
}
.embed-table tbody tr:last-child td { border-bottom: 1px solid #334155; }
.embed-table tfoot td {
    padding: 12px;
    background: #0f172a;
    border-top: 2px solid #334155;
    font-size: 13px;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.bold { font-weight: 700; }
.mono { font-family: 'Courier New', monospace; }
.muted { color: #94a3b8; }
.blue-text { color: #60a5fa; }

/* ==========================================
   FOOTER
========================================== */

.embed-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
    padding: 4px 4px 0 4px; /* Rapatkan padding atas-bawah footer */
}

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 600px) {
    body { padding: 8px; font-size: 12px; }
    .embed-stats { grid-template-columns: 1fr; }
    .stat-value { font-size: 26px; }
    .embed-table th,
    .embed-table td { padding: 8px 6px; font-size: 11px; }
    .embed-table th:nth-child(3),
    .embed-table td:nth-child(3) { display: none; }
}