:root {
    --bg-base: #0a0e14;
    --bg-card: rgba(18, 26, 38, 0.45);
    --border-glass: rgba(0, 240, 255, 0.15);
    --accent-cyan: #00f0ff;
    --accent-green: #39ff14;
    --accent-warning: #ffb700;
    --accent-danger: #ff3366;
    --text-primary: #ffffff;
    --text-secondary: #90a4ae;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    padding-bottom: 24px;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism utility card */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.hidden {
    display: none !important;
}

.container-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

.text-center {
    text-align: center;
}

.text-success { color: var(--accent-green) !important; }
.text-warning { color: var(--accent-warning) !important; }
.text-danger { color: var(--accent-danger) !important; }
.mt-1 { margin-top: 16px; }

/* Spinner loader */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 240, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-cyan);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    display: inline-block;
    animation: spin 1.5s linear infinite;
}

/* Card components */
.card {
    padding: 20px;
    margin-bottom: 16px;
}

/* Header UI */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glass);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-hex {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-cyan), #0077ff);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sub-title {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
}

/* Navigation tabs */
.app-nav {
    display: flex;
    padding: 8px 16px;
    gap: 8px;
    background: rgba(10, 14, 20, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-glass);
}

.nav-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-tab i {
    font-size: 16px;
}

.nav-tab.active {
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
}

/* App content area */
.app-content {
    padding: 20px;
}

/* Balance Card inside Wallet */
.balance-card {
    padding: 24px;
    background: linear-gradient(135deg, rgba(18, 26, 38, 0.7), rgba(10, 14, 20, 0.7));
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.card-label {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

#total-balance {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 800;
    margin: 8px 0 16px 0;
    color: var(--text-primary);
}

.balance-row {
    display: flex;
    border-top: 1px solid var(--border-glass);
    padding-top: 16px;
    gap: 24px;
}

.balance-sub {
    flex: 1;
}

.sub-label {
    font-size: 10px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}

.sub-val {
    font-size: 15px;
    font-weight: 700;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: rgba(57, 255, 20, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.badge-warning {
    background: rgba(255, 183, 0, 0.1);
    color: var(--accent-warning);
    border: 1px solid rgba(255, 183, 0, 0.2);
}

.badge-danger {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-success .dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
}

/* Buttons */
.btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-large {
    width: 100%;
    padding: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #0077ff);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.1);
}

.action-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Progress bar */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Logs UI */
.log-container {
    max-height: 240px;
    overflow-y: auto;
    margin-top: 12px;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.log-item:last-child {
    border-bottom: none;
}

.log-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.log-title {
    font-weight: 600;
}

.log-time {
    font-size: 10px;
    color: var(--text-secondary);
}

.log-val {
    font-weight: 700;
}

.empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
    color: var(--text-secondary);
    font-size: 12px;
    gap: 8px;
}

.empty-placeholder i {
    font-size: 24px;
    opacity: 0.5;
}

/* Node layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 12px;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.03);
}

/* Shops layout */
.search-bar-container {
    position: relative;
    margin-bottom: 16px;
}

#shop-search {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: white;
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

#shop-search:focus {
    border-color: var(--accent-cyan);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
}

.shops-table-container {
    overflow-x: auto;
}

.shops-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.shops-table th {
    padding: 12px 8px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-glass);
}

.shops-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0d1522;
    background: rgba(13, 21, 34, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.shops-table td {
    padding: 14px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.shops-table tr:last-child td {
    border-bottom: none;
}

.shop-name-cell {
    font-weight: 600;
}

.shop-engine-cell {
    text-transform: capitalize;
    color: var(--text-secondary);
}

.large-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.text-cyan { color: var(--accent-cyan) !important; }

.ads-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ads-grid-top {
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 1.2fr;
    gap: 8px;
    margin-bottom: 8px;
}

.ads-grid-bottom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ads-stat {
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.ads-val {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-top: 4px;
    display: block;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Custom Sleek Scrollbar */
#chat-logs-container::-webkit-scrollbar,
#vps-console-log::-webkit-scrollbar {
    width: 5px;
}
#chat-logs-container::-webkit-scrollbar-track,
#vps-console-log::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
#chat-logs-container::-webkit-scrollbar-thumb,
#vps-console-log::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.25);
    border-radius: 4px;
}
#chat-logs-container::-webkit-scrollbar-thumb:hover,
#vps-console-log::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 254, 0.5);
}

/* VPS Console Output Styling */
#vps-console-log {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, 'Roboto Mono', monospace !important;
    font-size: 9.5px !important;
    line-height: 1.45 !important;
    letter-spacing: -0.01em;
    color: #cbd5e1 !important;
    -webkit-font-smoothing: antialiased;
}

/* Nav Alert Pulse Dot */
@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}


/* ===== PANTAU VPS (7 Okt 2026) ===== */
.pantau-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.pantau-sel {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 6px 8px;
    min-width: 0;
}
.pantau-sel .k { font-size: 9px; font-weight: 700; color: #a0aec0; letter-spacing: 0.05em; text-transform: uppercase; }
.pantau-sel .v { font-size: 12px; font-weight: 800; color: #fff; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pantau-sel .s { font-size: 9px; color: #718096; margin-top: 1px; }
.pantau-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); margin-top: 4px; overflow: hidden; }
.pantau-bar > span { display: block; height: 100%; border-radius: 2px; background: #48bb78; }
.pantau-bot {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
}
.pantau-bot .baris { display: flex; align-items: center; gap: 8px; }
.pantau-bot .ikon {
    width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.pantau-bot .nama { font-size: 12px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pantau-bot .tugas { font-size: 9.5px; color: #90a4ae; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pantau-bot .status {
    font-size: 9px; font-weight: 800; padding: 3px 7px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; letter-spacing: 0.03em;
}
.pantau-hijau  { color: #48bb78; background: rgba(72,187,120,0.14);  border: 1px solid rgba(72,187,120,0.35); }
.pantau-merah  { color: #f87171; background: rgba(248,113,113,0.16); border: 1px solid rgba(248,113,113,0.4); }
.pantau-kuning { color: #facc15; background: rgba(250,204,21,0.14);  border: 1px solid rgba(250,204,21,0.35); }
.pantau-abu    { color: #a0aec0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); }
.pantau-bot .rinci { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; font-size: 9.5px; color: #a0aec0; }
.pantau-bot .rinci b { color: #cbd5e1; font-weight: 700; }
.pantau-bot pre.log {
    display: none; margin: 8px 0 0; padding: 8px 10px; background: rgba(0,0,0,0.45); border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08); font-size: 9px; line-height: 1.45; color: #cbd5e1;
    white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow-y: auto; text-align: left;
}
.pantau-bot.buka pre.log { display: block; }
