/* ===================== RESET & ROOT ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #e8f0fe;
  --border: #d0d9e8;
  --accent: #1a73e8;
  --accent2: #1558b0;
  --text: #1a1f36;
  --muted: #6b7a99;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --sidebar-w: 260px;
}

/* ===================== BODY & LAYOUT ===================== */
body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Mono", monospace;
  min-height: 100vh;
  display: flex;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px;
  min-height: 100vh;
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h2 {
  font-family: "Syne", sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.page-header p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 28px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-brand a {
  text-decoration: none;
  display: block;
}

.sidebar-brand h1 {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-brand h1 span {
  color: var(--accent);
}

.sidebar-brand p {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===================== NAV ===================== */
.nav-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 12px;
  margin-bottom: 8px;
  margin-top: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  margin-bottom: 2px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(0, 229, 255, 0.07);
  color: var(--accent);
}

.nav-item .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ===================== VENDOR NAV ===================== */
.vendor-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.2s;
  margin-bottom: 2px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.vendor-nav-item:hover,
.vendor-nav-item.active {
  background: rgba(124, 58, 237, 0.1);
  color: #c4b5fd;
}

.vendor-nav-item .vendor-avatar {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent2), #4f46e5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  font-family: "Syne", sans-serif;
  flex-shrink: 0;
}

.vendor-nav-item .vendor-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vendor-nav-item .vendor-username {
  font-size: 10px;
  color: var(--muted);
}

/* ===================== USER INFO & AVATAR ===================== */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
}

.avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #080b12;
  font-family: "Syne", sans-serif;
}

.user-info-text .name {
  font-size: 13px;
  color: var(--text);
}

.user-info-text .role {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.vendor-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===================== BUTTONS ===================== */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  color: #fca5a5;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--accent), #0891b2);
  border: none;
  border-radius: 10px;
  color: #080b12;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-passwd {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--accent);
  transition: all 0.2s;
}

.btn-edit {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  transition: all 0.2s;
}

.btn-hapus {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-submit {
  flex: 1;
  padding: 11px;
  background: linear-gradient(135deg, var(--accent), #0891b2);
  border: none;
  border-radius: 10px;
  color: #080b12;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-cancel {
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  cursor: pointer;
  background: none;
}

/* ===================== FLASH ===================== */
.flash-box {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 20px;
}

.flash-box.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.flash-box.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ===================== VIEW BANNER ===================== */
.view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 12px;
  color: #c4b5fd;
}

.view-banner a {
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}

.view-banner a:hover {
  text-decoration: underline;
}

/* ===================== TABLES ===================== */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 14px 20px;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

td {
  padding: 14px 20px;
  font-size: 13px;
  border-bottom: 1px solid rgba(30, 37, 51, 0.5);
  vertical-align: middle;
}

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

tr:hover td {
  background: rgba(0, 229, 255, 0.02);
}

/* ===================== BADGES ===================== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-superadmin {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
}

.badge-admin {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--accent);
}

/* ===================== MODALS ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 440px;
  max-width: 95vw;
}

.modal h3 {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal .modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

.modal label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.modal input,
.modal select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 13px;
  outline: none;
  margin-bottom: 16px;
}

.modal input:focus,
.modal select:focus {
  border-color: var(--accent);
}

.modal select option {
  background: #0d1117;
}

.modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state .icon {
  font-size: 40px;
  margin-bottom: 12px;
}

/* ===================== AKSI WRAP ===================== */
.aksi-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ===================== PAGE: DASHBOARD SA ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: var(--accent);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.stat-card:nth-child(1)::before {
  background: linear-gradient(90deg, var(--accent), transparent);
}
.stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--accent2), transparent);
}
.stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--success), transparent);
}

.stat-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.stat-value {
  font-family: "Syne", sans-serif;
  font-size: 36px;
  font-weight: 600;
  color: var(--text);
}

.stat-icon {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  opacity: 0.2;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

/* ===================== PAGE: TAMBAH USER ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-top: 7px;
}

label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

input,
select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.03);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

input::placeholder {
  color: var(--muted);
}

select option {
  background: #ffffff;
}

input:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-style: dashed;
}

.vendor-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  display: none;
}

.vendor-hint.show {
  display: block;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-submit-full {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), #0891b2);
  border: none;
  border-radius: 10px;
  color: #080b12;
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit-full:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.25);
}

.flash-msg {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-msg.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.flash-msg.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

/* ===================== PAGE: VIEW VENDOR ===================== */
.vendor-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.vendor-header-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent2), #4f46e5);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  font-family: "Syne", sans-serif;
  flex-shrink: 0;
}

.vendor-header-info h2 {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.vendor-header-info p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.action-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.08);
}

.action-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.action-card:hover::before {
  opacity: 1;
}

.action-icon {
  font-size: 32px;
}

.action-title {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.action-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.action-arrow {
  font-size: 18px;
  color: var(--accent);
  margin-top: auto;
  opacity: 0;
  transition: opacity 0.2s;
}

.action-card:hover .action-arrow {
  opacity: 1;
}

/* ===================== PAGE: LOGIN ===================== */
body.login-page {
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
  z-index: 0;
}

@keyframes gridMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(40px);
  }
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  z-index: 0;
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent2);
  bottom: -80px;
  right: -80px;
  animation-delay: 4s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20px, 20px);
  }
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
  animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  text-align: center;
  margin-bottom: 40px;
}

.brand-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
}

.brand h1 {
  font-family: "Syne", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.brand h1 span {
  color: var(--accent);
}

.brand p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-login {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--accent), #0891b2);
  border: none;
  border-radius: 10px;
  color: #080b12;
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0, 229, 255, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

.footer-text {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* ===================== SHARED: TABLE CARD ===================== */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

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

.table-header span {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.total-badge,
.count-badge {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface2);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: "DM Mono", monospace;
}

/* ===================== SHARED: FORM CARD ===================== */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.form-card-title,
.upload-card-title,
.section-title-label {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-row-inline {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-group-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 160px;
}

.form-group-col label {
  font-size: 11px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.form-group-col input,
.form-group-col select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
  width: 100%;
}

.form-group-col input:focus,
.form-group-col select:focus {
  border-color: var(--accent);
}

/* ===================== SHARED: FILTER BAR ===================== */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
}

.filter-bar input {
  width: 240px;
}
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
}

/* ===================== SHARED: BTN PRIMARY / SAVE ===================== */
.btn-primary,
.btn-save,
.btn-upload,
.btn-refresh {
  background: linear-gradient(135deg, var(--accent), #0099bb);
  border: none;
  border-radius: 8px;
  color: #000;
  font-family: "Syne", sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-primary:hover,
.btn-save:hover,
.btn-upload:hover,
.btn-refresh:hover {
  opacity: 0.9;
}

.btn-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 12px 24px;
}

.btn-refresh:hover {
  transform: translateY(-1px);
}

.btn-refresh .spin {
  display: inline-block;
  transition: transform 0.3s;
}

.btn-refresh:hover .spin {
  transform: rotate(180deg);
}

/* ===================== SHARED: BTN HAPUS / DEL ===================== */
.btn-hapus,
.btn-del,
.btn-hapus-semua {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  color: #fca5a5;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  transition: all 0.2s;
}

.btn-hapus {
  padding: 5px 12px;
  font-size: 11px;
}
.btn-del {
  padding: 3px 7px;
  font-size: 10px;
  border-radius: 5px;
}
.btn-hapus-semua {
  padding: 4px 12px;
  font-size: 11px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-hapus:hover,
.btn-del:hover {
  background: rgba(239, 68, 68, 0.15);
}
.btn-hapus-semua:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* ===================== SHARED: MODAL ===================== */
.modal-sub {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 20px;
}

.modal label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
  margin-top: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.modal input,
.modal select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
  margin-bottom: 0;
}

.modal input:focus {
  border-color: var(--accent);
}

.modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.btn-cancel-sm {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  padding: 9px 20px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  cursor: pointer;
}

/* ===================== PAGE: DASHBOARD USER ===================== */
/* .cards-grid dan .action-card sudah ada di section VIEW VENDOR */

/* ===================== PAGE: JALANKAN BOT ===================== */
.hidden {
  display: none;
}

.bot-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.status-dot.running {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.05);
  }
}

.status-text .label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.status-text .value {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.status-text .value.running {
  color: var(--success);
}
.status-text .value.stopped {
  color: var(--muted);
}

.status-text .pid {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.btn-controls {
  display: flex;
  gap: 10px;
}

.btn-start {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--success), #16a34a);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-start:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-start:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: #fca5a5;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-stop:hover {
  background: rgba(239, 68, 68, 0.2);
}
.btn-stop:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.log-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.log-header span {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.log-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--success);
}

.log-live-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1.5s infinite;
}

.log-body {
  padding: 16px 20px;
  height: 400px;
  overflow-y: auto;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}

.log-body::-webkit-scrollbar {
  width: 4px;
}
.log-body::-webkit-scrollbar-track {
  background: transparent;
}
.log-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.log-line {
  display: block;
}
.log-line.err {
  color: #fca5a5;
}
.log-line.ok {
  color: #86efac;
}

.log-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 12px;
}

/* ===================== PAGE: PASARAN ===================== */
.btn-edit {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  color: #fbbf24;
  padding: 5px 12px;
  font-size: 11px;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: rgba(245, 158, 11, 0.2);
}

.jam-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 6px;
  font-size: 11px;
  color: #050505;
  font-weight: 500;
}

.zona-badge {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
  font-size: 10px;
  color: var(--accent);
}

.code-text {
  color: var(--muted);
  font-size: 11px;
}

.btn-atur-jam {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 8px;
  color: #c4b5fd;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  transition: all 0.2s;
  white-space: nowrap;
  margin-left: auto;
}

.btn-atur-jam:hover {
  background: rgba(124, 58, 237, 0.3);
}

.modal-result {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--text);
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 14px;
  display: none;
  white-space: pre-wrap;
}

.delta-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.btn-delta {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-delta:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--accent);
}

#deltaInput {
  width: 70px;
  text-align: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 14px;
  outline: none;
}

#deltaInput:focus {
  border-color: var(--accent);
}
.empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 32px;
}

/* ===================== PAGE: SHIO ===================== */
.shio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 24px;
  margin-bottom: 24px;
}

.shio-aktif-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.shio-aktif-icon {
  font-size: 32px;
  line-height: 1;
}
.shio-aktif-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.shio-aktif-name {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

.info-box {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.info-box strong {
  color: var(--accent);
}

tr.row-aktif td {
  background: rgba(0, 229, 255, 0.05);
}
tr.row-aktif:hover td {
  background: rgba(0, 229, 255, 0.08);
}

.shio-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shio-icon-cell {
  font-size: 22px;
  line-height: 1;
}
.shio-label {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.shio-count-small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.badge-aktif {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 5px;
  font-size: 9px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

.angka-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.angka-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text);
  font-family: "DM Mono", monospace;
}

.angka-tag.first {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
  color: var(--accent);
  font-weight: 600;
}

/* ===================== PAGE: UPLOAD TEMPLATE ===================== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
}

.tab-btn {
  padding: 9px 24px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.03);
}

.drop-zone .icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.drop-zone p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.drop-zone span {
  font-size: 11px;
  color: var(--muted);
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-info {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

.preview-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-item .fname {
  color: var(--text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.img-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.img-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
}
.img-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  background: var(--surface2);
}

.img-card-info {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.img-card-name {
  font-size: 10px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 90px;
}

.empty-grid {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* ===================== PAGE: CONFIG BOT ===================== */
.config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 24px;
  align-items: start;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.section-title {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title .chevron {
  font-size: 10px;
  transition: transform 0.2s;
  color: var(--muted);
}
.section-title.collapsed .chevron {
  transform: rotate(-90deg);
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-body.hidden {
  display: none;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  overflow: hidden;
}

.form-row > label {
  width: 200px;
  height: 10px;
  min-width: 200px;
  font-size: 12px;
  color: var(--muted);
  padding-top: 10px;
  text-transform: none;
  letter-spacing: 0;
}

.form-row > label span {
  display: block;
  font-size: 10px;
  color: #374151;
  margin-top: 2px;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row textarea,
.form-row select {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
  width: auto;
  box-shadow: none;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--accent);
}
.form-row textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.6;
}
.form-row select option {
  background: var(--surface2);
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 22px;
  cursor: pointer;
  transition: 0.3s;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle input:checked + .toggle-slider:before {
  transform: translateX(18px);
}
.toggle-label {
  font-size: 12px;
  color: var(--muted);
}

.chatid-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.chatid-row input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
}
.chatid-row input:focus {
  border-color: var(--accent);
}
.chatid-row select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
  width: 120px;
}

.kb-row {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.kb-row-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}
.kb-row-inputs input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
}
.kb-row-inputs input:focus {
  border-color: var(--accent);
}
.kb-row-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-add-row {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  color: var(--accent);
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  transition: all 0.2s;
}
.btn-add-row:hover {
  background: rgba(0, 229, 255, 0.15);
}
.btn-remove-row {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: #fca5a5;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-remove-row:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-save-config {
  background: linear-gradient(135deg, var(--accent), #0099bb);
  border: none;
  border-radius: 10px;
  color: #000;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 13px 32px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-save-config:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.save-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.xy-pair {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.xy-pair input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
}

.xy-pair input:focus {
  border-color: var(--accent);
}

.xy-label {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

.shadow-row {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: center;
}
.shadow-row input[type="number"] {
  flex: 1;
  width: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  outline: none;
}
.shadow-row input[type="number"]:focus {
  border-color: var(--accent);
}
.shadow-row .sep {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.shadow-row input[type="color"] {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
  background: transparent;
  flex-shrink: 0;
}

.gradient-editor {
  flex: 1;
  width: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.gradient-preview {
  height: 32px;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.gradient-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
}
.gradient-stop input[type="color"] {
  width: 36px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
  background: transparent;
  flex-shrink: 0;
}
.gradient-stop input[type="number"] {
  width: 70px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  outline: none;
  flex-shrink: 0;
}
.gradient-stop .stop-label {
  font-size: 10px;
  color: var(--muted);
  flex: 1;
}

.shio-positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.shio-pos-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.shio-pos-label {
  font-size: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.xy-inputs {
  display: flex;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.xy-inputs input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px !important;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  outline: none;
}
.xy-inputs input:focus {
  border-color: var(--accent);
}
.axis-label {
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  margin-top: 2px;
}

.preview-panel {
  position: sticky;
  top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.preview-panel-title {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.preview-controls {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preview-controls select,
.preview-controls input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  outline: none;
}
.preview-controls select:focus,
.preview-controls input:focus {
  border-color: var(--accent);
}
.preview-controls-row {
  display: flex;
  gap: 6px;
}
.preview-controls-row input {
  flex: 1;
}
.btn-generate-preview {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #0099bb);
  border: none;
  border-radius: 8px;
  color: #000;
  font-family: "Syne", sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.btn-generate-preview:hover {
  opacity: 0.9;
}
.btn-generate-preview:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.preview-image-box {
  padding: 14px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050709;
}
.preview-image-box img {
  width: 100%;
  border-radius: 8px;
  display: block;
}
.preview-placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.preview-placeholder .icon {
  font-size: 36px;
  margin-bottom: 10px;
}
.preview-loading {
  display: none;
  text-align: center;
  color: var(--accent);
  font-size: 12px;
  padding: 30px;
}
.preview-error {
  display: none;
  color: #fca5a5;
  font-size: 11px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.08);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
}
.preview-caption-box {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 60px;
  font-family: "DM Mono", monospace;
}
.no-config {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.no-config .icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.no-config p {
  font-size: 13px;
}

/* ===================== HAMBURGER BUTTON ===================== */
.hamburger {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

/* ===================== RESPONSIVE: TABLET (≤1100px) ===================== */
@media (max-width: 1100px) {
  /* Config layout: 2 kolom → 1 kolom, preview pindah ke bawah */
  .config-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
    max-width: 100%;
  }

  /* Stats grid auto wrap */
  .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ===================== RESPONSIVE: MOBILE (≤768px) ===================== */
@media (max-width: 768px) {
  /* --- SIDEBAR --- */
  .hamburger {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 150;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }

  .main {
    margin-left: 0;
    padding: 16px;
    padding-top: 60px;
  }

  /* --- PAGE HEADER --- */
  .page-header h2 {
    font-size: 18px;
  }

  /* --- STATS & CARDS --- */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* --- TABLE SCROLL --- */
  .table-wrap,
  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 480px;
  }

  /* --- MISC LAYOUT --- */
  .aksi-wrap {
    flex-wrap: wrap;
    gap: 6px;
  }
  .section-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .filter-bar {
    flex-wrap: wrap;
  }
  .filter-bar input {
    width: 100%;
  }
  .btn-atur-jam {
    margin-left: 0;
  }
  .view-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* --- BOT STATUS --- */
  .bot-status-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
  }
  .btn-controls {
    width: 100%;
  }
  .btn-start,
  .btn-stop {
    flex: 1;
    justify-content: center;
  }
  .log-body {
    height: 300px;
  }

  /* --- VENDOR / SHIO HEADER --- */
  .vendor-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
  }
  .shio-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
  }
  .shio-topbar .btn-refresh {
    width: 100%;
    justify-content: center;
  }

  /* --- UPLOAD TEMPLATE --- */
  .tabs {
    width: 100%;
  }
  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 9px 12px;
  }
  .img-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  /* --- MODAL --- */
  .modal {
    width: calc(100vw - 32px);
    max-width: 100%;
    padding: 20px;
  }

  /* --- CARD (Tambah User) --- */
  .card {
    max-width: 100%;
    padding: 20px;
  }

  /* -----------------------------------------------
     CONFIG BOT — PERBAIKAN UTAMA
  ----------------------------------------------- */

  /* Section config: kurangi padding */
  .section {
    padding: 14px;
  }

  /* Form row: label di atas, input di bawah */
  .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .form-row > label {
    width: 100%;
    min-width: unset;
    height: auto;
    padding-top: 0;
  }

  /* XY pair tetap sejajar tapi full width */
  .xy-pair {
    flex: 1;
    width: 100%;
  }

  /* Shadow row wrap */
  .shadow-row {
    flex-wrap: wrap;
  }

  /* Chatid row */
  .chatid-row {
    flex-wrap: wrap;
  }
  .chatid-row select {
    width: 100%;
  }

  /* KB row */
  .kb-row-inputs {
    flex-direction: column;
  }

  /* Gradient stop */
  .gradient-stop {
    flex-wrap: wrap;
  }

  /* SHIO POSITIONS GRID: 2 kolom → 1 kolom */
  .shio-positions-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
  }

  /* Pastikan shio pos item tidak overflow */
  .shio-pos-item {
    width: 100%;
    box-sizing: border-box;
  }

  /* Preview panel: full width, tidak sticky */
  .preview-panel {
    position: static !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Config layout sudah 1 kolom dari tablet breakpoint */
  .config-layout {
    grid-template-columns: 1fr;
  }

  /* Pasaran form row */
  .form-card .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .form-card .btn-primary {
    width: 100%;
    text-align: center;
  }
}

/* ===================== RESPONSIVE: SMALL (≤480px) ===================== */
@media (max-width: 480px) {
  .main {
    padding: 12px;
    padding-top: 56px;
  }
  .page-header h2 {
    font-size: 16px;
  }
  .stat-value {
    font-size: 28px;
  }
  .action-card {
    padding: 20px;
  }
  .section {
    padding: 12px;
  }

  /* Shio positions: tetap 1 kolom */
  .shio-positions-grid {
    grid-template-columns: 1fr !important;
  }

  /* img grid */
  .img-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Table min width lebih kecil */
  .table-card table,
  .table-wrap table {
    min-width: 360px;
  }

  /* Config form row label lebih kecil */
  .form-row > label {
    font-size: 11px;
  }
}

/* ===================== HAMBURGER ===================== */

/* Fix textarea caption biar gak menyempit */
.form-row > div > textarea {
  width: 100%;
  box-sizing: border-box;
}
