/* ui-components.css - Thanh điều hướng, Lời nhắn & Hướng dẫn, Bảng Quản trị viên, Trình phát nhạc nền */

[hidden] {
  display: none !important;
}

/* ========================================================
   1. CRITICAL CURSOR FIX FOR MODALS & UI COMPONENTS
   ======================================================== */
body.admin-open,
body.admin-open *,
body.guide-open,
body.guide-open * {
  cursor: auto !important;
}
body.admin-open button,
body.admin-open a,
body.admin-open select,
body.admin-open input[type="file"],
body.admin-open .file-dropzone,
body.admin-open .music-upload-dropzone,
body.admin-open .admin-tab-btn,
body.admin-open .card-btn,
body.admin-open .toggle-pass-btn,
body.admin-open .admin-close-btn,
body.guide-open button,
body.guide-open a,
.bgm-player button,
.bgm-player input[type="range"] {
  cursor: pointer !important;
}
body.admin-open input[type="text"],
body.admin-open input[type="password"] {
  cursor: text !important;
}
body.admin-open #focus-cursor,
body.guide-open #focus-cursor {
  display: none !important;
}

/* ========================================================
   2. TOP NAVIGATION BAR (Góc trái trên cùng)
   ======================================================== */
.top-nav-bar {
  position: absolute;
  z-index: 10;
  left: clamp(16px, 2.5vw, 36px);
  top: clamp(16px, 2.5vw, 34px);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: clamp(38px, 4.2dvh, 44px);
  padding: 0 clamp(14px, 1.1vw, 20px);
  border-radius: 999px;
  background: rgba(12, 16, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f2f2f0;
  font: 500 clamp(12px, 0.85vw, 14px)/1 var(--sans);
  letter-spacing: .02em;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: all .25s cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
}
.nav-pill-btn:hover {
  background: rgba(30, 38, 52, 0.95);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.nav-pill-btn:active {
  transform: translateY(0) scale(0.97);
}
.nav-pill-btn.guide-btn {
  background: linear-gradient(135deg, rgba(28, 45, 68, 0.88), rgba(15, 24, 38, 0.82));
  border-color: rgba(130, 190, 255, 0.35);
}
.nav-pill-btn.guide-btn:hover {
  border-color: rgba(150, 210, 255, 0.7);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35);
}
.nav-pill-btn.admin-btn {
  background: rgba(22, 22, 28, 0.78);
  border-color: rgba(255, 255, 255, 0.18);
  opacity: 0.9;
}
.nav-pill-btn.admin-btn:hover {
  opacity: 1;
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
}
body.portfolio-open .top-nav-bar {
  visibility: hidden;
}

/* ========================================================
   3. BACKGROUND MUSIC PLAYER (Góc trái dưới cùng)
   ======================================================== */
.bgm-player {
  position: absolute;
  z-index: 10;
  left: clamp(16px, 3.8vw, 42px);
  bottom: calc(clamp(16px, 3.8dvh, 40px) + 42px);
  display: flex;
  align-items: center;
  pointer-events: auto;
  user-select: none;
  transition: all .25s ease;
}
body.portfolio-open .bgm-player {
  visibility: hidden;
}
.bgm-card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: clamp(38px, 4.2dvh, 44px);
  padding: 0 14px 0 8px;
  border-radius: 999px;
  background: rgba(10, 14, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.bgm-player:hover .bgm-card {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.bgm-toggle-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
  flex-shrink: 0;
}
.bgm-toggle-btn:hover {
  background: #3b82f6;
  transform: scale(1.08);
}
.bgm-toggle-btn.playing {
  background: #10b981;
}
.bgm-waves {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.bgm-waves .bar {
  width: 2px;
  background: #fff;
  border-radius: 1px;
  animation: equalize 0.8s ease-in-out infinite alternate;
}
.bgm-waves .bar-1 { height: 4px; animation-delay: 0.1s; }
.bgm-waves .bar-2 { height: 11px; animation-delay: 0.3s; }
.bgm-waves .bar-3 { height: 7px; animation-delay: 0.2s; }
.bgm-waves .bar-4 { height: 12px; animation-delay: 0.4s; }

@keyframes equalize {
  0% { height: 3px; }
  100% { height: 12px; }
}

.bgm-info {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 170px;
  overflow: hidden;
  white-space: nowrap;
}
.bgm-label {
  font-size: 10px;
  font-family: var(--mono);
  color: #64748b;
  letter-spacing: .08em;
}
.bgm-title {
  font-size: 12px;
  font-weight: 500;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bgm-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.bgm-mute-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s ease;
}
.bgm-mute-btn:hover {
  color: #fff;
}
.bgm-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 55px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}
.bgm-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 6px #38bdf8;
}
.bgm-volume-val {
  font-size: 10px;
  font-family: var(--mono);
  color: #94a3b8;
  min-width: 26px;
}

/* ========================================================
   4. USER GUIDE MODAL
   ======================================================== */
.guide-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.guide-modal[hidden] {
  display: none !important;
}
.guide-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.guide-card {
  position: relative;
  z-index: 1;
  width: min(720px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.guide-modal.is-open .guide-card {
  transform: scale(1) translateY(0);
}
.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  color: #48bb78;
  text-transform: uppercase;
}
.guide-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48bb78;
  box-shadow: 0 0 8px #48bb78;
}
.guide-close-btn, .admin-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #aaa;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}
.guide-close-btn:hover, .admin-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: rotate(90deg);
}
.guide-scrollable {
  padding: 1.5rem 1.8rem;
  overflow-y: auto;
  color: #e2e8f0;
  font-family: var(--sans);
  line-height: 1.65;
}
.guide-title {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  color: #fff;
}
.guide-intro {
  font-size: 14.5px;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.guide-card-item {
  display: flex;
  gap: 14px;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: background .2s ease;
}
.guide-card-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.item-icon-wrap {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
}
.item-content h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #93c5fd;
}
.item-content p {
  margin: 0;
  font-size: 13.5px;
  color: #94a3b8;
}
.guide-closing {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.closing-text {
  font-size: 14px;
  font-style: italic;
  color: #cbd5e1;
  margin-bottom: 1rem;
}
.guide-author-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: 0.5rem;
}
.author-note {
  font-size: 12.5px;
  color: #94a3b8;
  margin-bottom: 2px;
}
.author-signature {
  font-family: 'Dancing Script', cursive, sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: #f6e05e;
  text-shadow: 0 2px 14px rgba(246, 224, 94, 0.35);
  letter-spacing: .02em;
  transform: rotate(-2deg);
}
.guide-footer {
  padding: 1rem 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.02);
}
.guide-confirm-btn {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all .2s ease;
}
.guide-confirm-btn:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.5);
}

/* ========================================================
   5. ADMIN LOGIN MODAL
   ======================================================== */
.admin-login-card {
  width: min(390px, 92vw) !important;
}
.login-header {
  text-align: center;
  margin-bottom: 1.4rem;
}
.login-icon {
  font-size: 32px;
  display: inline-block;
  margin-bottom: 8px;
}
.pass-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-input-wrap input {
  padding-right: 40px !important;
}
.toggle-pass-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  translate: 0 -50%;
  background: transparent;
  border: none;
  font-size: 16px;
  color: #888;
  cursor: pointer;
  padding: 4px;
}
.login-error {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 12.5px;
  margin-bottom: 1rem;
}
.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.5rem 0.9rem !important;
  font-size: 12.5px !important;
}

/* ========================================================
   6. ADMIN PANEL WITH TABS
   ======================================================== */
.admin-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.admin-modal[hidden] {
  display: none !important;
}
.admin-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.admin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 13, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.admin-container {
  position: relative;
  z-index: 1;
  width: min(1000px, 94vw);
  height: min(88vh, 850px);
  display: flex;
  flex-direction: column;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  transform: scale(0.97) translateY(10px);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.admin-modal.is-open .admin-container {
  transform: scale(1) translateY(0);
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.admin-title-wrap h2 {
  margin: 4px 0 0;
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  color: #fff;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: #f59e0b;
  text-transform: uppercase;
}
.admin-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}
.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 0 1.8rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.9rem 1.4rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.admin-tab-btn:hover {
  color: #e2e8f0;
}
.admin-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.06);
}
.admin-tab-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-tab-panel[hidden] {
  display: none !important;
}

/* Employee Toolbar & Grid */
.admin-toolbar {
  padding: 1rem 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}
.admin-search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}
.admin-search-box input {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 36px 0 36px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease;
}
.admin-search-box input:focus {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}
.admin-search-box .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  translate: 0 -50%;
  font-size: 14px;
  opacity: 0.6;
  pointer-events: none;
}
.admin-search-box .search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  translate: 0 -50%;
  background: transparent;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.admin-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  background: #2563eb;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.admin-primary-btn:hover:not(:disabled) {
  background: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.admin-primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.admin-primary-btn.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 14.5px;
}
.admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.4rem 1.8rem;
}
.admin-employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.admin-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: all .2s ease;
}
.admin-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}
.admin-card-img-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
}
.admin-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-card-code {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  color: #bbb;
  font-size: 9px;
  font-family: var(--mono);
  text-align: center;
  padding: 1px 0;
}
.admin-card-info {
  flex: 1;
  min-width: 0;
}
.admin-card-name {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-card-crop {
  font-size: 11px;
  color: #64748b;
}
.admin-card-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.card-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.card-btn.btn-replace:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #93c5fd;
}
.card-btn.btn-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}
.admin-empty {
  grid-column: 1 / -1;
  padding: 3rem;
  text-align: center;
  color: #64748b;
  font-size: 15px;
}

/* ========================================================
   7. MUSIC MANAGEMENT PANEL (Tab 2)
   ======================================================== */
.admin-music-panel {
  padding: 1.8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.music-section-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.5rem;
}
.music-section-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: #fff;
}
.current-music-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  margin-top: 1rem;
}
.music-disc-anim {
  font-size: 42px;
  animation: spinDisc 8s linear infinite;
}
@keyframes spinDisc {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.music-details {
  flex: 1;
}
.music-details h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #38bdf8;
}
.music-file-path {
  font-size: 12px;
  color: #94a3b8;
}
.music-file-path code {
  color: #fbbf24;
}
.music-upload-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 2.2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(56, 189, 248, 0.02);
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
}
.music-upload-dropzone:hover,
.music-upload-dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}
.music-upload-icon {
  font-size: 38px;
}
.music-upload-text {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}
.music-upload-sub {
  font-size: 12px;
  color: #94a3b8;
}
.music-selected-info {
  margin-top: 1.2rem;
  padding: 1.2rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.selected-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #fff;
}
.selected-size {
  color: #94a3b8;
  font-size: 12px;
}

/* ========================================================
   8. SUBMODALS (Thay ảnh, Sửa info, Thêm nhân viên)
   ======================================================== */
.admin-submodal {
  position: fixed;
  z-index: 110;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.admin-submodal[hidden] {
  display: none !important;
}
.admin-submodal-content {
  width: min(480px, 94vw);
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}
.admin-submodal-content h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #fff;
}
.submodal-desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #94a3b8;
}
.photo-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin-bottom: 1.2rem;
}
.preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.preview-label {
  font-size: 11.5px;
  color: #94a3b8;
}
.preview-old-img, .preview-new-img {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.preview-arrow {
  font-size: 20px;
  color: #3b82f6;
}
.submodal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 1.2rem;
}
.admin-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .15s ease;
}
.admin-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
}
.form-group input, .form-group select {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 12px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.form-group input:focus, .form-group select:focus {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}
.file-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.file-dropzone:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}
.dropzone-icon {
  font-size: 26px;
}
.dropzone-sub {
  font-size: 11.5px;
  color: #64748b;
}
.add-preview-img {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* ========================================================
   9. BGM PLAYER WIDGET (Trình phát nhạc nền góc trái dưới)
   ======================================================== */
.bgm-player {
  position: absolute;
  z-index: 10;
  left: clamp(16px, 2.5vw, 36px);
  bottom: clamp(16px, 2.5vw, 34px);
  pointer-events: auto;
  user-select: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}

.bgm-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 8px;
  background: rgba(12, 16, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transition: all .25s cubic-bezier(.2,.8,.2,1);
}

.bgm-card:hover {
  background: rgba(20, 26, 38, 0.94);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.2);
}

.bgm-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transition: all .2s ease;
  position: relative;
  flex-shrink: 0;
  padding: 0;
}

.bgm-toggle-btn:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.6);
}

.bgm-toggle-btn:active {
  transform: scale(0.94);
}

.bgm-toggle-btn.playing {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
}

.bgm-icon-play {
  font-size: 13px;
  margin-left: 2px;
}

.bgm-icon-pause {
  font-size: 13px;
}

/* Sound waves equalizer animation */
.bgm-waves {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.bgm-waves .bar {
  width: 2.5px;
  background: #38bdf8;
  border-radius: 2px;
  animation: bgmWaveAnim 1.2s ease-in-out infinite alternate;
}

.bgm-waves .bar-1 { height: 35%; animation-delay: 0.1s; }
.bgm-waves .bar-2 { height: 90%; animation-delay: 0.4s; }
.bgm-waves .bar-3 { height: 60%; animation-delay: 0.2s; }
.bgm-waves .bar-4 { height: 100%; animation-delay: 0.5s; }

@keyframes bgmWaveAnim {
  0% { height: 20%; opacity: 0.6; }
  100% { height: 100%; opacity: 1; }
}

.bgm-info {
  display: flex;
  flex-direction: column;
  max-width: 150px;
  min-width: 80px;
  line-height: 1.2;
}

.bgm-label {
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: .08em;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
}

.bgm-title {
  font-size: 12px;
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bgm-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bgm-mute-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}

.bgm-mute-btn:hover {
  color: #fff;
  transform: scale(1.15);
}

.bgm-volume-slider {
  width: 65px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  accent-color: #38bdf8;
}

.bgm-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  transition: transform .15s ease;
}

.bgm-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.bgm-volume-val {
  font-size: 10px;
  font-family: var(--mono);
  color: #94a3b8;
  min-width: 26px;
}

/* ========================================================
   10. ADMIN LOGIN CARD
   ======================================================== */
.admin-login-card {
  width: min(390px, 92vw);
  background: #0f141c;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  animation: loginCardPop .25s cubic-bezier(.2,.8,.2,1);
}

@keyframes loginCardPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.login-header {
  text-align: center;
  margin-bottom: 1.6rem;
}

.login-icon {
  font-size: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 12px;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.15);
}

.login-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.pass-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pass-input-wrap input {
  padding-right: 40px !important;
}

.toggle-pass-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
  color: #94a3b8;
  transition: opacity .15s;
}

.toggle-pass-btn:hover {
  opacity: 0.8;
}

.login-error {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 12.5px;
  margin-bottom: 1rem;
  animation: shakeError .3s ease-in-out;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.9rem !important;
  font-size: 12.5px !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fff !important;
}

/* Toast Notification */
.admin-toast {
  position: fixed;
  z-index: 150;
  bottom: 24px;
  left: 50%;
  translate: -50% 20px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 10px 22px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: all .28s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.admin-toast.show {
  opacity: 1;
  translate: -50% 0;
}
.admin-toast.success {
  background: #065f46;
  border-color: #10b981;
}
.admin-toast.error {
  background: #991b1b;
  border-color: #ef4444;
}

@media (max-width: 640px) {
  .top-nav-bar {
    top: 14px;
    left: 14px;
    gap: 6px;
  }
  .nav-pill-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 11.5px;
  }
  .bgm-player {
    bottom: calc(clamp(16px, 3.8dvh, 40px) + 36px);
  }
  .bgm-info {
    max-width: 100px;
  }
}
