/* ============================================================
   DataVault — Pencarian Semua Data (Dashboard Pengguna)
   Kartu pencarian di halaman + dropdown di kotak cari header. Mengikuti variabel tema (terang/gelap).
   ============================================================ */
.ds-card { position: relative; margin-bottom: var(--space-6, 24px); padding: var(--space-5, 20px); background: var(--bg-white, #fff); border: 1px solid var(--border, #E5E7EB); border-radius: var(--radius-lg, 18px); box-shadow: var(--shadow-sm, 0 2px 10px rgba(0, 0, 0, .06)); animation: ds-in .6s cubic-bezier(.2, .8, .2, 1) both; overflow: hidden; }
.ds-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, transparent, var(--gold-medium, #E6A817), transparent); background-size: 200% 100%; animation: ds-sweep 4s linear infinite; }
.ds-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ds-head h3 { margin: 0; font-size: var(--font-size-lg, 18px); color: var(--text-dark, #111827); }
.ds-head p { margin: 4px 0 0; color: var(--text-muted, #6B7280); font-size: var(--font-size-sm, 14px); }
.ds-hint { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted, #6B7280); font-size: 12px; }
.ds-hint kbd, .ds-kbd { font: inherit; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 7px; border: 1px solid var(--border, #E5E7EB); border-bottom-width: 2px; background: var(--bg-section, #F3F4F6); color: var(--text-dark, #111827); }

.ds-box { position: relative; display: flex; align-items: center; background: var(--bg-section, #F3F4F6); border: 2px solid var(--border, #E5E7EB); border-radius: 999px; padding: 0 10px 0 16px; transition: border-color .25s, box-shadow .25s, background .25s, transform .25s; }
.ds-box:focus-within { background: var(--bg-white, #fff); border-color: var(--gold-medium, #E6A817); box-shadow: 0 0 0 5px rgba(230, 168, 23, .18); transform: translateY(-1px); }
.ds-ico { flex: 0 0 auto; width: 22px; text-align: center; transition: transform .3s; }
.ds-box:focus-within .ds-ico { animation: ds-wobble 1.2s ease-in-out infinite; }
.ds-box.busy .ds-ico { animation: none; }
.ds-box.busy .ds-ico::after { content: ''; display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--gold-medium, #E6A817); border-top-color: transparent; animation: ds-spin .6s linear infinite; vertical-align: middle; }
.ds-box.busy .ds-ico > span { display: none; }
.ds-box input { flex: 1; min-width: 0; height: 48px; padding: 0 10px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text-dark, #111827); }
.ds-box input::placeholder { color: var(--text-muted, #6B7280); opacity: 1; }
.ds-box input::-webkit-search-cancel-button { display: none; }
.ds-clear { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--border, #E5E7EB); color: var(--text-dark, #111827); cursor: pointer; font-size: 13px; line-height: 1; animation: ds-pop .25s ease both; }
.ds-clear:hover { background: var(--gold-light, #FDE68A); }
.ds-clear[hidden] { display: none; }

/* panel hasil (inline di kartu) dan dropdown (header) */
.ds-panel { margin-top: 12px; border: 1px solid var(--border, #E5E7EB); border-radius: var(--radius-md, 14px); background: var(--bg-white, #fff); overflow: hidden; transform-origin: top center; animation: ds-drop .28s cubic-bezier(.2, .8, .2, 1) both; }
.ds-panel[hidden] { display: none; }
.ds-pop { position: absolute; left: 0; top: calc(100% + 8px); width: min(560px, 92vw); max-height: min(72vh, 620px); overflow: auto; z-index: 80; border: 1px solid var(--border, #E5E7EB); border-radius: var(--radius-md, 14px); background: var(--bg-white, #fff); box-shadow: 0 18px 50px rgba(0, 0, 0, .22); transform-origin: top left; animation: ds-drop .25s cubic-bezier(.2, .8, .2, 1) both; }
.ds-pop[hidden] { display: none; }
.ds-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 14px 4px; }
.ds-chip { appearance: none; border: 1px solid var(--border, #E5E7EB); background: var(--bg-section, #F3F4F6); color: var(--text-dark, #111827); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; animation: ds-pop .3s ease both; animation-delay: calc(var(--i, 0) * 40ms); }
.ds-chip:hover { transform: translateY(-1px); border-color: var(--gold-medium, #E6A817); }
.ds-chip[aria-pressed="true"] { background: var(--gold-medium, #E6A817); border-color: var(--gold-medium, #E6A817); color: #1F1300; }
.ds-chip b { font-variant-numeric: tabular-nums; }
.ds-status { padding: 8px 16px 4px; color: var(--text-muted, #6B7280); font-size: 13px; }
.ds-status b { color: var(--text-dark, #111827); font-variant-numeric: tabular-nums; }
.ds-group { padding: 6px 8px 8px; }
.ds-gt { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #6B7280); }
.ds-gt a { font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--gold-dark, #B8860B); text-decoration: none; }
.ds-gt a:hover { text-decoration: underline; }
.ds-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--text-dark, #111827); cursor: pointer; border: 1px solid transparent; transition: background .18s, transform .18s, border-color .18s; animation: ds-item .38s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.ds-item:hover, .ds-item.is-active { background: var(--bg-section, #F3F4F6); border-color: var(--gold-medium, #E6A817); transform: translateX(4px); }
.ds-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--gold-light, #FEF3C7); }
.ds-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ds-t { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-m { color: var(--text-muted, #6B7280); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-go { flex: 0 0 auto; color: var(--text-muted, #6B7280); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
.ds-item:hover .ds-go, .ds-item.is-active .ds-go { opacity: 1; transform: none; }
.ds-t mark { background: rgba(230, 168, 23, .38); color: inherit; border-radius: 4px; padding: 0 2px; animation: ds-mark .5s ease both; }
.ds-more { display: block; width: calc(100% - 20px); margin: 4px 10px 6px; padding: 8px; border: 1px dashed var(--border, #E5E7EB); border-radius: 10px; background: transparent; color: var(--text-muted, #6B7280); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s; }
.ds-more:hover { border-color: var(--gold-medium, #E6A817); color: var(--text-dark, #111827); }
.ds-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border, #E5E7EB); background: var(--bg-section, #F3F4F6); color: var(--text-muted, #6B7280); font-size: 12px; flex-wrap: wrap; }
.ds-foot a { color: var(--gold-dark, #B8860B); font-weight: 700; text-decoration: none; }
.ds-empty { text-align: center; padding: 28px 16px; color: var(--text-muted, #6B7280); }
.ds-empty .big { font-size: 46px; display: inline-block; animation: ds-wobble 2s ease-in-out infinite; }
.ds-empty b { display: block; margin: 8px 0 4px; color: var(--text-dark, #111827); font-size: 16px; }
.ds-recent { padding: 12px 14px 14px; }
.ds-recent .lbl { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #6B7280); margin-bottom: 8px; }
.ds-recent .lbl button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--gold-dark, #B8860B); cursor: pointer; text-transform: none; letter-spacing: 0; }
.ds-tip { padding: 4px 16px 14px; color: var(--text-muted, #6B7280); font-size: 13px; }
.ds-tip b { color: var(--text-dark, #111827); font-variant-numeric: tabular-nums; }
.ds-skel { padding: 12px 14px; display: grid; gap: 10px; }
.ds-skel i { display: block; height: 52px; border-radius: 12px; background: linear-gradient(90deg, var(--bg-section, #F3F4F6) 20%, var(--border, #E5E7EB) 40%, var(--bg-section, #F3F4F6) 60%); background-size: 200% 100%; animation: ds-shimmer 1.2s linear infinite; }
.header-search .ds-pop .ds-chips { padding-top: 10px; }

@keyframes ds-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ds-drop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ds-item { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ds-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes ds-mark { from { background: transparent; } to { background: rgba(230, 168, 23, .38); } }
@keyframes ds-wobble { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-14deg) scale(1.12); } 75% { transform: rotate(10deg) scale(1.08); } }
@keyframes ds-spin { to { transform: rotate(360deg); } }
@keyframes ds-sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes ds-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (max-width: 640px) { .ds-card { padding: var(--space-4, 16px); } .ds-hint { display: none; } .ds-box input { height: 46px; } .ds-item:hover, .ds-item.is-active { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ds-card, .ds-card::before, .ds-panel, .ds-pop, .ds-item, .ds-chip, .ds-ico, .ds-empty .big, .ds-t mark, .ds-skel i, .ds-clear { animation: none !important; } .ds-box, .ds-item, .ds-chip { transition: none !important; } }

/* ---- kontras tautan emas (>= 4,5:1) di tema terang & gelap ---- */
.ds-gt a, .ds-foot a, .ds-recent .lbl button { color: #7A5600; }
[data-theme="dark"] .ds-gt a, [data-theme="dark"] .ds-foot a, [data-theme="dark"] .ds-recent .lbl button { color: #FCD34D; }
[data-theme="dark"] .ds-chip[aria-pressed="true"] { color: #1F1300; }
