/* ============================================================
 * AIOTKU AGENT — Overrides di atas HopeUI
 * ============================================================ */

/* ===== Soft pill badges ===== */
.badge-soft-primary   { background: rgba(58,87,232,.12);  color: #3a57e8; }
.badge-soft-success   { background: rgba(26,160,83,.12);  color: #1aa053; }
.badge-soft-warning   { background: rgba(255,168,38,.15); color: #b95e00; }
.badge-soft-danger    { background: rgba(192,50,33,.12);  color: #c03221; }
.badge-soft-info      { background: rgba(8,177,186,.12);  color: #08b1ba; }
.badge-soft-secondary { background: rgba(138,146,166,.15); color: #5d6577; }
.badge-soft-dark      { background: rgba(35,45,66,.12);   color: #232d42; }

/* ===== Banner header (iq-navbar-header) typography ===== */
.iq-navbar-header h1 { color: #fff !important; font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.iq-navbar-header p  { color: rgba(255,255,255,.85); font-size: 13.5px; margin: 0; }

/* ===== KPI / Stat card icon ===== */
.kpi-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; flex-shrink: 0;
}
.kpi-icon.bg-primary-gradient   { background: linear-gradient(135deg, #3a57e8, #6377e9); }
.kpi-icon.bg-success-gradient   { background: linear-gradient(135deg, #1aa053, #4ec97a); }
.kpi-icon.bg-warning-gradient   { background: linear-gradient(135deg, #ffd329, #ffa826); }
.kpi-icon.bg-danger-gradient    { background: linear-gradient(135deg, #c03221, #e74c3c); }
.kpi-icon.bg-info-gradient      { background: linear-gradient(135deg, #08b1ba, #4fc3c7); }
.kpi-icon.bg-secondary-gradient { background: linear-gradient(135deg, #8a92a6, #b8bfcf); }

/* ===== Chat bubble ===== */
.chat-window {
  background: #fff; border-radius: 12px;
  height: 70vh; display: flex; flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,.04);
}
.chat-header { padding: 14px 20px; border-bottom: 1px solid #eef0f3; }
.chat-body { flex: 1; overflow-y: auto; padding: 20px; background: #f8f9fc; }
.chat-input { border-top: 1px solid #eef0f3; padding: 14px 20px; display: flex; gap: 10px; }
.bubble {
  max-width: 70%; padding: 10px 14px; border-radius: 12px;
  margin-bottom: 10px; font-size: 14px; word-wrap: break-word;
}
.bubble-in  { background: #fff; border: 1px solid #eef0f3; align-self: flex-start; border-bottom-left-radius: 2px; }
.bubble-out { background: #3a57e8; color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.bubble-bot { background: #d1f2eb; color: #1a5b3a; align-self: flex-end; border-bottom-right-radius: 2px; }
.bubble .meta { font-size: 11px; opacity: .7; margin-top: 4px; }
.bubble-row { display: flex; flex-direction: column; }
.bubble-row.right { align-items: flex-end; }

/* ===== Login page ===== */
.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3a57e8 0%, #08b1ba 100%);
  padding: 20px;
}
.login-card {
  background: #fff; border-radius: 16px;
  padding: 40px 36px 32px; max-width: 400px; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
}
.login-card .logo {
  text-align: center; margin-bottom: 20px;
}
.login-card .logo img {
  max-width: 120px !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
}
.login-card .logo .brand-name {
  font-size: 18px; font-weight: 700; color: #3a57e8; margin-top: 12px;
}
.login-card .logo .tagline { color: #8a92a6; font-size: 12.5px; margin-top: 4px; }

/* ===== DataTables HopeUI tweaks ===== */
table.dataTable thead th {
  background: #f5f6fa !important; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .3px;
  color: #6b7280 !important; border-bottom: 1px solid #dee2e6 !important;
}
table.dataTable tbody td { font-size: 13px; padding: 10px 12px; vertical-align: middle; }
table.dataTable tbody tr:hover td { background: #f8f9fc; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #3a57e8 !important; color: #fff !important;
  border: none !important; border-radius: 6px !important;
}
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 4px 10px; font-size: 13px;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: #3a57e8; box-shadow: 0 0 0 3px rgba(58,87,232,.1); outline: none; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter {
  font-size: 13px; margin: 0;
}
.dataTables_wrapper .dataTables_filter { text-align: right; }
.dataTables_wrapper .dataTables_filter input { min-width: 220px; margin-left: 8px; }
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; color: #4a5568;
}
.dataTables_wrapper .dataTables_info { font-size: 12.5px; color: #6b7280; padding-top: 6px; }
.dataTables_wrapper .dataTables_paginate { padding-top: 6px; }

/* DataTables wrapper rows — tighten the col layout (length tight on left, filter on right) */
.dataTables_wrapper > .row { margin-left: 0; margin-right: 0; }
.dataTables_wrapper > .row > [class*="col-"] { padding-left: 0; padding-right: 0; }
.dataTables_wrapper > .row:first-child {
  padding: 14px 0 12px;
  border-bottom: 1px solid #eef0f3;
  margin-bottom: 12px;
  align-items: center;
}
.dataTables_wrapper > .row:first-child > .col-sm-12:first-child {
  flex: 0 0 auto; width: auto; max-width: none;
}
.dataTables_wrapper > .row:first-child > .col-sm-12:last-child {
  flex: 1 1 auto; width: auto; max-width: none; text-align: right;
}
.dataTables_wrapper > .row:last-child {
  padding-top: 12px;
  border-top: 1px solid #eef0f3;
  margin-top: 8px;
  align-items: center;
}

/* ===== Form controls ===== */
.form-label { font-size: 12px; font-weight: 600; color: #4a5568; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; }

/* ===== Utilities ===== */
.text-muted-soft { color: #8a92a6; }
.cursor-pointer { cursor: pointer; }
.empty-state { text-align: center; padding: 60px 20px; color: #8a92a6; }
.empty-state .ph-icon {
  width: 72px; height: 72px; border-radius: 18px;
  background: #eff6ff; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty-state .ph-icon i { font-size: 30px; color: #3a57e8; }

/* ===== Filter section ===== */
.filter-section {
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #eef0f3;
}
.filter-section label { font-size: 11.5px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.card > .filter-section:first-child {
  border-top-left-radius: var(--bs-card-inner-border-radius, 1rem);
  border-top-right-radius: var(--bs-card-inner-border-radius, 1rem);
}

/* ===== Status dot ===== */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.success { background: #1aa053; box-shadow: 0 0 0 3px rgba(26,160,83,.2); }
.status-dot.warning { background: #ffa826; }
.status-dot.danger  { background: #c03221; }
.status-dot.muted   { background: #b8bfcf; }

/* ===== Card tweaks ===== */
.card { border: none; box-shadow: 0 4px 24px rgba(0,0,0,.04); }
.card-header { background: transparent; border-bottom: 1px solid #eef0f3; padding: 14px 20px; }
.card-header .card-title { font-size: 15px; font-weight: 600; margin: 0; }

/* ===== Sidebar logo sizing — keep clear of the absolute-positioned toggle ===== */
.sidebar .sidebar-header .navbar-brand {
  padding-right: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.sidebar .sidebar-logo-full {
  height: 28px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.sidebar .sidebar-logo-mini {
  height: 28px;
  width: 28px;
  object-fit: contain;
  display: block;
}

/* ===== Top navbar visual tweak ===== */
.iq-navbar .search-input h5 {
  white-space: nowrap;
}
