/* ==========================================================================
   TRIPLEA BID - COMPLETE DESIGN SYSTEM & STYLESHEET
   Modern Fintech Aesthetics, High-Contrast Dark Mode & Accessible Design
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Core Theme Colors (Dark Default) */
  --bg-base: #0a0e17;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-hover: #232f48;
  --bg-input: #151d2f;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-focus: #3b82f6;

  /* Legacy & Variable Aliases */
  --panel: #111827;
  --panel-2: #1e293b;
  --panel-3: #2a374f;
  --text: #f8fafc;
  --muted: #94a3b8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Accent & Status Palettes */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-active: #1d4ed8;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);

  --success: #10b981;
  --success-hover: #059669;
  --success-glow: rgba(16, 185, 129, 0.35);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);

  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-glow: rgba(245, 158, 11, 0.35);

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-glow: rgba(239, 68, 68, 0.35);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout & Sizing */
  --sidebar-width: 270px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);
}

[data-theme="light"] {
  --bg-base: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-surface-hover: #e2e8f0;
  --bg-input: #ffffff;
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #2563eb;

  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --panel-3: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Base Reset & Styling */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--panel-2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

/* ==========================================================================
   AUTH PAGE & LOGIN CARD
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 15%, rgba(59, 130, 246, 0.18), transparent 60%),
              radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.12), transparent 50%),
              var(--bg-base);
  padding: 24px;
  position: relative;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(12px);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--primary-gradient);
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px var(--primary-glow);
}

.auth-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 13px;
}

/* Dummy Login Demo Banner */
.demo-badge-card {
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.demo-badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-creds {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
}

.btn-autofill {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-autofill:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  background: var(--bg-input);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.auth-tab {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--text-main);
}

.auth-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.25s ease-out forwards;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 12px;
}

/* ==========================================================================
   MAIN DASHBOARD LAYOUT & SIDEBAR
   ========================================================================== */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  position: relative;
}

.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.brand-text p {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.sidebar nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link svg, .nav-link .nav-icon {
  font-size: 18px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.nav-link:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.nav-link:hover svg, .nav-link:hover .nav-icon {
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.nav-link.active svg, .nav-link.active .nav-icon {
  color: white;
}

/* Sidebar Footer / User Profile & Status */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-avatar-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.user-name-role {
  overflow: hidden;
}

.user-name-role .uname {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-name-role .urole {
  font-size: 11px;
  color: var(--text-dim);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: var(--danger);
  color: white;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.status-pill.running .dot {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse 1.5s infinite;
}

.status-pill.running {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   MAIN CONTENT AREA & TOP BAR
   ========================================================================== */
.content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-base);
}

.top-bar {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(8px);
}

.page-title h2 {
  font-size: 18px;
  font-weight: 800;
}

.page-title p {
  font-size: 12px;
  color: var(--text-dim);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.clock-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.mode-badge.simulation {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.mode-badge.live-active {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulse 1.8s infinite;
}

.btn-icon {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.btn-icon:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

/* Tabs Container */
.tab-container {
  padding: 32px;
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
  animation: fadeIn 0.25s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.55; }
  100% { opacity: 1; }
}

/* ==========================================================================
   CARDS & SECTIONS
   ========================================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.card:hover {
  border-color: var(--border-medium);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.card-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.card-header p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Stats Metric Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0.6;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.stat-card.stat-success::after { background: var(--success-gradient); }
.stat-card.stat-danger::after { background: var(--danger-gradient); }

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-icon {
  font-size: 18px;
  opacity: 0.7;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* Quick Actions Button Bar */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   FORM CONTROLS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: 18px;
}

.form-group label, label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-group .hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: var(--bg-surface);
}

input::placeholder {
  color: var(--text-dim);
}

/* Input with action inside / button next to input */
.input-with-button {
  display: flex;
  gap: 10px;
}

.input-with-button input {
  flex: 1;
}

.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrap input {
  padding-right: 44px;
}

.btn-toggle-eye {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
  border-radius: 4px;
}

.btn-toggle-eye:hover {
  color: var(--text-main);
}

/* Indonesian Currency Terbilang Badge */
.terbilang-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terbilang-box .icon {
  font-size: 15px;
}

/* Quick budget chips */
.chips-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-chip:hover {
  background: var(--bg-surface-hover);
  color: var(--primary);
  border-color: var(--primary);
}

/* Mode Selection Cards (Dry Run vs Live) */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.mode-card {
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.mode-card:hover {
  border-color: var(--border-medium);
}

.mode-card.active {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
}

.mode-card.live.active {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

.mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mode-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Checkbox and toggle styling */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn.primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn.primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn.success {
  background: var(--success-gradient);
  color: white;
  box-shadow: 0 4px 14px var(--success-glow);
}

.btn.success:hover {
  background: var(--success-hover);
}

.btn.danger {
  background: var(--danger-gradient);
  color: white;
  box-shadow: 0 4px 14px var(--danger-glow);
}

.btn.danger:hover {
  background: var(--danger-hover);
}

.btn.warning {
  background: var(--warning);
  color: #111;
  box-shadow: 0 4px 14px var(--warning-glow);
}

.btn.secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
}

.btn.secondary:hover {
  background: var(--bg-surface-hover);
}

.btn.lg {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   AUCTION LOT DETAILS & PHOTO GALLERY
   ========================================================================== */
.lot-preview-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 18px;
}

.gallery-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-image-wrap {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #000;
}

.main-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.main-image-wrap:hover img {
  transform: scale(1.05);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  background: #000;
  padding: 0;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active {
  border-color: var(--primary);
}

.lot-info-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lot-header {
  margin-bottom: 12px;
}

.lot-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 6px;
}

.lot-meta-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-kpknl {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-status-active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-status-ended {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.lot-price-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
  background: rgba(0, 0, 0, 0.2);
  padding: 14px;
  border-radius: var(--radius-md);
}

.price-item .p-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.price-item .p-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.countdown-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--warning);
}

/* ==========================================================================
   CONSOLE / TERMINAL LOG STREAM
   ========================================================================== */
.logs-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips {
  display: flex;
  gap: 6px;
}

.filter-chip {
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover {
  color: var(--text-main);
}

.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.logs {
  background: #060911;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  height: 380px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.03);
}

.log-time {
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.log-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.log-badge.info { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.log-badge.success { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.log-badge.warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.log-badge.error { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.log-msg {
  color: #e2e8f0;
  word-break: break-word;
  line-height: 1.4;
}

/* ==========================================================================
   DATA TABLES (USER MANAGEMENT & BID HISTORY)
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

table th {
  background: var(--bg-surface-elevated);
  padding: 13px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

table td {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.status-tag.success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.status-tag.failed {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.user-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.action-btn.edit {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.action-btn.edit:hover {
  background: var(--primary);
  color: white;
}

.action-btn.delete {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-btn.delete:hover {
  background: var(--danger);
  color: white;
}

/* User table custom grid */
.user-table {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 2fr 1.2fr 1.2fr;
  background: var(--bg-surface-elevated);
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.table-body .table-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1.2fr 1.2fr;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s;
}

.table-body .table-row:hover {
  background: var(--bg-surface-hover);
}

/* ==========================================================================
   ALERTS, TOASTS & MODALS
   ========================================================================== */
.result-box, .alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-box.ok, .alert-box.ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.result-box.error, .alert-box.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

/* Toast Container */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  animation: slideIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modal Backdrop & Dialog */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: fadeIn 0.2s ease;
}

#confirmModal, #promptModal {
  z-index: 2200;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 32px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  position: relative;
  margin: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Dialog animation & sizing (proper popups) ---------- */
.modal-content.opening {
  animation: dialogIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-content.closing {
  animation: dialogOut 0.16s ease-in forwards;
}
@keyframes dialogIn {
  from { transform: translateY(14px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes dialogOut {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to   { transform: translateY(10px) scale(0.97); opacity: 0; }
}

.modal-content.dialog-sm { max-width: 460px; }
.modal-content.modal-lg { max-width: 960px; width: 92vw; }
.modal-content.modal-xl { max-width: 1180px; width: 95vw; }

.dialog-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}
.dialog-icon.danger { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.4); }
.dialog-icon.warning { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.4); }
.dialog-icon.primary { background: rgba(59, 130, 246, 0.14); border-color: rgba(59, 130, 246, 0.4); }
.dialog-icon.success { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.4); }

.dialog-message {
  line-height: 1.65;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 4px 0;
}
.dialog-message strong { color: var(--text-main); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-shrink: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

/* header dengan dialog-icon: ikon + judul rapat kiri, tombol close kanan */
.modal-header:has(.dialog-icon) { justify-content: flex-start; gap: 12px; }
.modal-header:has(.dialog-icon) .modal-close { margin-left: auto; }

.modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--danger-glow);
  color: #fff;
  border-color: var(--danger);
}

.modal-content > form,
.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  margin-right: -4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-content > form::-webkit-scrollbar,
.modal::-webkit-scrollbar {
  width: 6px;
}

.modal-content > form::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content > form::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.modal-content > form::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: var(--bg-surface);
  z-index: 10;
}

/* Modal Form Ergonomics & Responsive Grids */
.modal-content .form-group {
  margin-bottom: 0;
}

.modal-content .form-group label {
  margin-bottom: 5px;
  font-size: 12.5px;
}

.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content input[type="number"],
.modal-content select {
  padding: 10px 12px;
  font-size: 13.5px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.compact-card-section {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toggle-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  user-select: none;
}

.toggle-card:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.toggle-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Collapsible Advanced Timing Details */
.advanced-details {
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.advanced-details[open] {
  border-style: solid;
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.03);
}

.advanced-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.advanced-summary::-webkit-details-marker {
  display: none;
}

.advanced-summary:hover {
  color: var(--primary);
}

.advanced-summary .summary-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-surface-hover);
  color: var(--text-dim);
  font-weight: 500;
}

.advanced-body {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 640px) {
  .form-row-2,
  .form-row-3,
  .toggles-grid {
    grid-template-columns: 1fr;
  }
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 44px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state-description {
  font-size: 13px;
  color: var(--text-dim);
}

/* Utilities */
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 240px 1fr;
  }
  .lot-preview-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: relative;
  }
  .top-bar {
    padding: 0 16px;
  }
  .tab-container {
    padding: 20px 16px;
  }
  .mode-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .table-header, .table-body .table-row {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   MULTI-BOT UI — WIZARD, BOT CARDS, P&L (append v2)
   ========================================================================== */

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-toolbar-text {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
}

.nav-badge {
  margin-left: auto;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  padding: 1px 9px;
  min-width: 24px;
  text-align: center;
}
.nav-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

.status-pill.active .dot { background: var(--success); box-shadow: 0 0 10px var(--success-glow); }

.btn-sm { padding: 6px 12px; font-size: 12px; }

.mono { font-family: var(--font-mono); font-size: 13px; }
.text-nowrap { white-space: nowrap; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-muted { color: var(--text-muted); }

.stat-card.compact .stat-value { font-size: 24px; }

/* ---------- Wizard ---------- */
.wizard-content { max-width: 720px; }
.wizard-steps {
  display: flex;
  gap: 6px;
  margin: 18px 0 22px;
}
.wizard-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
}
.wizard-step .ws-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface-hover);
  font-family: var(--font-mono);
  font-size: 12px;
  flex-shrink: 0;
}
.wizard-step.active {
  border-color: var(--primary);
  color: var(--text-main);
  background: rgba(59, 130, 246, 0.08);
}
.wizard-step.active .ws-num { background: var(--primary); color: #fff; }
.wizard-step.done { color: var(--success); border-color: rgba(16, 185, 129, 0.35); }
.wizard-step.done .ws-num { background: var(--success); color: #fff; }

.wizard-pane { display: none; }
.wizard-pane.active { display: block; }

.wizard-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.privacy-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Bot Cards ---------- */
.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.bot-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.bot-card:hover { border-color: var(--border-medium); transform: translateY(-2px); }
.bot-card.running {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.10);
}

.bot-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.bot-card-title h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.bot-card-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 3px;
}
.bot-card-lot {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bot-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bcm {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bcm-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-dim);
  font-weight: 600;
}
.bcm-value { font-size: 14px; font-weight: 700; }

.bot-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bot-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

/* ---------- Status & Mode Badges ---------- */
.badge-status-running {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.4);
  animation: pulse-dot 1.6s infinite;
}
.badge-status-idle { background: rgba(148, 163, 184, 0.12); color: var(--text-muted); }
.badge-status-finished { background: rgba(59, 130, 246, 0.12); color: var(--primary); }
.badge-status-stopped { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.badge-status-error { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.mode-dry { background: rgba(59, 130, 246, 0.12); color: var(--primary); }
.mode-live { background: rgba(239, 68, 68, 0.12); color: var(--danger); font-weight: 700; }
.mode-auto { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }

.pnl-win {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 700;
}
.pnl-lose {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-weight: 700;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.log-badge.bot {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  font-size: 10px;
}

.pnl-reason {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 340px;
  white-space: normal;
  line-height: 1.5;
}

/* Result box success (lama hanya punya error) */
.result-box.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--success);
}

/* Responsive bot grid */
@media (max-width: 900px) {
  .bot-grid { grid-template-columns: 1fr; }
  .wizard-steps { flex-direction: column; }
}

/* ---------- Anti-Sniper ---------- */
.anti-sniper-block {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--bg-input);
}
.hint-inline {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
}
.snipe-params {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.snipe-chips .filter-chip { flex: 1; }

.badge.mode-sniper {
  background: rgba(239, 68, 68, 0.14);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-weight: 700;
}
.badge.mode-antisniper {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
}
.badge.mode-sniper-window {
  background: rgba(239, 68, 68, 0.2);
  color: #fff;
  border: 1px solid var(--danger);
  font-weight: 800;
  animation: pulse-dot 1s infinite;
}

.badge.mode-api {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-weight: 700;
}

.badge.mode-browser {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  font-weight: 600;
}

/* ---------- API Health Modal ---------- */
.api-health-summary {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
}
.api-health-summary.ok {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}
.api-health-summary.partial {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--warning);
}
.api-health-summary.fail {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}
.api-health-summary.loading { color: var(--text-muted); }

.api-health-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.api-health-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot-ok, .dot-guard, .dot-down {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
}
.dot-ok { background: var(--success); }
.dot-guard { background: var(--primary); }
.dot-down { background: var(--danger); }

.api-health-list {
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px;
  background: var(--bg-surface);
}
.api-health-group {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 8px 10px 4px 10px;
}
.api-health-row {
  display: flex;
  border-left: 3px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 3px 2px;
  background: var(--bg-input);
}
.api-health-row.ok { border-left-color: var(--success); }
.api-health-row.guard { border-left-color: var(--primary); }
.api-health-row.down { border-left-color: var(--danger); }

.ahr-main { display: flex; gap: 10px; width: 100%; }
.ahr-icon { font-size: 16px; align-self: flex-start; margin-top: 1px; }
.ahr-body { flex: 1; min-width: 0; }
.ahr-name { font-weight: 700; font-size: 13.5px; }
.ahr-latency {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 8px;
  font-weight: 400;
}
.ahr-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.ahr-method {
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 7px;
  font-weight: 700;
  font-size: 11px;
  color: var(--text-main);
  text-transform: uppercase;
}
.ahr-status {
  font-size: 11.5px;
  color: var(--success);
  font-weight: 600;
}
.ahr-status.bad { color: var(--danger); }

/* ---------- IP exit label ---------- */
.bot-card-sub.ip-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.ip-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.ip-cell {
  font-size: 11.5px;
  white-space: nowrap;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .snipe-params { grid-template-columns: 1fr; }
}

/* ---------- User Management Modal & SaaS Grid ---------- */
#adminUsersModal .modal-content {
  max-width: 1180px !important;
  width: 95vw !important;
}

#adminUsersModal .snipe-params,
#adminUsersModal .user-create-grid {
  display: grid !important;
  grid-template-columns: 1.3fr 1.5fr 1.3fr 0.85fr !important;
  gap: 12px !important;
  align-items: flex-end !important;
  margin-top: 8px !important;
}

#adminUsersModal .snipe-params .form-group,
#adminUsersModal .user-create-grid .form-group {
  margin: 0 !important;
}

#adminUsersModal .snipe-params label,
#adminUsersModal .user-create-grid label {
  font-size: 11.5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
  margin-bottom: 5px !important;
  display: block;
}

@media (max-width: 960px) {
  #adminUsersModal .snipe-params,
  #adminUsersModal .user-create-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .user-create-actions {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  #adminUsersModal .snipe-params,
  #adminUsersModal .user-create-grid {
    grid-template-columns: 1fr !important;
  }
  .user-create-actions {
    grid-column: span 1;
  }
}

.users-table-wrap,
#adminUsersModal .table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-subtle) !important;
  background: var(--bg-surface) !important;
}

#usersTable {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  min-width: 860px !important;
}

#usersTable th {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  background: var(--bg-surface-elevated) !important;
  padding: 13px 16px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: var(--text-muted) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  white-space: nowrap !important;
}

#usersTable td {
  padding: 13px 16px !important;
  font-size: 13.5px !important;
  color: var(--text-main) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  vertical-align: middle !important;
}

#usersTable tbody tr:last-child td {
  border-bottom: none !important;
}

#usersTable tbody tr:hover {
  background: var(--bg-surface-hover) !important;
}

.user-action-btn-group {
  display: inline-flex !important;
  gap: 6px !important;
  align-items: center !important;
  justify-content: center !important;
}

.user-action-btn-group .btn-icon,
#usersTable .btn-icon {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 7px !important;
  transition: all 0.18s ease !important;
  cursor: pointer !important;
}

.user-action-btn-group .btn-icon:hover,
#usersTable .btn-icon:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

.user-action-btn-group .btn-icon svg,
#usersTable .btn-icon svg {
  display: block !important;
}

/* ================= HYBRID: RUNNER + EXECUTOR + TOKO IP ================= */

.runner-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.runner-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.runner-pill.online {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.08);
}

.runner-pill.online .dot {
  background: var(--success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  animation: pulse-dot 2s infinite;
}

.runner-pill.offline {
  border-color: rgba(245, 158, 11, 0.35);
}

.runner-pill.offline .dot {
  background: var(--warning);
}

.runner-pill .text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge.mode-exec-local {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge.mode-exec-web {
  background: rgba(167, 139, 250, 0.14);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.badge.badge-status-wait {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.4);
  animation: pulse-dot 1.6s infinite;
}

.store-section {
  margin-bottom: 18px;
}

.store-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.store-row.owned {
  border-color: rgba(52, 211, 153, 0.35);
}

.store-row.expired {
  border-color: rgba(239, 68, 68, 0.4);
  opacity: 0.75;
}

.store-row-main {
  flex: 1;
  min-width: 0;
}

.store-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-url {
  font-size: 12px;
  color: var(--accent-cyan);
  margin-top: 3px;
  word-break: break-all;
}

.store-meta {
  font-size: 11.5px;
  margin-top: 3px;
}

.store-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.store-bot-select {
  max-width: 210px;
}

.store-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
}

.store-empty {
  padding: 18px;
  border-radius: 10px;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.text-danger { color: var(--danger) !important; }

/* ---------- Bot Speed Benchmark Modal ---------- */
#botSpeedModal .modal-content {
  max-width: 880px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px 24px 18px 24px;
}

#botSpeedModal .modal-header {
  flex-shrink: 0;
  margin-bottom: 12px;
}

.speed-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  margin-right: -4px;
  overscroll-behavior: contain;
}

.speed-modal-body::-webkit-scrollbar {
  width: 7px;
}
.speed-modal-body::-webkit-scrollbar-track {
  background: var(--bg-input);
  border-radius: 4px;
}
.speed-modal-body::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}
.speed-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

#botSpeedModal .modal-actions {
  flex-shrink: 0;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: relative;
  z-index: 10;
}

.speed-test-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.speed-test-bot-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.speed-test-bot-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.speed-test-bot-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.speed-test-ctrls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.speed-test-mode-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 13px;
}
.speed-progress-box {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.speed-highlight-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.speed-highlight-icon {
  font-size: 28px;
}
.speed-highlight-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--success);
}
.speed-highlight-sub {
  font-size: 12.5px;
  color: var(--text-main);
  margin-top: 2px;
}
.speed-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  .speed-cards-grid {
    grid-template-columns: 1fr;
  }
}
.speed-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.speed-card.api {
  border-color: rgba(6, 182, 212, 0.35);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.04) 0%, var(--bg-surface) 100%);
}
.speed-card.browser {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, var(--bg-surface) 100%);
}
.speed-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.speed-card-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.speed-card-time {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  line-height: 1.1;
}
.speed-card.api .speed-card-time { color: var(--accent-cyan, #06b6d4); }
.speed-card.browser .speed-card-time { color: var(--warning, #f59e0b); }
.speed-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.speed-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.speed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.speed-table th, .speed-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}
.speed-table th {
  background: var(--bg-input);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
}
.speed-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
}
.speed-sniper-box {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.speed-sniper-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.speed-sniper-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .speed-sniper-grid {
    grid-template-columns: 1fr;
  }
}
.speed-sniper-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-size: 12px;
}
.speed-sniper-item.ok { border-left: 3px solid var(--success); }
.speed-sniper-item.warn { border-left: 3px solid var(--danger); }

/* ================= BOT FULL SCREEN PROFILE & COMMAND CENTER ================= */
/* ================= BOT FULL SCREEN PROFILE & COMMAND CENTER ================= */
body.bot-profile-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}
body.bot-profile-open .layout {
  display: none !important;
}

.bot-clean-drawer {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  background: var(--bg-main, #0b0f19);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.bot-clean-drawer.hidden {
  display: none !important;
  pointer-events: none;
  opacity: 0;
}

.drawer-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  flex-shrink: 0;
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  min-width: 0;
}

.drawer-titles {
  overflow: hidden;
  min-width: 0;
}

.drawer-bot-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-titles h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-titles p {
  margin: 2px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.drawer-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cld-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cld-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 13px;
  font-weight: 600;
  white-space: nowrap;
}

.cld-nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.drawer-close:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

.drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px 24px 20px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
}

/* ============ BOT PROFILE 3-COLUMN MASTER STRIP ============ */
.cld-bot-profile-strip {
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  flex-shrink: 0;
  align-items: stretch;
}

.cbps-card {
  min-width: 0;
  background: var(--bg-surface-elevated, #131b2e);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 10px);
  padding: 13px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 118px;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: all 0.2s ease;
  overflow: hidden;
}

.cbps-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cbps-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbps-val-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.cbps-account-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin: 1px 0;
}

.cbps-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cbps-meta .badge,
.cbps-meta span,
.cbps-meta a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbps-link {
  font-size: 11px;
  color: var(--accent-cyan, #06b6d4);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.cbps-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* ============ REALTIME LIVE BID PRICE & POSITION BANNER ============ */
.cld-live-bid-banner {
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  flex-shrink: 0;
  align-items: stretch;
}

.clbb-col {
  min-width: 0;
  background: var(--bg-surface-elevated, #131b2e);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 10px);
  padding: 13px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 118px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: all 0.2s ease;
}

.clbb-col:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.clbb-col.live-price-col {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(20, 32, 58, 0.9) 100%);
  border-color: rgba(59, 130, 246, 0.3);
}

.clbb-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.live-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 1.5s infinite;
}

.badge-verify {
  font-size: 10px;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
  border-radius: 4px;
}

.clbb-price-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0;
}

.clbb-price-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary, #3b82f6);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 14px var(--primary-glow);
  line-height: 1.1;
}

.clbb-kelipatan-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.clbb-sub-text {
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Battle Position Col */
.clbb-status-badge-wrap {
  margin: 3px 0 6px 0;
}

.clbb-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.clbb-status-badge.badge-lead {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}

.clbb-status-badge.badge-outbid {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
}

.clbb-status-badge.badge-standby {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.clbb-battle-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
}

.cbd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cbd-lbl {
  color: var(--text-muted);
}

.cbd-val {
  font-weight: 600;
  color: var(--text-main);
}

/* ============ BOT SETTINGS CARD (SNIPER & COUNTER TOGGLES) ============ */
.bot-settings-col {
  background: var(--bg-surface-elevated, #131b2e);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.cld-bot-quick-switches {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 3px 0;
}

.cld-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 12px;
  transition: all 0.15s ease;
}

.cld-switch-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.csr-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.csr-name {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main, #f8fafc);
}

.csr-desc {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
}

.cld-status-only-row {
  cursor: default;
}

.cld-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  user-select: none;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cld-status-pill.is-on {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.22);
}

.cld-status-pill.is-on .csp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
}

.cld-status-pill.is-off {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.cld-status-pill.is-off .csp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
}

/* ============ EXPANDED & HEAVY-DUTY ATUR BATAS MAKSIMAL ============ */
.cld-budget-hero-card {
  background: linear-gradient(135deg, rgba(20, 28, 48, 0.95) 0%, rgba(15, 23, 42, 0.92) 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.32) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-md, 10px);
  padding: 16px 18px;
}

/* ============ EXPANDED & HEAVY-DUTY AKSI TEMBAK HERO CARD ============ */
.cld-action-hero-card {
  background: linear-gradient(135deg, rgba(20, 28, 48, 0.95) 0%, rgba(15, 23, 42, 0.92) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.32) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-md, 10px);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.cld-btn-instant-hero {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  display: block;
}

.cld-btn-instant-hero:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.55);
  transform: translateY(-1.5px);
}

.cld-btn-instant-hero:active {
  transform: translateY(0);
}

.cld-instant-hero-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cld-instant-hero-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0f19;
  flex-shrink: 0;
}

.cld-instant-hero-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cld-instant-hero-title {
  font-size: 13.5px;
  font-weight: 850;
  letter-spacing: 0.5px;
  color: #0b0f19;
  line-height: 1.2;
}

.cld-instant-hero-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(11, 15, 25, 0.85);
}

.cld-settings-box-hero {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
}

.cld-budget-current-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
}

.cbcs-left, .cbcs-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cbcs-lbl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.cbcs-val {
  font-size: 19px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.cbcs-margin {
  font-size: 13.5px;
  font-weight: 700;
  color: #10b981;
}

.cld-quick-buttons-expanded {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.cld-quick-buttons-expanded .cld-chip-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #93c5fd;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.cld-quick-buttons-expanded .cld-chip-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
}

.cld-input-row-prominent {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
}

.cld-input-group-large {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  background: rgba(11, 15, 25, 0.95);
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.cld-input-group-large:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.35);
}

.cld-prefix-large {
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
  display: flex;
  align-items: center;
}

.cld-input-field-large {
  flex: 1 1 auto;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  padding: 10px 14px;
  outline: none;
  min-width: 0;
  height: 48px;
}

.cld-btn-apply-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 22px;
  height: 48px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.cld-btn-apply-large:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

.cld-terbilang-prominent {
  font-size: 12px;
  color: #38bdf8;
  font-weight: 600;
  margin-top: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.06);
  min-height: 24px;
}

.cld-help-text-prominent {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Realtime Server Auction Countdown Card */
.cld-auction-countdown-card {
  margin: 12px 20px 0 20px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cld-auction-countdown-card.sniper-alert {
  border-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(135deg, rgba(40, 10, 15, 0.95) 0%, rgba(30, 20, 25, 0.88) 100%);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

.cacc-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cacc-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cacc-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1.8s infinite;
}

.cacc-pulse-dot.sniper {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: pulse-dot 0.8s infinite;
}

.cacc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cacc-countdown-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cacc-countdown {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #f59e0b;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.cacc-countdown.sniper {
  color: #ef4444;
  text-shadow: 0 2px 14px rgba(239, 68, 68, 0.45);
}

.cacc-countdown.finished {
  color: var(--text-muted);
  text-shadow: none;
}

.cacc-countdown-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

.cacc-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  text-align: right;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 16px;
}

.cacc-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cacc-meta-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
}

.cacc-meta-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .cld-auction-countdown-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .cacc-right {
    align-items: flex-start;
    text-align: left;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
    width: 100%;
  }
}

.drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px 24px 20px;
}

.cld-content-wrapper {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cld-auction-countdown-card {
  margin: 0;
  width: 100%;
}

.cld-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0;
  width: 100%;
  align-items: start;
}

@media (max-width: 1180px) {
  .cld-bot-profile-strip,
  .cld-live-bid-banner,
  .cld-grid-container {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .cbps-card:nth-child(3),
  .clbb-col:nth-child(3),
  .cld-col-feed {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  /* Prevent background page scroll & viewport zoom leak */
  body.bot-profile-open {
    position: fixed !important;
    width: 100vw !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  body.bot-profile-open .layout {
    display: none !important;
  }

  .bot-clean-drawer {
    inset: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* 1. Header: 2 Clean Rows, Zero Overlap */
  .drawer-header {
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    background: var(--bg-surface-elevated) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
  }

  .drawer-title-group {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .drawer-badge-icon {
    display: none !important;
  }

  .cld-header-btn, #cldBackBtn {
    padding: 6px 10px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }

  .drawer-titles {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .drawer-bot-title-line {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .drawer-titles h3 {
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 150px !important;
  }

  .drawer-titles p {
    font-size: 11px !important;
    max-width: 150px !important;
  }

  .cld-nav-tools {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .drawer-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* 4 Action Buttons in a balanced grid */
  .cld-actions-bar {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  .cld-action-btn,
  .cld-actions-bar .btn {
    min-width: 0 !important;
    width: 100% !important;
    padding: 8px 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
  }

  .cld-action-btn svg,
  .cld-actions-bar .btn svg {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
  }

  /* 2. Drawer Body & Wrapper */
  .drawer-body {
    padding: 10px 12px 40px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .cld-content-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }

  /* 3. Row 1: Bot Profile Strip Cards */
  .cld-bot-profile-strip {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .cbps-card {
    width: 100% !important;
    min-height: auto !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }

  .cbps-val-title {
    font-size: 14px !important;
  }

  /* 4. Row 2: Live Bid Banner Cards */
  .cld-live-bid-banner {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .clbb-col {
    width: 100% !important;
    min-height: auto !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }

  .clbb-price-val {
    font-size: 22px !important;
  }

  .clbb-next-val {
    font-size: 18px !important;
  }

  /* 5. Row 3: Countdown Card */
  .cld-auction-countdown-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cacc-countdown {
    font-size: 28px !important;
  }

  .cacc-right {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .cacc-meta-item {
    font-size: 11.5px !important;
  }

  /* 6. Row 4: Command Center Grid */
  .cld-grid-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
  }

  .cld-col-budget,
  .cld-col-actions,
  .cld-col-feed {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Budget Chips: 4-column / 2-row clean grid */
  .cld-quick-buttons,
  .cld-quick-buttons-expanded {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  .cld-chip-btn {
    padding: 8px 3px !important;
    font-size: 11px !important;
    text-align: center !important;
  }

  .cld-input-row,
  .cld-input-row-prominent {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
  }

  .cld-input-field-large {
    font-size: 16px !important; /* Mencegah auto-zoom viewport di iOS/Android */
    height: 44px !important;
    padding: 8px 10px !important;
  }

  .cld-prefix-large {
    font-size: 14px !important;
    padding: 0 10px !important;
  }

  .cld-btn-apply-large {
    height: 44px !important;
    padding: 0 16px !important;
    font-size: 12.5px !important;
  }

  .cld-budget-current-strip {
    padding: 8px 12px !important;
  }

  .cbcs-val {
    font-size: 16px !important;
  }

  /* Strike button */
  .cld-btn-instant,
  .cld-btn-instant-hero {
    width: 100% !important;
    padding: 12px 14px !important;
  }
}

.cld-col-budget {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cld-col-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cld-col-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

/* Unique Bidders Card (Ringkas & Proporsional) */
.drawer-hero-card {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg-surface-elevated, #131b2e);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.hero-bidders-count {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-bidders-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md, 8px);
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.hero-bidders-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  font-family: var(--font-mono);
}

.hero-bidders-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.hero-bidders-note {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.hmg-item {
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-subtle);
}

.hmg-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

.hmg-value {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
  display: block;
}

/* Clean Log Feed Section (Proporsional & Rapi) */
.clean-feed-section {
  margin: 0;
  padding: 0;
  background: var(--bg-surface-elevated, #131b2e);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.clean-feed-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.cf-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

.cf-live-indicator {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
}
.cf-live-indicator::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 4px;
  box-shadow: 0 0 6px #10b981;
  animation: pulse-dot 1.5s infinite;
}

.clean-feed-list {
  max-height: 380px;
  min-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
}

.clean-bid-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.clean-bid-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.clean-bid-card.is-our-bid {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.clean-bid-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.clean-bid-time {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.clean-bid-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.clean-bid-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.clean-feed-loading, .clean-feed-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

.bot-card.selected-bot {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* ==========================================================================
   MINIMALIST & ELEGANT DESIGN ENHANCEMENTS (NO EMOJIS)
   ========================================================================== */
.clock-pill svg {
  color: var(--text-dim);
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2px;
}

.card-title-icon svg {
  width: 18px;
  height: 18px;
}

.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.empty-state-icon svg {
  width: 44px;
  height: 44px;
  stroke: var(--text-dim);
  opacity: 0.65;
}

.terbilang-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: 6px;
}

.btn-toggle-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.btn-toggle-eye svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-dim);
  transition: stroke 0.2s ease;
}

.btn-toggle-eye:hover svg {
  stroke: var(--text-main);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 6px;
}

.status-indicator.ok {
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.status-indicator.warn {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning-glow);
}

.status-indicator.danger {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger-glow);
}

.status-indicator.primary {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.proxy-tag {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Remove spin buttons from all number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* ================= CLD QUICK CONTROLS ================= */
.cld-section-card {
  margin: 0 20px 14px 20px;
  padding: 14px 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cld-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.cld-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.cld-chip-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cld-chip-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.cld-chip-btn:active {
  transform: translateY(0);
}

.cld-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cld-input-group {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cld-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.cld-prefix {
  padding: 0 10px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
}

.cld-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px 8px 0;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
}

.cld-terbilang {
  font-size: 11px;
  color: var(--accent-cyan);
  margin-top: 5px;
  line-height: 1.3;
}

.cld-help-text {
  font-size: 11px;
  color: var(--text-dim);
  margin: 6px 0 0 0;
  line-height: 1.4;
}

.cld-btn-instant {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.22);
  transition: all 0.15s ease;
  line-height: 1.25;
}

.cld-btn-instant .cld-instant-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13.5px;
}

.cld-btn-instant .cld-instant-sub {
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.95;
  letter-spacing: 0.2px;
}

.cld-btn-instant:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(245, 158, 11, 0.35);
}

.cld-btn-instant:active {
  transform: translateY(0);
}

.cld-settings-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 8px;
}

.cld-sublabel {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: block;
}

.cld-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cld-toggle-label {
  display: flex;
  align-items: center;
  margin-top: 2px;
  cursor: pointer;
}

.cld-toggle-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.cld-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.cld-toggle-text strong {
  color: var(--text-main);
  font-weight: 600;
}

.cld-toggle-text span {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ---------- Realtime Budget Shortfall Alert ---------- */
.cld-budget-alert-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(245, 158, 11, 0.18) 100%);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  animation: pulse-border 2s infinite ease-in-out;
}
@keyframes pulse-border {
  0%, 100% { border-color: rgba(239, 68, 68, 0.45); box-shadow: 0 0 10px rgba(239, 68, 68, 0.15); }
  50% { border-color: rgba(245, 158, 11, 0.7); box-shadow: 0 0 16px rgba(245, 158, 11, 0.3); }
}
.cld-ba-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.cld-ba-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
}
.cld-ba-desc {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 10px;
}
.cld-ba-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cld-ba-actions .btn-bump {
  background: var(--danger);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.cld-ba-actions .btn-bump:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.cld-ba-actions .btn-dismiss {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 11.5px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.cld-ba-actions .btn-dismiss:hover {
  color: var(--text-main);
}

/* ==========================================================================
   ADMIN VPS RESOURCE & LIVE PING WIDGETS
   ========================================================================== */
.admin-vps-card {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.admin-vps-card.hidden {
  display: none !important;
}

.vps-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.vps-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary);
  text-transform: uppercase;
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 1.6s infinite;
}

.vps-badge-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.vps-badge-pct.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.3);
}

.vps-badge-pct.danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.vps-meter-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  overflow: hidden;
}

.vps-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
  border-radius: 3px;
  transition: width 0.4s ease, background 0.3s ease;
}

.vps-meter-fill.warning {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.vps-meter-fill.danger {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.vps-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.vps-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.vps-metric .metric-lbl {
  color: var(--text-dim);
}

.vps-metric .metric-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
}

.vps-metric .metric-val.green {
  color: var(--success);
}

.vps-metric .metric-val.yellow {
  color: var(--warning);
}

.vps-metric .metric-val.red {
  color: var(--danger);
}

/* Top Bar Live Ping */
.live-ping-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 20px;
}

.ping-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.ping-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  box-shadow: 0 0 6px var(--success);
}

.ping-chip-dot.yellow {
  background: var(--warning);
  box-shadow: 0 0 6px var(--warning);
}

.ping-chip-dot.red {
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

.ping-chip-label {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 11.5px;
}

.ping-chip-val {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-main);
}

/* ==========================================================================
   BOT SCHEDULING & ULTRA-LOW RESOURCE COOLDOWN STYLES
   ========================================================================== */
.badge-status-scheduled {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bot-card.scheduled {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.08);
}

.bot-card-schedule-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bot-card-schedule-banner .bcsb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bot-card-schedule-banner .bcsb-time {
  font-size: 12.5px;
  font-weight: 700;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bot-card-schedule-banner .bcsb-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.bot-card-schedule-banner .bcsb-countdown {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--warning);
}

.bot-card-schedule-banner .bcsb-saver {
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}
