/* ==========================================================================
   KODE REKENING BOSP SEARCH — STYLESHEET
   Clean CSS Architecture: No Inline Styles
   Matches Main App Palette & Material / Glassmorphism Design
   ========================================================================== */

:root {
  --primary: #059669;
  --primary-dark: #064e3b;
  --primary-light: #10b981;
  --primary-subtle: #ecfdf5;
  --bg-app: #f4f7f6;
  --bg-card: #ffffff;
  --border-card: #edf2f7;
  --border-subtle: #e5e7eb;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
}

body {
  background-color: var(--bg-app);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 1.25rem 0.75rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-page-wrapper {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

/* Header & Back Navigation */
.page-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.btn-nav-back {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-nav-back:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary-light);
  transform: translateX(-2px);
}

.badge-source-sync {
  font-size: 0.74rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.badge-source-sync.badge-warning {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.badge-source-sync.badge-success {
  color: #065f46;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.badge-source-sync.badge-danger {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

/* Main Card */
.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.4rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
}

.search-header-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.search-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #e0e7ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.search-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
}

.search-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}

/* Select2 Customization */
.select2-container {
  width: 100% !important;
}

.select2-container .select2-selection--single {
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  transition: all 0.2s ease;
  background: #ffffff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  padding-left: 0;
  line-height: 50px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 50px;
  right: 12px;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.select2-dropdown {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 1060;
}

.select2-results__option {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid #f1f5f9;
}

.select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary-subtle) !important;
  color: var(--primary-dark) !important;
}

/* Quick Search Pills */
.quick-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.quick-pill-item {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 0.32rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.quick-pill-item:hover {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--primary-light);
}

/* Result Box */
.kode-result-card {
  background: linear-gradient(145deg, #f0fdf4 0%, #f8fafc 50%, #ffffff 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 18px;
  padding: 1.35rem 1.25rem;
  margin-top: 1.5rem;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.08);
  animation: fadeInDown 0.25s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-top-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4f46e5;
  background: #e0e7ff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.kode-hero-display {
  background: #ffffff;
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.kode-number-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin: 0;
  word-break: break-all;
}

.btn-copy-code {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-copy-code:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-copy-code:active {
  transform: scale(0.96);
}

.detail-row-item {
  margin-bottom: 0.75rem;
}

.detail-row-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  margin-bottom: 0.2rem;
}

.detail-row-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin: 0;
}

.action-shortcuts-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(16, 185, 129, 0.25);
}

.btn-shortcut {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  padding: 0.55rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-shortcut:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* Sync Banner Bar */
.sync-bar-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 0.85rem;
}

.sync-bar-left {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-muted);
}

.sync-time-grid {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.sync-time-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.77rem;
  color: var(--text-muted);
}

.sync-time-item i {
  font-size: 0.82rem;
}

.sync-time-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.sync-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sync-action {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-sync-action:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
}

.btn-sync-action.syncing i {
  animation: spin 0.8s linear infinite;
}

.btn-config-action {
  background: var(--primary-subtle);
  border: 1px solid var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-config-action:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Empty Data Alert Banner */
.empty-data-alert {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.empty-data-alert h6 {
  color: #92400e;
  font-weight: 700;
}

.empty-data-alert p {
  color: #78350f;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* Modal Customization */
.modal-content-custom {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-md);
}

.modal-header-custom {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.15rem 1.4rem;
}

.modal-body-custom {
  padding: 1.4rem;
}

.modal-footer-custom {
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 1.4rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Guide Accordion */
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.guide-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.guide-list {
  padding-left: 1.2rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-code-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: #334155;
  margin-top: 0.6rem;
  overflow-x: auto;
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 2000;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Disclaimer Alert Box */
.disclaimer-alert-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4.5px solid #d97706;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #92400e;
  box-shadow: var(--shadow-sm);
}

.disclaimer-alert-box i {
  font-size: 1.15rem;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.disclaimer-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.2rem;
  display: block;
  color: #b45309;
}

@media (max-width: 576px) {
  .search-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }
  .kode-hero-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .btn-copy-code {
    width: 100%;
    justify-content: center;
  }
  .action-shortcuts-row {
    flex-direction: column;
  }
  .sync-bar-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
}
