/* Modern Dark Theme */
:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #171717;
    --bg-tertiary: #202020;
    --bg-hover: #252525;
    --accent: #10a37f;
    --accent-hover: #0e8968;
    --accent-glow: rgba(16, 163, 127, 0.2);
    --text-primary: #ececec;
    --text-secondary: #9b9b9b;
    --text-tertiary: #6e6e6e;
    --border: #2f2f2f;
    --shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Menu Button - Left Sidebar (Playground) */
.menu-toggle-left {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.15) 0%, rgba(14, 137, 104, 0.1) 100%);
    border: 1px solid rgba(16, 163, 127, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    backdrop-filter: blur(10px);
}

.menu-toggle-left:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.25) 0%, rgba(14, 137, 104, 0.15) 100%);
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(16, 163, 127, 0.3);
}

.menu-toggle-left:active {
    transform: translateY(0);
}

.menu-toggle-left .menu-text {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(16, 163, 127, 0.4);
}

/* Menu Button - Floating Left (EXPLORE TOOLS) */
.menu-toggle-right {
    position: fixed;
    top: 20px;
    left: 20px;
    height: 44px;
    padding: 0 24px;
    background: rgba(23, 23, 23, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
}

.menu-toggle-right:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 163, 127, 0.3);
    background: rgba(23, 23, 23, 0.95);
    box-shadow: 0 6px 24px rgba(16, 163, 127, 0.2);
}

.menu-toggle-right:active {
    transform: translateY(0);
}

.menu-toggle-right .menu-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(236, 236, 236, 0.5);
    text-transform: uppercase;
}

.menu-toggle-right:hover .menu-text {
    color: rgba(16, 163, 127, 0.8);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 2px;
}

.logo-text .tagline {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 4px;
    font-size: 13px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-tertiary);
    color: var(--accent);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 10px 16px 12px;
    border-top: 1px solid rgba(148,163,184,0.25);
    margin-top: auto;
    margin-bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(24, 24, 27, 0.9) 0%,
        rgba(15, 15, 18, 0.96) 100%
    );
    backdrop-filter: blur(12px);
}

/* Saat sidebar open di mobile: layar nggak ikut scroll belakangnya */
body.sidebar-open {
    overflow: hidden;
    touch-action: none;
}

/* Badge premium – modern, dark, nggak terlalu mencolok */
.premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: linear-gradient(
        135deg,
        rgba(16,185,129,0.16) 0%,
        rgba(45,212,191,0.06) 100%
    );
    border: 1px solid rgba(45,212,191,0.45);
    color: rgba(209,250,229,0.95);
    box-shadow: 0 0 8px rgba(16,185,129,0.18);
    backdrop-filter: blur(6px);
    user-select: none;
    white-space: nowrap;
}

/* Layout user compact: icon + nama + badge sejajar */
.user-info-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Nama + badge dalam satu baris */
.user-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.user-icon-small {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.user-name-compact {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Base role style (kalau nanti mau pakai role lain selain premium) */
.user-role-compact {
    font-size: 10px;
    color: var(--text-tertiary);
    padding: 2px 6px;
    background: var(--bg-secondary);
    border-radius: 4px;
    flex-shrink: 0;
}

/* Tombol logout */
.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.btn-logout svg {
    width: 16px;
    height: 16px;
}

/* MOBILE ONLY */
@media (max-width: 480px) {
    .sidebar-footer {
        margin-bottom: 55px;
    }
}


/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 24px;
    min-height: 100vh;
}

/* Hero Simple */
.hero-simple {
    text-align: center;
    padding: 50px 20px 40px;
    margin-bottom: 32px;
}

/* Hero Logo Center */
.hero-logo-center {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.hero-logo-center svg {
    width: 56px;
    height: 56px;
    color: var(--accent);
    filter: drop-shadow(0 0 16px rgba(16, 163, 127, 0.5));
}

.hero-logo-text h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #10a37f 0%, #0e8968 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.hero-logo-text p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 163, 127, 0.1);
    border: 1px solid rgba(16, 163, 127, 0.2);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
}

.status-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(16, 163, 127, 0.8);
    animation: status-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes status-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}

.status-label {
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-value-small {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-change {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.stat-change.positive {
    background: rgba(16, 163, 127, 0.1);
    color: var(--accent);
}

.stat-change.neutral {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.content-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-link:hover {
    color: var(--accent-hover);
}

/* List Container */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.list-container::-webkit-scrollbar {
    width: 4px;
}

.list-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.list-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.empty-state span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Wallet Item */
.wallet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.wallet-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.wallet-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.wallet-item-content {
    flex: 1;
    min-width: 0;
}

.wallet-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}

.wallet-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.wallet-address {
    font-size: 11px;
    color: var(--accent);
    font-family: 'Courier New', monospace;
    margin-bottom: 2px;
    word-break: break-all;
}

.wallet-meta {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* Contract Item */
.contract-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.contract-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.contract-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.2) 0%, rgba(14, 137, 104, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contract-icon svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.contract-content {
    flex: 1;
    min-width: 0;
}

.contract-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.contract-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-secondary);
}

.contract-badge {
    padding: 2px 6px;
    background: rgba(16, 163, 127, 0.15);
    color: var(--accent);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.contract-address {
    font-family: 'Courier New', monospace;
    color: var(--accent);
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.action-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.action-item:hover:not(.disabled) {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.action-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-icon {
    width: 40px;
    height: 40px;
    background: rgba(16, 163, 127, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.action-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.action-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Color Variants */
.color-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.color-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.color-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.color-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.color-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.1);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, #0e8968 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 163, 127, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.btn-danger svg {
    width: 14px;
    height: 14px;
}

/* Badge Count */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: rgba(16, 163, 127, 0.15);
    color: var(--accent);
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
}

/* Wallet & Contract Card Detailed */
.wallet-list-detailed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-card-detailed {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s;
}

.wallet-card-detailed:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(16, 163, 127, 0.1);
}

.wallet-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wallet-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.wallet-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.wallet-card-body {
    margin-bottom: 12px;
}

.wallet-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.wallet-info-label {
    color: var(--text-tertiary);
    min-width: 80px;
}

.wallet-info-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
}

.wallet-meta-text {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Log Container */
.log-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
}

.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.log-empty {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    padding: 40px 20px;
}

/* Log Entry */
.log-entry {
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.6;
    border-left: 3px solid transparent;
    transition: transform 0.2s ease;
}

.log-entry:hover {
    transform: translateX(2px);
}

.log-entry .log-time {
    color: var(--text-tertiary);
    font-size: 11px;
    margin-right: 10px;
    font-weight: 600;
}

.log-info {
    background: rgba(16, 163, 127, 0.08);
    border-left-color: var(--accent);
    color: var(--text-primary);
}

.log-success {
    background: rgba(34, 197, 94, 0.08);
    border-left-color: #22c55e;
    color: #22c55e;
}

.log-error {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: #ef4444;
    color: #ef4444;
}

.log-warning {
    background: rgba(251, 191, 36, 0.08);
    border-left-color: #fbbf24;
    color: #fbbf24;
}

.log-entry strong {
    color: var(--accent);
    font-weight: 700;
}

.log-entry code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #0e8968 100%);
    border-radius: 20px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

#progressText {
    font-weight: 700;
    color: var(--accent);
}

#progressStatus {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

#clearLogs {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

#clearLogs:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* RPC List */
.rpc-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.rpc-list-item:hover {
    border-color: var(--accent);
}

.rpc-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rpc-info p {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.rpc-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg-tertiary);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.page-footer {
    margin-top: 32px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.page-footer p {
    font-size: 12px;
    color: var(--text-tertiary);
}

.author {
    color: var(--accent);
    font-weight: 600;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Responsive */
@media (max-width: 1024px) {
    .menu-toggle-right {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header {
        padding-top: 75px;  /* ← Kurangi dari 80px jadi 75px */
        padding-bottom: 16px;
    }

    .main-content {
        margin-left: 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
        padding-top: 75px;  /* ← Sesuaikan dengan sidebar */
    }

    .hero-logo-text h1 {
        font-size: 36px;
    }

    .hero-logo-center svg {
        width: 48px;
        height: 48px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .progress-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .log-container {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .hero-logo-text h1 {
        font-size: 28px;
    }

    .hero-logo-center {
        gap: 12px;
    }

    .hero-logo-center svg {
        width: 40px;
        height: 40px;
    }

    .hero-logo-text p {
        font-size: 11px;
        letter-spacing: 1.5px;
    }

    .menu-toggle-right {
        padding: 0 20px;
        height: 40px;
        left: 16px;
        top: 16px;
    }

    .menu-toggle-right .menu-text {
        font-size: 10px;
        letter-spacing: 1.8px;
    }

    .sidebar-header {
        padding-top: 65px;  /* ← Mobile lebih kecil lagi */
        padding-bottom: 12px;
    }

    .main-content {
        padding-top: 65px;
    }
}

/* Badge variations */
.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Progress bar in list items */
.contract-item .progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.contract-item .progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #10b981 100%);
    transition: width 0.3s ease;
}

/* Clickable job items */
.contract-item[onclick] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contract-item[onclick]:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* Modern Mode Selector - UNIQUE TO DEPLOY PAGE */
        .mode-selector {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 16px;
        }

        .mode-option {
            position: relative;
        }

        .mode-option input[type="radio"] {
            display: none;
        }

        .mode-label {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 16px;
            border: 2px solid rgba(99, 102, 241, 0.2);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            background: rgba(99, 102, 241, 0.02);
        }

        .mode-option input[type="radio"]:checked + .mode-label {
            border-color: #6366f1;
            background: rgba(99, 102, 241, 0.1);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
            transform: scale(1.02);
        }

        .mode-label:hover {
            border-color: rgba(99, 102, 241, 0.4);
            background: rgba(99, 102, 241, 0.05);
        }

        .mode-icon {
            width: 28px;
            height: 28px;
            color: #6366f1;
        }

        .mode-text {
            font-weight: 500;
            font-size: 13px;
            color: #fff;
        }

        .mode-desc {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            text-align: center;
        }

        .mode-option input[type="radio"]:checked + .mode-label .mode-icon {
            color: #4f46e5;
            filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.5));
        }

        /* Worker Setting Group - UNIQUE TO DEPLOY PAGE */
        .worker-group {
            display: none;
            padding: 12px;
            background: rgba(99, 102, 241, 0.05);
            border: 1px solid rgba(99, 102, 241, 0.2);
            border-radius: 6px;
            margin-bottom: 16px;
        }

        .worker-group.show {
            display: block;
        }

        .worker-group label {
            display: block;
            margin-bottom: 8px;
            font-size: 12px;
            color: #999;
        }

        .worker-group input[type="range"] {
            width: 100%;
            cursor: pointer;
        }

        .worker-value {
            text-align: center;
            font-weight: 600;
            color: #6366f1;
            margin-top: 8px;
        }

        @media (max-width: 640px) {
            .mode-selector {
                grid-template-columns: 1fr;
            }
        }
        
/* ========== Danger Zone Collapsible ========== */
/* Header-nya biar tinggi simetris */
.danger-zone-header {
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;         /* boleh 12px biar lebih kompak */
    background: rgba(255, 59, 48, 0.04);
}

.danger-zone-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.danger-zone-content.show {
    max-height: 280px; /* ✅ Ganti dari 250px → 280px */
}

.danger-zone-toggle {
    transition: transform 0.3s ease;
}

.danger-zone-toggle.active {
    transform: rotate(180deg);
}


/* ========== Button Refresh ========== */
.btn-refresh {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-refresh:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
}

.btn-refresh:active {
    transform: rotate(180deg);
}

/* ========== Modern Clear Button ========== */
.btn-clear-all-modern {
    background: linear-gradient(135deg, #ff3b30 0%, #ff453a 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-clear-all-modern:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,59,48,0.3);
}

.btn-clear-all-modern:active:not(:disabled) {
    transform: translateY(0);
}

.btn-clear-all-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 🔧 Container header (label + tombol) */
.gas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.gas-label {
  font-weight: 500;
  color: #e5e7eb;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.hint {
  opacity: 0.6;
  font-size: 11px;
}

/* 🟩 Tombol toggle Auto/Manual */
.gas-toggle {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.25s ease;
  background: #1e293b;
  color: #9ca3af;
  border: 1px solid rgba(255,255,255,0.1);
}

.gas-toggle.btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 0 10px rgba(34,197,94,0.4);
}

.gas-toggle.btn-secondary:hover {
  background: #2d323f;
  color: #d1d5db;
}

/* ⛽ Input Gas */
.gas-input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #111317;
  color: #fff;
  font-size: 13px;
  transition: all 0.25s ease;
}

.gas-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.2);
}

/* 🔒 Saat AUTO mode (readonly) */
.gas-input.gas-readonly {
  background: rgba(255,255,255,0.04);
  color: #9ca3af;
  cursor: not-allowed;
  border: 1px dashed rgba(255,255,255,0.1);
  box-shadow: none;
  filter: blur(0.3px);
}

/* 🧠 Keterangan kecil */
.gas-hint {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary); /* sama persis */
  font-size: 12px;
}

/* 🌿 Inline code di gas-hint */
.gas-hint code {
  background: rgba(255,255,255,0.05); /* sedikit lebih gelap background-nya */
  padding: 2px 5px;
  border-radius: 4px;
  color: #16a34a; /* tone hijau lebih dalam */
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
}

/* 🧩 Global inline code style (seragam di semua hint form) */
.form-group small code,
.worker-group small code {
  background: rgba(255,255,255,0.05);
  padding: 2px 5px;
  border-radius: 4px;
  color: #16a34a; /* hijau tua, biar tidak terlalu neon */
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
}