:root {
  --font-base: 13px;
  --bg: #050816;
  --bg-elevated: #0b1020;
  --bg-soft: #111827;
  --primary: #38bdf8;
  --primary-soft: rgba(56, 189, 248, 0.12);
  --danger: #f97316;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 18px 60px rgba(15, 23, 42, 0.55);
  --border-subtle: 1px solid rgba(148, 163, 253, 0.12);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* THEMES */
/* ✅ Light theme – high contrast, easy to read */
:root[data-theme="light"] body,
:root[data-theme="light"] .app-shell {
  background: #f9fafb; /* slate-50 */
  color: #0f172a; /* slate-900 */
}

:root[data-theme="light"] .app-header {
  background: #e5e7eb; /* slate-200 */
  border-bottom: 1px solid #d1d5db;
}

:root[data-theme="light"] .card,
:root[data-theme="light"] .vault-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

:root[data-theme="light"] .vault-title span {
  color: #0f172a;
}

:root[data-theme="light"] .vault-meta {
  color: #6b7280; /* slate-500 */
}

:root[data-theme="light"] .cat-pill {
  background: #eff6ff; /* blue-50 */
  border-color: #3b82f6; /* blue-500 */
  color: #1d4ed8; /* blue-700 */
}

:root[data-theme="light"] .tag {
  background: #e5e7eb;
  color: #374151;
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d1d5db;
}

:root[data-theme="light"] .btn.primary {
  background: #2563eb; /* blue-600 */
  color: #ffffff;
}

:root[data-theme="light"] .btn.primary:hover {
  background: #1d4ed8; /* blue-700 */
}

/* ✅ AMOLED – true black background, neon cards */
:root[data-theme="amoled"] body,
:root[data-theme="amoled"] .app-shell {
  background: #000000;
  color: #e5e7eb;
}

:root[data-theme="amoled"] .app-header {
  background: #020617;
  border-bottom: 1px solid #0f172a;
}

:root[data-theme="amoled"] .card,
:root[data-theme="amoled"] .vault-item {
  background: #020617;
  border: 1px solid #0f172a;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.6);
}

:root[data-theme="amoled"] .cat-pill {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #bfdbfe;
}

:root[data-theme="amoled"] .tag {
  background: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
}

:root[data-theme="amoled"] .btn.primary {
  margin-left: 14px;
  background: #22c55e;
  color: #020617;
}
:root[data-theme="amoled"] .btn.primary:hover {
  background: #16a34a;
}

/* ✅ Sepia – document reading friendly */
:root[data-theme="sepia"] body,
:root[data-theme="sepia"] .app-shell {
  background: #fdf6e3; /* solarized-light style */
  color: #3f2f1b;
}

:root[data-theme="sepia"] .app-header {
  background: #f5e9d2;
  border-bottom: 1px solid #e0d3b8;
}

:root[data-theme="sepia"] .card,
:root[data-theme="sepia"] .vault-item {
  background: #fffaf0;
  border: 1px solid #e0d3b8;
  box-shadow: 0 1px 2px rgba(63, 47, 27, 0.12);
}

:root[data-theme="sepia"] .vault-meta {
  color: #8b7355;
}

:root[data-theme="sepia"] .cat-pill {
  background: #f5e3c2;
  border-color: #d97706;
  color: #92400e;
}

:root[data-theme="sepia"] .tag {
  background: #e0d3b8;
  color: #4b3b24;
}

:root[data-theme="sepia"] .btn.primary {
  background: #b45309;
  color: #fff7ed;
}
:root[data-theme="sepia"] .btn.primary:hover {
  background: #92400e;
}

/* ✅ Ocean – cool blue dashboard */
:root[data-theme="ocean"] body,
:root[data-theme="ocean"] .app-shell {
  background: radial-gradient(circle at top, #0ea5e9 0, #020617 55%);
  color: #e0f2fe;
}

:root[data-theme="ocean"] .app-header {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(56, 189, 248, 0.4);
}

:root[data-theme="ocean"] .card,
:root[data-theme="ocean"] .vault-item {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
}

:root[data-theme="ocean"] .vault-meta {
  color: #7dd3fc;
}

:root[data-theme="ocean"] .cat-pill {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #e0f2fe;
}

:root[data-theme="ocean"] .tag {
  background: rgba(37, 99, 235, 0.7);
  color: #eff6ff;
}

:root[data-theme="ocean"] .btn.primary {
  background: #22c55e;
  color: #022c22;
}
:root[data-theme="ocean"] .btn.primary:hover {
  background: #16a34a;
}

/* FONT SIZE */
:root[data-font="sm"] {
  --font-base: 12px;
}
:root[data-font="md"] {
  --font-base: 13px;
}
:root[data-font="lg"] {
  --font-base: 15px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-base);
  background: radial-gradient(
    circle at top,
    #111827 0,
    var(--bg) 55%,
    #000 100%
  );
  color: var(--text);
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 10px 28px;
}

/* =========================
   APP HEADER – glass + glow
   ========================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    120deg,
    rgba(56, 189, 248, 0.1),
    rgba(15, 23, 42, 0.95)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.85);
  padding: 10px 18px 6px;
}

/* ပထမ row: logo + actions */
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo side */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;

  background: radial-gradient(circle at 30% 0%, #38bdf8, #0f172a);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.4),
    0 0 18px rgba(56, 189, 248, 0.7);
}

.logo h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.logo p {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

/* Right side – theme + font + buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ဒုတိယ row: welcome message */
.welcome-banner {
  margin-top: 6px;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.35),
    rgba(56, 189, 248, 0.1)
  );
  color: #f77d04;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* JS က hidden class ထည့်ထားတဲ့အခါ ဖျောက်မယ် */
.welcome-banner.hidden {
  display: none;
}

/* Mobile header layout */
@media (max-width: 720px) {
  .header-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .settings-inline {
    flex: 1;
  }
}

.activity-log {
  margin-bottom: 3.5rem; /* footer buffer */
}

/* MOBILE – header ကို column ပြောင်း, welcome ကို အလယ်သီးသန့် */
@media (max-width: 768px) {
  .header-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .header-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .welcome-banner {
    width: 100%;
    margin-top: 0.4rem;
  }

  .activity-log {
    padding-bottom: 4.5rem; /* extra safe spacing for mobile */
  }
}

/* Theme / font selectors – compact pill style */
.settings-inline {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.settings-inline select {
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.settings-inline select:focus {
  background: rgba(30, 64, 175, 0.9);
}

/* Sign-in buttons – a bit more premium */
#btn-signin,
#btn-signout {
  border-radius: 999px;
  font-size: 14px;
  padding: 6px 14px;
}

/* BUTTONS */

.btn {
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn.primary {
  margin: 12px 0;
  background: var(--primary);
  color: #020817;
  font-weight: 600;
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.35);
}

.btn.ghost {
  margin-left: 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 253, 0.3);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--primary);
}

.btn.full {
  width: 100%;
}
.btn.small {
  padding: 4px 10px;
  font-size: 0.7rem;
}

.hidden {
  display: none !important;
}

/* CARDS & LAYOUT */

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  padding: 10px;
  margin-bottom: 17px;
  border: var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.dashboard {
  margin-bottom: 12px;
}

/* .layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.5fr);
  gap: 10px;
} */

.panel h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.hint {
  margin: 0 0 6px;
  font-size: 10px;
  color: var(--muted);
}

.label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
  display: block;
}

input,
select {
  margin: 3px 0 5px 10px;
  /* margin-left: 12px; */
  /* width: 100%; */
  padding: 6px 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(75, 85, 99, 0.9);
  background: rgba(5, 7, 16, 0.98);
  color: var(--text);
  font-size: 11px;
  outline: none;
  transition: all 0.16s ease;
}

input::placeholder {
  color: #6b7280;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.18);
  background: #020817;
}

.form-row {
  margin-bottom: 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Mini hint + warning */
.mini-hint {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(209, 213, 219, 0.9);
  margin-bottom: 6px;
}

.mini-hint strong {
  color: #f97316;
}

.mini-list {
  margin: 2px 0 0;
  padding-left: 14px;
  font-size: 9px;
  color: var(--muted);
}

/* Status line */
#vault-password-status.status {
  font-size: 12px;
  margin-bottom: 6px;
}

/* Lock button */
#btn-lock {
  padding: 10px 16px;
  border-radius: 12px;

  background: linear-gradient(90deg, #22c55eaa, #16a34add);
  color: #052e16;
  font-size: 18px;
  border: 1px solid #22c55e;

  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

#btn-lock:hover {
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.6);
  transform: translateY(-2px);
}

.status {
  margin: 3px 0 0;
  font-size: 9px;
  min-height: 10px;
}
.status.ok {
  color: #22c55e;
}
.status.err {
  color: #f97316;
}

/* DASHBOARD CARDS */

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.dash-card {
  padding: 7px 8px;
  border-radius: var(--radius-lg);
  background: radial-gradient(
    circle at top,
    rgba(56, 189, 248, 0.06),
    rgba(9, 9, 15, 0.98)
  );
  border: 1px solid rgba(75, 85, 99, 0.9);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  cursor: pointer;
  transition: all 0.14s ease;
}

.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.7);
  border-color: var(--primary);
}

.dash-label {
  font-size: 10px;
  color: var(--muted);
}

.dash-title {
  font-size: 12px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.dash-icon {
  font-size: 70px; /* 🔥 icon ကြီးကြီး */
  line-height: 1;
}

.dash-count {
  font-size: 10px;
}

.dash-name {
  font-weight: 600;
  font-size: 14px;
  opacity: 0.95;
}

/* VAULT LIST */

.vault-list {
  max-height: 440px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vault-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 253, 0.25);
  background: rgba(15, 23, 42, 0.65);
}

.vault-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.7);
  border-color: var(--primary);
}

.vault-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.vault-actions {
  display: flex;
  flex-direction: row; /* 👉 desktop မှာ row တန်းတစ်ကြောင်း */
  gap: 6px;
  justify-content: flex-end; /* ညာဘက်ထိုင်အောင် */
  align-items: center;
  flex-wrap: wrap; /* အကျယ်ကျပ်ရင် အောက်ကြောင်းဆင်းခွင့် */
}

.vault-title {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.vault-meta {
  font-size: 10.5px;
  color: var(--muted);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.712);
  border: 1px solid rgba(255, 255, 255, 0.12);

  transition: 0.18s ease;
}

.icon-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* COLORS for each action */
.icon-btn.preview {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
}
.icon-btn.preview:hover {
  background: #38bdf8;
  color: #020617;
}

.icon-btn.download {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
}
.icon-btn.download:hover {
  background: #22c55e;
  color: #020617;
}

.icon-btn.edit {
  background: rgba(234, 179, 8, 0.18);
  border-color: #eab308;
}
.icon-btn.edit:hover {
  background: #eab308;
  color: #020617;
}

.icon-btn.delete {
  background: rgba(249, 115, 22, 0.18);
  border-color: #f97316;
}
.icon-btn.delete:hover {
  background: #f97316;
  color: #020617;
}

/* Mobile Fix: 100% width tags wrap nicely */
@media (max-width: 600px) {
  .vault-item {
    flex-direction: column;
    align-items: stretch;
  }
  .vault-actions {
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 4px;
  }

  .footer-bar {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 8px;
    gap: 6px;
  }

  .footer-btn {
    width: 100%; /* FULL WIDTH */
    justify-content: center;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 12px;
  }

  .pass-row {
    gap: 6px;
  }

  #btn-lock {
    padding: 10px 14px;
    font-size: 17px;
  }
}

.tag {
  display: inline-flex;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 0.6rem;
  background: rgba(15, 23, 42, 0.98);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.24);
  margin-right: 2px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 1rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 253, 0.22);
  color: #9ca3af;
}

.album-label {
  font-size: 8px;
  color: #a855f7;
  margin-left: 4px;
}

/* SEARCH */

.search-row {
  display: flex;
  gap: 5px;
  align-items: center;
}

#search-input {
  flex: 1.6;
}
#filter-category {
  flex: 0.8;
}

/* MODAL */

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: min(900px, 96vw);
  max-height: 92vh;
  background: var(--bg-elevated);
  border-radius: 18px;
  padding: 10px;
  border: var(--border-subtle);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 51;
}

.modal-content.modal-xl {
  width: min(1280px, 98vw);
  max-height: 96vh;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.modal-header h3 {
  margin: 0;
  font-size: 13px;
}

.modal-body {
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10px;
}

.modal-item {
  padding: 6px 7px;
  border-radius: 12px;
  background: radial-gradient(
    circle at top,
    rgba(56, 189, 248, 0.04),
    rgba(5, 7, 16, 0.98)
  );
  border: 1px solid rgba(75, 85, 99, 0.8);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
}

/* RESPONSIVE */

@media (max-width: 800px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 22px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .vault-item,
  .modal-item {
    grid-template-columns: 1.4fr auto;
  }
}

/* Preview body centered */
.preview-body {
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  /* PDF / text ကြည်လင်အောင် */
  background: #ffffff;
  color: #111827;
}

#preview-modal .modal-body,
#preview-modal .preview-body {
  background: #ffffff;
  color: #111827;
}

/* Preview modal layout */
#preview-modal .modal-backdrop {
  position: fixed;
  inset: 0;
  /* z-index: 60; */
  display: flex;
  justify-content: center;
  align-items: flex-start;   /* 👈 အပေါ်မှာပဲ စထားမယ် */
  overflow-y: auto;          /* 👈 page ကြီးရင် scroll လိုရအောင် */
  padding: 1.5rem 0.75rem;
}

/* header ကို အပေါ်မှာ သီးသန့် row */
#preview-modal .modal-header {
  padding: 0.75rem 1rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.5);
}

/* Preview image base style */
.preview-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ===== PDF preview ===== */
.preview-pdf {
  width: 100%;
  height: calc(90vh - 100px);    /* header + padding တွေတွက်ပြီးစီးအောင် */
  border: none;
}

#preview-modal .modal-header .actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Edit form small adjust */
.edit-form .form-row {
  margin-bottom: 6px;
}

/* Photo album-ish grid if needed */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.photo-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 253, 0.2);
  background: rgba(2, 8, 23, 0.6);
}

.photo-card {
  padding: 5px;
  border-radius: 10px;
  background: radial-gradient(
    circle at top,
    rgba(236, 72, 153, 0.08),
    rgba(9, 9, 15, 0.98)
  );
  border: 1px solid rgba(75, 85, 99, 0.9);
  font-size: 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.photo-caption {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.photo-card-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-card-meta {
  color: var(--muted);
  font-size: 8px;
}

.tab-panel.hidden {
  display: none;
}

.tab-btn-dev {
  opacity: 0.7;
  font-size: 0.9rem;
}

.dev-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
  align-items: center;
}

.dev-textarea {
  width: 100%;
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #020617;
  color: #e5e7eb;
  resize: vertical;
}

/* ====== FOOTER BAR ====== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg, #0f172a);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  display: flex;
  justify-content: space-around;
  z-index: 1000;
}

.footer-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 16px;

  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.25s ease;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footer-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.footer-btn.active {
  background: linear-gradient(90deg, #38bdf8aa, #0ea5e9dd);
  border-color: #38bdf8;
  color: #0f172a;
  font-weight: bold;
  transform: translateY(-2px);
}

/* ====== BOTTOM DRAWER EFFECT ====== */
.tab-panel {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 80vh;
  overflow-y: auto;
  background: var(--card-bg, #0f172a);
  padding: 20px;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.45);
  transition: bottom 0.35s ease;
  z-index: 1500;
}

.tab-panel.active {
  bottom: 0;
}

.tab-panel .card {
  position: relative;
  background: transparent;
}

/* Drawer Close Button (X) */
.drawer-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: background 0.2s, transform 0.1s;
}

.drawer-close:hover {
  background: rgba(30, 64, 175, 0.95);
  transform: translateY(-1px);
}

/* Date input with icon on the right */
.input-with-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.input-with-icon input[type="date"] {
  width: 100%;
  padding-right: 2.5rem; /* icon နေရာလောက် ထပ်ထား */
}

.input-with-icon .icon-btn {
  position: absolute;
  right: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  opacity: 0.8;
}

.input-with-icon .icon-btn:hover {
  opacity: 1;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
}

.toast.hidden {
  display: none;
}

/* Footer buttons bar */
.footer-bar {
  position: sticky;
  bottom: 0 !;
  left: 0;
  right: 0;
  height: 75px;

  display: flex;
  justify-content: space-around;
  align-items: center;

  margin-top: 3rem;
  padding: 8px 12px;
  backdrop-filter: blur(14px);
  background: rgba(15, 23, 42, 0.65); /* slate-900 with glass */
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  z-index: 40;

  /* Gentle top shadow for floating effect */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.35);
}

/* Mobile မှာ button တွေကို 100% width ထည့်ချင်ရင် */
@media (max-width: 640px) {
  .footer-bar {
    flex-direction: column;
  }
  .footer-bar .btn {
    width: 100%;
    justify-content: center;
  }
}

.admin-tools {
  margin-top: 1rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ======================
   BIG VAULT CATEGORY CARDS START
   ====================== */
.vault-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.vault-cat-card {
  background: var(--card-bg, #ffffff10);
  border: 1px solid var(--border-color, #ffffff20);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.15s;
}

.vault-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px var(--shadow-color, rgba(0, 0, 0, 0.25));
}

.vault-cat-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 10px;
}

.vault-cat-title {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 4px;
}

.vault-cat-count {
  font-size: 13px;
  opacity: 0.6;
}
/* ======================
   BIG VAULT CATEGORY CARDS END
   ====================== */

/* === Vault main panels: heading & text sizes ထင်ရှားအောင် === */

.panel h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}

.hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
}

.label {
  font-size: 11px;
  letter-spacing: 0.02em;
}

input,
select,
textarea {
  padding: 10px;
  font-size: 12px;
}

/* Vault list / activity list ရဲ့ စာလည်း ချမ်းချမ်းမြင်ရအောင် */

.vault-list {
  font-size: 12px;
}

.mini-list li {
  font-size: 12px;
  line-height: 1.5;
}

/* === Card styles by section (left/right/admin) === */
.preview-icon {
  color: yellow;
}

/* =========================
   VAULT PASSWORD CARD
   ========================= */
.card-lock {
  margin-top: 10px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: radial-gradient(
    circle at top left,
    rgba(56, 189, 248, 0.08),
    rgba(15, 23, 42, 0.96)
  );
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.8);
  position: relative;
  overflow: hidden;
}

.card-lock::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 0 0,
    rgba(56, 189, 248, 0.18),
    transparent 60%
  );
  opacity: 0.8;
  pointer-events: none;
}

.card-lock .label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a5b4fc;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =============================
   Password + Lock Button Row
   ============================= */
.pass-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* Password input takes full space */
#vault-password {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

#vault-password::placeholder {
  color: rgba(148, 163, 184, 0.9);
  font-size: 13px;
}

.card-upload {
  border-left: 2px solid #3b82f6; /* blue */
  background: linear-gradient(
    135deg,
    rgba(59, 131, 246, 0.55),
    rgba(68, 82, 29, 0.571)
  );
}

.card-list {
  border-left: 2px solid #f97316; /* orange */
  background: linear-gradient(
    135deg,
    rgba(197, 135, 34, 0.559),
    rgba(67, 96, 35, 0.569)
  );
}

.card-activity {
  border-left: 2px solid #a855f7; /* purple */
  background: linear-gradient(
    135deg,
    rgba(185, 87, 250, 0.567),
    rgba(89, 88, 32, 0.569)
  );
}

/* Admin tools ကို သီးသန့် highlight */

.admin-tools {
  margin-top: 20px;
  border-left: 2px solid #eab308; /* amber */
  background: radial-gradient(
    circle at top left,
    rgba(250, 204, 21, 0.628),
    rgba(28, 43, 79, 0.562)
  );
}

.card.soft {
  background: linear-gradient(
    135deg,
    rgba(185, 87, 250, 0.567),
    rgba(89, 88, 32, 0.569)
  );
  border-left: 2px solid #a855f7;
}

.admin-tools h2 {
  font-size: 17px;
  margin-bottom: 4px;
}

.admin-tools .hint {
  font-size: 12px;
}

/* Light theme မှာ background နက်သွားမနေအောင် tone ပြန်ညှိ */

:root[data-theme="light"] .card-lock {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), #f9fafb);
}

:root[data-theme="light"] .card-upload {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), #f9fafb);
}

:root[data-theme="light"] .admin-tools {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.16), #f9fafb);
}

/* ==== MYVAULT IMAGE PREVIEW (SIMPLE, CLEAN) ==== */

/* Hidden state */
#preview-modal.hidden {
  display: none;
}

/* Root modal */
#preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999; /* အခြားအရာတွေထက် အပေါ်ထပ်မှာ */
}

/* Dark backdrop */
#preview-modal .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8); /* တင်းမက်နေလောက်ပဲ, blur မသုံး */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0.75rem;
}

/* White box */
#preview-modal .modal-content {
  background: #ffffff;
  color: #111827;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.6);

  width: min(52%, 100vw - 2rem);
  max-height: min(100vh, 100vh - 2rem);

  display: flex;
  flex-direction: column;
  overflow: hidden; /* header မဖြတ်အောင် */
}

/* Header row */
#preview-modal .modal-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

#preview-modal .modal-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

/* Header actions (↗ ✕) */
#preview-modal .modal-header .actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}


/* Scroll area (image body) */
#preview-body {
  flex: 1 1 auto;
  padding: 0.75rem 1rem 1rem;
  color: #111827;
  overflow: auto;          /* 👈 ကြီးနေရင် ဒီထဲမှာ scroll လိုက်မယ် */
  background: #000000;     /* image ကို ကြည်လင်စေဖို့ black bg */
}

/* Image preview – full width, full sharp, no crop */
#preview-body img.preview-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* ===== MyVault: Active row highlight ===== */
.vault-item.active-row,
.modal-item.active-row {
  border-color: #facc15;
  background: radial-gradient(
    circle at top,
    rgba(250, 204, 21, 0.14),
    rgba(15, 23, 42, 0.98)
  );
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
}

.vault-item.active-row .vault-title,
.modal-item.active-row .vault-title {
  color: #fef9c3;
}