:root {
  --primary: #57ff9d;
  --bg1: #19135a;
  --bg2: #221c4e;
  --bg-gradient: linear-gradient(120deg, #19135a 0%, #221c4e 100%);
  --card: #241d5aee;
  --table-head: #231e44;
  --table-row1: #2c2562f8;
  --table-row2: #251e60f6;
  --danger: #ff5370;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg-gradient);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: #fff;
  margin: 0;
  padding: 0;
  letter-spacing: 0.01em;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  padding: 0 32px;
  min-height: 64px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 2px 18px #0004;
  margin-bottom: 0;
}
.logo {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg,#57ff9d 5%,#e2d7fc 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  border-radius: 7px;
  font-size: 1rem;
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
  box-shadow: 0 0 0 #0000;
}
.btn-primary {
  background: linear-gradient(90deg,#57ff9d 60%,#00e676 100%);
  color: #18123a;
}
.btn-primary:hover { opacity: 0.87; }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { box-shadow: 0 0 0 2px #ff537040; }
.btn-outlined {
  background: none;
  border: 2px solid #fff1;
  color: #fff;
}
.btn-outlined:hover { background: #fff1; }
.btn svg { vertical-align: bottom; }

/* --- STAT CARDS ROW --- */
.stat-cards-row {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin: 40px 0 14px 0;
  flex-wrap: wrap;
}
.stat-card {
  background: #251e60fa;
  border-radius: 18px;
  box-shadow: 0 2px 18px #0004;
  border: 2px solid #fff1;
  padding: 16px 32px 16px 32px;
  min-width: 170px;
  max-width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow .17s, border-color .17s;
  position: relative;
}
.stat-card-icon {
  margin-bottom: 11px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card-label {
  font-size: 0.93rem;
  color: #e2d7fc;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.stat-card-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #57ff9d;
  text-align: center;
  margin-bottom: 2px;
}
.stat-card-value span {
  color: #57ff9d;
  font-weight: 700;
  font-size: 1.6rem;
}
.stat-card:hover {
  box-shadow: 0 4px 28px #0008;
  border-color: #57ff9d60;
}

/* --- ACTION ROW HORIZONTAL --- */
.action-row-horizontal {
  margin: 18px 0 8px 0;
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.action-input {
  background: #251e60f6;
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 1rem;
  min-width: 180px;
  outline: none;
  box-shadow: 0 1px 3px #0002;
  transition: box-shadow .14s;
}
.action-input:focus { box-shadow: 0 2px 7px #0004; }
.action-btn {
  padding-left: 22px !important;
  padding-right: 22px !important;
  min-width: 90px;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .stat-cards-row { gap: 18px; }
  .stat-card { padding: 12px 14px; min-width: 120px; max-width: 155px; }
}
@media (max-width: 700px) {
  .stat-cards-row { flex-wrap: wrap; gap: 10px; }
  .stat-card { border-radius: 12px; padding: 9px 7px; min-width: 95px; max-width: 130px; }
  .stat-card-icon img { width: 26px; }
  .stat-card-label { font-size: 0.77rem; }
  .stat-card-value { font-size: 1.1rem; }
  .stat-card-value span { font-size: 1.1rem; }
  .action-row-horizontal { flex-wrap: wrap; gap: 8px; }
  .action-input { min-width: 100px; font-size: 0.97rem; padding: 9px 8px; }
  .action-btn { min-width: 70px; font-size: 0.97rem; padding-left: 13px !important; padding-right: 13px !important; }
}
@media (max-width: 420px) {
  .bot-table {
    min-width: 280px;
  }
  .logo {
    font-size: 0.9rem;
  }
  .login-card {
    padding: 18px 2vw 14px 2vw;
  }
}

.top-action-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 38px 0 36px 0;
  gap: 22px;
}

/* --- REMOVED ONLINE BOX --- */

.input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.input-row input {
  background: #251e60f6;
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 1rem;
  width: 230px;
  outline: none;
  box-shadow: 0 1px 3px #0002;
  transition: box-shadow .14s;
}
.input-row input:focus { box-shadow: 0 2px 7px #0004; }

.search-row {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
#searchInput {
  width: 320px;
  max-width: 95vw;
  padding: 12px 15px;
  border-radius: 7px;
  border: none;
  background: #251e60f6;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 1px 3px #0002;
  transition: box-shadow .14s;
}
#searchInput:focus { box-shadow: 0 2px 7px #0004; }

.card-glass {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 4px 32px #0006, 0 1.5px 0 0 #fff1 inset;
  padding: 0;
  margin: 0 auto 0 auto;
}

.table-wrapper {
  overflow-x: auto;
}

.bot-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 480px;
  background: transparent;
}
.bot-table thead tr {
  background: var(--table-head);
}
.bot-table th, .bot-table td {
  padding: 18px 8px;
  font-size: 1.09rem;
  text-align: center;
  font-weight: 400;
  border: none;
  transition: background .18s;
}
.bot-table th {
  font-size: 1.14rem;
  font-weight: 600;
  letter-spacing: .7px;
  color: #e2d7fc;
  border-bottom: 2.5px solid #251e6088;
  background: var(--table-head);
}
.bot-table tbody tr {
  background: var(--table-row1);
  transition: background 0.18s;
}
.bot-table tbody tr:nth-child(even) {
  background: var(--table-row2);
}
.bot-table tbody tr:hover {
  background: #332d75;
  box-shadow: 0 2px 12px #0003 inset;
}
.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  box-shadow: 0 0 7px #00e67680;
  transition: background .22s;
  animation: dotPulse 1.2s infinite alternate;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 7px #00e67680; }
  100% { box-shadow: 0 0 17px #00e676; }
}
.status-online {
  background: #00e676;
}
.status-offline {
  background: var(--danger);
  box-shadow: 0 0 7px #ff537080;
  animation: none;
}
input[type=checkbox] {
  accent-color: #57ff9d;
  width: 18px;
  height: 18px;
  cursor: pointer;
  vertical-align: middle;
}
.main-box {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 8px 30px 8px;
}

/* --- CONSOLE BOX --- */
.console-box {
  margin: 32px auto 0 auto;
  max-width: 900px;
  width: 100%;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 4px 24px #0005;
  padding: 0;
}
.console-box-header {
  padding: 10px 18px 7px 18px;
  font-size: 1.08rem;
  font-weight: 600;
  color: #e2d7fc;
  border-bottom: 2px solid #251e6088;
}
.console-box-body {
  max-height: 9.8em; /* Untuk kira-kira 6 baris monospace */
  overflow-y: auto;
  padding: 8px 18px 14px 18px;
  font-size: 1.18em;
  background: none;
  font-family: 'Fira Mono', 'Consolas', monospace;
  white-space: pre-line;
  box-sizing: border-box;
}
.console-line {
  margin-bottom: 4px;
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-size: 1em;
  letter-spacing: 0.5px;
  display: flex;
  align-items: baseline;
}
.console-time {
  font-weight: bold;
  color: #38ffb2;
  letter-spacing: 1px;
  margin-right: 12px;
}
.console-name {
  font-weight: 600;
  color: #fff;
  margin-right: 8px;
}
.console-chat {
  color: #fff;
}

/* --- LOGIN PAGE --- */
.login-body {
  min-height: 100vh;
  background: var(--bg-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.login-container {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--card);
  padding: 38px 42px 36px 42px;
  border-radius: 18px;
  box-shadow: 0 4px 26px #0007, 0 1.5px 0 0 #fff1 inset;
  max-width: 360px;
  width: 95vw;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  align-items: center;
  margin: 0 8px;
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.login-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
  color: #e2d7fc;
  letter-spacing: 1.1px;
}
.login-card input[type="text"], .login-card input[type="password"] {
  width: 100%;
  margin-bottom: 16px;
  padding: 13px 14px;
  border-radius: 8px;
  border: none;
  background: #251e60f6;
  color: #fff;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 1px 3px #0002;
  transition: box-shadow .14s;
  box-sizing: border-box;
}
.login-card input[type="text"]:focus, .login-card input[type="password"]:focus {
  box-shadow: 0 2px 7px #0004;
}
.login-error {
  color: #ff5370;
  margin-top: 9px;
  min-height: 20px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/* --- MOBILE FRIENDLY --- */
@media (max-width: 900px) {
  .stat-cards-row { gap: 18px; }
  .stat-card { padding: 12px 14px; min-width: 120px; max-width: 155px; }
}
@media (max-width: 700px) {
  .stat-cards-row { flex-wrap: wrap; gap: 10px; }
  .stat-card { border-radius: 12px; padding: 9px 7px; min-width: 95px; max-width: 130px; }
  .stat-card-icon img { width: 26px; }
  .stat-card-label { font-size: 0.77rem; }
  .stat-card-value { font-size: 1.1rem; }
  .stat-card-value span { font-size: 1.1rem; }
  .action-row-horizontal { flex-wrap: wrap; gap: 8px; }
  .action-input { min-width: 100px; font-size: 0.97rem; padding: 9px 8px; }
  .action-btn { min-width: 70px; font-size: 0.97rem; padding-left: 13px !important; padding-right: 13px !important; }
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    min-height: 54px;
    border-radius: 0 0 12px 12px;
  }
  .logo {
    font-size: 1.08rem;
    margin-bottom: 7px;
  }
  .navbar-right {
    align-self: flex-end;
  }
  .top-action-row {
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
    margin-bottom: 14px;
  }
  .main-box {
    padding: 0 2px 18px 2px;
  }
  .search-row {
    margin-bottom: 10px;
    width: 100%;
  }
  #searchInput {
    width: 97vw;
    font-size: 0.99rem;
    padding: 10px 10px;
    min-width: 0;
  }
  .card-glass {
    border-radius: 12px;
    box-shadow: 0 2px 12px #0006;
    padding: 0;
  }
  .bot-table {
    min-width: 360px;
    font-size: 0.93rem;
  }
  .bot-table th, .bot-table td {
    font-size: 0.93rem;
    padding: 9px 2px;
  }
  .console-box {
    max-width: 99vw;
    border-radius: 12px;
    box-shadow: 0 2px 12px #0005;
    margin: 24px auto 0 auto;
    padding: 0;
  }
  .console-box-header, .console-box-body {
    padding-left: 7px;
    padding-right: 7px;
  }
  .login-card {
    padding: 26px 8vw 20px 8vw;
    border-radius: 13px;
    box-shadow: 0 2px 12px #0007;
    max-width: 98vw;
    width: 98vw;
    margin: 0 2vw;
  }
}
@media (max-width: 420px) {
  .bot-table {
    min-width: 280px;
  }
  .logo {
    font-size: 0.9rem;
  }
  .login-card {
    padding: 18px 2vw 14px 2vw;
  }
}

/* Inventory icon and modal popup */
.inventory-btn svg {
  vertical-align: middle;
  margin: 0 0 0 2px;
  transition: transform .13s;
}
.inventory-btn:hover svg {
  transform: scale(1.15);
}

/* Overlay for modal */
.inventory-modal-overlay {
  display: none;
  position: fixed;
  z-index: 99;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(30, 23, 80, 0.67);
  transition: opacity 0.18s;
}

.inventory-popup-modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  min-width: 240px;
  max-width: 370px;
  background: #241d5aee;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 28px #000a;
  padding: 0;
  animation: fadeInModal .22s;
}
@keyframes fadeInModal {
  0% { opacity: 0; transform: scale(0.95) translate(-50%, -50%);}
  100% { opacity: 1; transform: scale(1) translate(-50%, -50%);}
}
.inventory-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 19px 9px 19px;
  border-bottom: 2px solid #251e6088;
  font-size: 1.13rem;
  color: #e2d7fc;
}
.inventory-popup-body {
  padding: 12px 19px 17px 19px;
  font-size: 1.09rem;
  background: none;
  max-height: 340px;
  overflow-y: auto;
}
.inv-row {
  margin-bottom: 8px;
  font-family: 'Inter', 'Consolas', 'Menlo', 'monospace', Arial;
  word-break: break-word;
}
.inv-weight {
  color: #57ff9d;
  font-weight: 600;
  margin-left: 3px;
}
.close-inv-btn {
  font-size: 1.22rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  color: #e2d7fc;
  padding: 0;
  margin-left: 13px;
}
.bot-table td {
  position: relative;
}

::-webkit-scrollbar { width: 8px; background: #221c4e;}
::-webkit-scrollbar-thumb { background: #2c2562; border-radius: 8px;}