/* =========================================
   style.css — Style riêng bổ sung cho Tailwind (glass, gradient, modal,
   toast, tag-chip, hiệu ứng copy...). Các style layout/spacing thông
   thường dùng thẳng class Tailwind ngay trong HTML/JS, không lặp ở đây.
   ========================================= */

body { font-family: 'Inter', system-ui, sans-serif; }

.glass {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.accent-gradient {
  background: linear-gradient(135deg, #4f46e5, #22d3ee);
}

/* ---------------- Bottom nav ---------------- */
.nav-item { display: flex; flex-direction: column; align-items: center; color: #94a3b8; transition: color .15s; }
.nav-item i { font-size: 22px; }
.nav-item span { font-size: 11px; margin-top: 4px; }
.nav-item.active { color: #2dd4bf; }

/* ---------------- Tab panels ---------------- */
.tab-panel { animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000; padding: 0;
}
.modal-sheet {
  width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  border-radius: 28px 28px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { font-size: 20px; font-weight: 700; color: #fff; margin: 0; }
.modal-close-btn { width: 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(100,116,139,0.15); color: #cbd5e1; border: none; }
.modal-close-btn:hover { background: rgba(100,116,139,0.3); }

/* ---------------- Toast ---------------- */
#customToast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-140%);
  background: rgba(15,23,42,0.95); border: 1px solid rgba(100,116,139,0.35);
  color: #e2e8f0; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  display: flex; align-items: center; gap: 8px; z-index: 2000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: transform .25s ease; pointer-events: none;
}
#customToast.show { transform: translateX(-50%) translateY(0); }

/* ---------------- Inputs ---------------- */
.field-input {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(100,116,139,0.35);
  border-radius: 14px; padding: 12px 14px; color: #e2e8f0; outline: none; font-size: 15px;
}
.field-input::placeholder { color: #64748b; }
.field-input:focus { border-color: #2dd4bf; }

/* ---------------- Copy flash ---------------- */
.copy-flash { animation: flashPulse .5s ease; }
@keyframes flashPulse { 0% { box-shadow: 0 0 0 0 rgba(45,212,191,0.6); } 100% { box-shadow: 0 0 0 12px rgba(45,212,191,0); } }

/* ---------------- Chevron (collapse) ---------------- */
.chevron { transition: transform .18s ease; flex-shrink: 0; color: #94a3b8; }
.chevron.open { transform: rotate(90deg); }

/* ---------------- Tag / label chip ---------------- */
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; background: rgba(79,70,229,0.18);
  color: #a5b4fc; border: 1px solid rgba(79,70,229,0.35); white-space: nowrap;
}
.tag-chip.teal { background: rgba(45,212,191,0.15); color: #5eead4; border-color: rgba(45,212,191,0.35); }
.tag-chip .tag-x { cursor: pointer; opacity: .7; }
.tag-chip .tag-x:hover { opacity: 1; }
.tag-filter-chip {
  font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(100,116,139,0.35); color: #94a3b8;
  white-space: nowrap; flex-shrink: 0;
}
.tag-filter-chip.active { background: rgba(45,212,191,0.18); border-color: rgba(45,212,191,0.5); color: #5eead4; }
.tag-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tag-scroll::-webkit-scrollbar { display: none; }

/* ---------------- Pin badge ---------------- */
.pin-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(250,204,21,0.15); color: #fde047; border: 1px solid rgba(250,204,21,0.35); }

/* ---------------- Skeleton loading ---------------- */
.skeleton-block { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.04) 63%); background-size: 400% 100%; animation: skeletonShine 1.3s ease infinite; border-radius: 20px; }
@keyframes skeletonShine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- Password eye toggle ---------------- */
.eye-toggle-btn { background: transparent; border: none; color: #64748b; padding: 6px; }
.eye-toggle-btn:hover { color: #cbd5e1; }

/* ---------------- Lock screen ---------------- */
.lock-screen { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 12px; gap: 16px; }
.lock-icon { width: 64px; height: 64px; border-radius: 20px; background: rgba(79,70,229,0.15); display: flex; align-items: center; justify-content: center; font-size: 26px; color: #a5b4fc; }

/* ---------------- Scrollbar (desktop) ---------------- */
* { scrollbar-width: thin; scrollbar-color: rgba(100,116,139,0.4) transparent; }

/* ---------------- Save status LED ---------------- */
.led-dot { display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: transparent; }
.led-dot.saving { background: #fbbf24; animation: ledPulse 1s ease infinite; }
.led-dot.saved { background: #2dd4bf; }
.led-dot.error { background: #f87171; }
@keyframes ledPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------------- FAQ image thumbnails ---------------- */
.faq-images-row { display: flex; flex-wrap: wrap; gap: 8px; }
.faq-thumb { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,0.04); border: 1px solid rgba(100,116,139,0.3); flex-shrink: 0; }
.faq-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.faq-thumb.faq-thumb-loading { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.04) 63%); background-size: 400% 100%; animation: skeletonShine 1.3s ease infinite; }
.faq-thumb.faq-thumb-error::after { content: "\f06a"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #f87171; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.faq-thumb-actions { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; gap: 3px; padding: 4px; opacity: 0; transition: opacity .15s; background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%); }
.faq-thumb:hover .faq-thumb-actions, .faq-thumb:active .faq-thumb-actions { opacity: 1; }
.faq-thumb-actions button { width: 22px; height: 22px; border-radius: 999px; background: rgba(15,23,42,0.85); color: #e2e8f0; border: none; display: flex; align-items: center; justify-content: center; }
.faq-add-image-btn { width: 72px; height: 72px; border-radius: 12px; border: 1px dashed rgba(100,116,139,0.5); color: #64748b; font-size: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; }
.faq-add-image-btn:hover { border-color: #2dd4bf; color: #2dd4bf; }
