/* 🖼️ Lightweight Lightbox (Vertical Layout) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: #000000;
  /* Solid black */
}

.lightbox-content {
  position: relative;
  z-index: 2001;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-image-container {
  position: relative;
  max-width: 95%;
  max-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  /* Cho phép pinch-zoom trong lightbox */
  touch-action: manipulation;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 90dvh;
  object-fit: contain;
  display: block;
}

.lightbox-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: none;
  /* Bỏ hiệu ứng mờ/gradient nền */
  color: #ffffff;
  text-align: left;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  /* Thêm bóng chữ để dễ đọc hơn khi không có nền */
}

.lightbox-info-overlay p {
  margin: 0;
  font-weight: 500;
}

#infoName {
  font-size: 16px;
  font-weight: 700;
}

#infoSize {
  font-size: 12px;
  opacity: 0.8;
}


/* 🔒 Internal Page Auth Styling */
/* 🔒 Màn hình khóa dính trong tab */
/* 🔒 Integrated Auth Box (Flat Design) */
.page-auth-inline {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  width: 100%;
  height: 100%;
}

.auth-box {
  width: 100%;
  max-width: 400px;
  padding: 40px 20px;
  text-align: center;
}

.auth-icon {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.auth-box h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-box p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 30px;
}

/* Reused Card-like styles but without card container or shadows */
.auth-input-wrapper {
  margin-bottom: 20px;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--surface-variant);
  color: var(--text-primary);
  text-align: center;
  font-size: 20px;
  letter-spacing: 2px;
}

.modal-icon .material-symbols-rounded {
  font-size: 30px;
  color: var(--text-primary);
}

/* 🔒 Secret Vault Trigger */
.secret-vault-trigger {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  background: var(--surface-variant);
  border: 1px solid var(--border-color);
}

.secret-icon {
  font-size: 48px;
  color: var(--text-secondary);
  opacity: 0.8;
}

/* 🔒 Secret Modal Layer */
.secret-auth-modal {
  position: fixed;
  inset: 0;
  background: var(--bg-primary-alpha);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 6000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.secret-auth-modal.active {
  display: flex;
  opacity: 1;
}

.secret-auth-card {
  background: var(--surface-variant);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.secret-auth-modal.active .secret-auth-card {
  transform: translateY(0);
}

.secret-auth-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.secret-auth-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 14px;
}


.icon-danger {
  color: var(--accent-danger) !important;
}

.icon-danger-bg {
  background: color-mix(in srgb, var(--accent-danger) 15%, var(--surface)) !important;
}

/* ⏳ Full-screen Action Loader Styling */
.action-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.action-loader-overlay .loader {
  scale: 1.5;
  margin-bottom: 30px;
}

.action-loader-overlay p {
  font-size: clamp(16px, 5vw, 24px);
  /* Tự động co giãn theo màn hình */
  font-weight: 700;
  color: var(--text-primary);
  max-width: 80%;
  line-height: 1.4;
}

.auth-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.auth-input-wrapper {
  margin-bottom: 20px;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-family: inherit;
  font-size: 18px;
  text-align: center;
  letter-spacing: 4px;
  background: var(--surface-variant);
  color: var(--text-primary);
  transition: all 0.2s;
}

.auth-input-wrapper input:focus {
  outline: none;
  border-color: var(--text-primary);
  background: var(--surface);
}

.auth-input-wrapper.error input {
  border-color: var(--accent-danger) !important;
  background: color-mix(in srgb, var(--accent-danger) 5%, var(--surface)) !important;
}

.auth-input-wrapper.error {
  animation: shake 0.43s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions button {
  position: relative;
  overflow: hidden;
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel {
  background: var(--surface-variant);
  color: var(--text-primary);
}

.btn-cancel:hover {
  background: var(--surface-hover);
}

.btn-confirm {
  background: var(--accent-danger);
  color: #ffffff;
  --md-ripple-pressed-color: rgba(255, 255, 255, 0.3);
  --md-ripple-hover-color: rgba(255, 255, 255, 0.2);
}

.btn-confirm:hover {
  opacity: 0.9;
}





:root {
  --bg-primary: #000000;
  --bg-primary-alpha: rgba(0, 0, 0, 0.95);
  --bg-secondary: #000000;
  --surface: #121212;
  --surface-variant: #1a1a1a;
  --surface-hover: #222222;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --button-primary: #222222;
  --border-color: #222222;
  --shadow-color: transparent;
  --bg-overlay: rgba(5, 5, 5, 0.90);

  /* Accent colors - Restored to original high contrast */
  --accent-primary: #1a73e8;
  --accent-danger: #ea4335;
}

/* 🌙 Permanent Dark Theme */
html,
body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

body {
  font-family: "Quicksand", ui-rounded, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  /* Prevent body scroll, use container scroll */
  height: 100dvh;
  width: 100vw;
  overscroll-behavior: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* Chặn pinch-zoom nhưng vẫn cho phép scroll */
  touch-action: pan-y;
}

input,
textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* Ẩn thanh cuộn nhưng vẫn cho phép cuộn */
* {
  -ms-overflow-style: none;
  /* Internet Explorer/Edge */
  scrollbar-width: none;
  /* Firefox */
}

*::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

.app-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px 0 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  /* padding-top removed for even spacing */
}

.header-top .logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.header-top .logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.search-container {
  flex: 1;
}

.nav-bar {
  display: flex;
  gap: 0;
  justify-content: flex-start;
  padding-bottom: 0;
  position: relative;
}

.nav-btn {
  flex: 1;
  max-width: none;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  transition: color 0.2s;
  --md-ripple-pressed-color: var(--text-primary);
  --md-ripple-hover-color: var(--text-primary);
}

.nav-btn.active {
  color: var(--text-primary);
}

.nav-btn .material-symbols-rounded {
  font-size: 24px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.nav-btn.active .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Thanh indicator trượt */
.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 25%;
  background: var(--text-primary);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform: translateX(0%);
}

@media (max-width: 600px) {
  .app-header {
    padding: 10px 12px 0 12px;
    gap: 8px;
  }
}

/* 🧱 Masonry Layout */
.gallery {
  position: relative;
  width: 100%;
  height: auto;
  margin-top: 0;
  padding-top: 0;
  box-sizing: border-box;
  opacity: 1;
  display: block;
}

.gallery-item {
  position: absolute;
  width: calc(25% - 16px);
  background: var(--surface-variant);
  border-radius: 0px;
  overflow: hidden;
  opacity: 1;
  will-change: transform, opacity;
  transition: transform 0.2s ease, opacity 0.3s ease;
}

/* Hiệu ứng khung sương (Skeleton Pulse) */
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--surface);
  opacity: 0.1;
  animation: skeleton-pulse 1.5s infinite;
  z-index: 1;
}

@keyframes skeleton-pulse {
  0% {
    opacity: 0.05;
  }

  50% {
    opacity: 0.15;
  }

  100% {
    opacity: 0.05;
  }
}

.gallery-item.img-loaded::after {
  display: none;
}

/* Skeleton shimmer removed for simplicity */

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0px;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.2s ease;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.gallery-item.img-loaded img {
  opacity: 1;
}

.gallery-item.loaded {
  opacity: 1;
}

.gallery-item:hover {
  box-shadow: none;
  z-index: 1;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Responsive Masonry */
@media (max-width: 1200px) {
  .gallery-item {
    width: calc(33.333% - 12px);
  }
}

@media (max-width: 900px) {
  .gallery-item {
    width: calc(50% - 12px);
  }
}

@media (max-width: 600px) {
  .gallery-item {
    width: calc(50% - 10px);
  }
}

/* 🟣 Sidebar Layout */


/* Main View Section Adjustment */
.views-pager {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  perspective: 1000px;
  /* Enable 3D space */
}

.views-slider {
  display: flex;
  width: 400%;
  /* 4 tabs */
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.15, 0, 0.15, 1);
  will-change: transform;
  transform-style: preserve-3d;
  /* Lock 3D rendering */
}

.view-section {
  width: 25%;
  /* 100% of pager */
  height: 100%;
  flex-shrink: 0;
  overflow-y: auto;
  position: relative;
  background: var(--bg-primary);
  -webkit-overflow-scrolling: touch;
  /* Smooth scroll on iOS */
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  /* Force hardware acceleration */
}

/* Base sections don't need display property anymore, visibility managed by views-slider */
.view-section.active {
  z-index: 1;
  /* For layered items if any */
}




#addPage {
  padding: 24px;
  display: flex !important;
  flex-direction: column;
  height: 100%;
}

/* ... */

.admin-container {
  max-width: 100%;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Khoảng cách đều giữa các phần tử */
  justify-content: space-between;
  /* Chia đều khoảng cách các phần tử so với mép trên dưới */
}

/* ... */

.upload-info {
  background: var(--surface);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  flex: 0 0 auto;
  /* Không co giãn, giữ chiều cao theo nội dung */
}

.upload-zone {
  width: 100%;
  flex: 1;
  /* Tự động giãn để lấp đầy khoảng trống ở giữa */
  border: 2px dashed var(--border-color);
  border-radius: 24px;
  background: var(--surface-variant);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: hidden;
  min-height: 150px;
}

#deletePage {
  padding: 20px 20px 0 20px;
  /* Dưới bằng 0 để bottom-bar dính sát */
}

#deleteContentView {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.delete-content {
  flex: 1;
  overflow-y: auto;
}

.bottom-bar {
  margin: 0 -20px;
  /* Phủ kín toàn chiều ngang bằng cách lấn ra ngoài padding của cha */
  padding: 12px 20px 24px 20px;
  /* Padding nội bộ chuẩn, thêm padding-bottom để nút lên cao */
  background: var(--bg-primary);
  border-top: none;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}



.view-section.active {
  display: flex;
  flex-direction: column;
}



.page-header {
  padding: 0;
  /* Đã có padding ở thẻ cha view-section */
  margin-bottom: 24px;
  flex-shrink: 0;
  text-align: center;
}

.page-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
}

/* Pull to Refresh */
.ptr-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transform: translateY(-100%);
  will-change: transform, opacity;
  background: transparent;
}

.gallery-wrapper {
  position: relative;
  z-index: 10;
  background: var(--bg-primary);
  will-change: transform;
  /* Transform sẽ được xử lý qua JS để đồng bộ với height của ptr-indicator */
}

.ptr-icon {
  width: 42px;
  height: 42px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ptr-icon .material-symbols-rounded {
  font-size: 24px;
}

.ptr-indicator.refreshing .ptr-icon .material-symbols-rounded {
  animation: ptr-spin 0.8s linear infinite;
}

@keyframes ptr-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* 🧭 Header & Search Bar Adjustment */
.top-bar {
  width: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 0;
  z-index: 1000;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .top-bar {
    padding: 0;
  }
}

/* Đảm bảo ảnh dính sát thanh ngang và không có đường kẻ thừa */
/* Đảm bảo ảnh dính sát thanh ngang và không có đường kẻ thừa */
.view-section.active {
  display: flex;
  flex-direction: column;
}

body.view-home .top-bar,
body.view-delete .top-bar {
  border-bottom: none;
}

.search-container {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0;
}

.search-wrapper {
  width: 100%;
  position: relative;
  height: 40px;
}

.search-wrapper input {
  width: 100%;
  height: 100%;
  padding: 0 20px 0 50px;
  border: none;
  border-radius: 12px;
  background: var(--surface-variant);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  /* Dùng shadow thay border để nét căng */
}

.search-wrapper input:focus {
  outline: none;
  background: var(--surface-hover);
  box-shadow: 0 0 0 1px var(--text-secondary);
}

/* Đổi màu icon khi focus vào input */
.search-wrapper input:focus+.search-icon,
.search-wrapper:focus-within .search-icon {
  color: var(--text-primary);
}

.search-wrapper input:focus+.search-icon .material-symbols-rounded,
.search-wrapper:focus-within .search-icon .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.search-wrapper.status input {
  background: var(--button-primary);
  color: var(--surface);
  text-align: center;
  padding: 0;
}

.search-wrapper.status .search-icon {
  display: none;
}

.search-container,
.search-wrapper,
.search-wrapper input,
.search-icon,
.search-icon .material-symbols-rounded {
  transition: none !important;
  animation: none !important;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-icon .material-symbols-rounded {
  font-size: 20px;
}

/* 🧱 Admin/Upload Styling */
/* 🧱 Admin/Upload Styling Redesign */


.upload-info h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.upload-info li {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  /* Căn lề trên để tránh lỗi hiển thị khi xuống dòng */
  gap: 10px;
  line-height: 1.6;
  /* Tăng khoảng cách dòng cho font ExtraLight */
}

.upload-info li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
  /* Đảm bảo chấm không bị co lại */
  margin-top: 8px;
  /* Căn chỉnh chấm với dòng text đầu tiên */
}

/* 🔄 Simple Upload Spinner (Different from Delete Loader) */
.upload-loader {
  width: 24px;
  height: 24px;
  border: 3px solid var(--surface-variant);
  border-bottom-color: var(--accent-primary);
  border-radius: 50%;
  display: inline-block;
  animation: uploadSpin 1s linear infinite;
}

@keyframes uploadSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 3%, transparent);
}

.upload-zone input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.upload-placeholder {
  pointer-events: none;
  text-align: center;
  color: var(--text-secondary);
}

.upload-placeholder .material-symbols-rounded {
  font-size: 64px;
  margin-bottom: 15px;
  color: var(--text-secondary);
}

.upload-zone.has-file .upload-placeholder .material-symbols-rounded {
  color: var(--accent-primary);
  transform: translateY(-5px);
}

.upload-preview-mini {
  position: absolute;
  inset: 0;
  object-fit: contain;
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  display: none;
  z-index: 1;
}

.btn-remove-file {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  background: var(--surface);
  color: var(--text-primary);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: none;
}

.upload-zone.error {
  border-color: var(--accent-danger) !important;
  background: color-mix(in srgb, var(--accent-danger) 5%, var(--surface-variant)) !important;
  animation: shake 0.43s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}



.upload-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 58px;
  /* Chiều dọc cố định */
  padding: 0 16px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  /* Đảm bảo đồng bộ font chữ */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  flex-shrink: 0;
  /* Không bị bóp méo khi màn hình nhỏ */
  --md-ripple-pressed-color: #ffffff;
  --md-ripple-hover-color: #ffffff;
}



.upload-btn:disabled {
  background: var(--surface-variant);
  color: var(--text-secondary);
  cursor: not-allowed;
}

#status {
  margin-top: 30px;
  font-size: 14px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 18px;
  border: 1px solid var(--border-color);
  display: none;
}

#status.visible {
  display: block;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-weight: 500;
}

/* 🗑️ Delete Specific Styling (Synced with Top-Bar) */
.view-section-flex {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.delete-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
  padding: 0;
}

.image-number {
  aspect-ratio: 1;
  background: var(--surface-variant);
  color: var(--text-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 700;
  font-size: 14px;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}



.image-number.selected {
  background: var(--accent-primary);
  color: #ffffff;
  transform: scale(0.9);
}

/* Bottom Bar (Like Search Bar) */

.btn-delete-selected,
.btn-clear-selection {
  position: relative;
  overflow: hidden;
  height: 36px;
  /* Reduced from 40px */
  /* Same height as search input */
  border: none;
  border-radius: 8px;
  /* Same radius as search input */
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  transition: all 0.2s;
}

.btn-delete-selected {
  background: var(--accent-danger);
  color: #fff;
  flex: 1;
  --md-ripple-pressed-color: #ffffff;
  --md-ripple-hover-color: #ffffff;
}

.btn-clear-selection {
  --md-ripple-pressed-color: #666666;
  --md-ripple-hover-color: #666666;
}

/* Fix for md-ripple inside flex buttons */
md-ripple {
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}



.btn-delete-selected:disabled {
  background: var(--surface-variant);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.btn-clear-selection {
  background: var(--surface-variant);
  /* Same color as search input background */
  color: var(--text-primary);
}



/* Helper for status icons */
.status-icon {
  vertical-align: text-bottom;
  margin-right: 6px;
  font-size: 20px !important;
}



/* ⏳ Custom Stylish Loader */
.loader-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  /* Phủ lên trên nội dung đang load bên dưới */
  z-index: 50;
  transition: opacity 0.5s ease-out;
  will-change: opacity;
}

.loader-container.disappearing {
  opacity: 0;
  pointer-events: none;
}


.loader {
  height: 30px;
  aspect-ratio: 2.5;
  --_g: no-repeat radial-gradient(farthest-side, var(--text-primary) 90%, #0000);
  background: var(--_g), var(--_g), var(--_g), var(--_g);
  background-size: 20% 50%;
  animation: l44 1s infinite linear alternate;
  transform: translateZ(0);
  backface-visibility: hidden;
}

@keyframes l44 {

  0%,
  5% {
    background-position: calc(0*100%/3) 50%, calc(1*100%/3) 50%, calc(2*100%/3) 50%, calc(3*100%/3) 50%
  }

  12.5% {
    background-position: calc(0*100%/3) 0, calc(1*100%/3) 50%, calc(2*100%/3) 50%, calc(3*100%/3) 50%
  }

  25% {
    background-position: calc(0*100%/3) 0, calc(1*100%/3) 0, calc(2*100%/3) 50%, calc(3*100%/3) 50%
  }

  37.5% {
    background-position: calc(0*100%/3) 100%, calc(1*100%/3) 0, calc(2*100%/3) 0, calc(3*100%/3) 50%
  }

  50% {
    background-position: calc(0*100%/3) 100%, calc(1*100%/3) 100%, calc(2*100%/3) 0, calc(3*100%/3) 0
  }

  62.5% {
    background-position: calc(0*100%/3) 50%, calc(1*100%/3) 100%, calc(2*100%/3) 100%, calc(3*100%/3) 0
  }

  75% {
    background-position: calc(0*100%/3) 50%, calc(1*100%/3) 50%, calc(2*100%/3) 100%, calc(3*100%/3) 100%
  }

  87.5% {
    background-position: calc(0*100%/3) 50%, calc(1*100%/3) 50%, calc(2*100%/3) 50%, calc(3*100%/3) 100%
  }

  95%,
  100% {
    background-position: calc(0*100%/3) 50%, calc(1*100%/3) 50%, calc(2*100%/3) 50%, calc(3*100%/3) 50%
  }
}

/* 🍞 Toast (Back to floating button without shadow) */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--surface);
  padding: 12px 24px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 14px;
  z-index: 5000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: none;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}



/* 🧹 Lint Fix Helpers */
#actionLoader,
#deleteContentView,
#deleteConfirmModal {
  display: none;
}

#actionLoader.visible,
#deleteContentView.active,
#deleteConfirmModal.visible {
  display: flex;
}

.icon-blue {
  color: var(--accent-primary);
}

.icon-danger {
  color: var(--accent-danger);
}

.icon-danger-bg {
  background: color-mix(in srgb, var(--accent-danger) 10%, var(--surface));
}

.btn-text-relative {
  position: relative;
  z-index: 2;
}

/* 🔔 Notifications Tab Styles - PREMIUM REDESIGN */
/* 📟 Console Log Styling */


/* 📟 Console Log Styling */
/* 📟 Console Log Styling */
.api-counter {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.notifications-container {
  padding: 0;
  max-width: 100%;
  margin: 0;
  width: 100%;
  flex: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notifications-header {
  padding: 16px 20px;
  margin-bottom: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  display: none;
  /* Ẩn header theo yêu cầu */
}

.notifications-header h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notifications-header p {
  font-size: 12px;
  opacity: 0.7;
  color: var(--text-secondary);
}

.notification-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  background: var(--bg-primary);
  /* Sync with App Theme */
}

.console-entry {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-all;

  animation: fadeIn 0.2s ease;
}

.console-entry:last-child {
  border-bottom: none;
}

/* Console Colors - Theme synced */
.console-entry.log-info {
  color: var(--text-primary);
}

.console-entry.log-warn {
  color: #d29922;
  background: color-mix(in srgb, #d29922 10%, transparent);
}

.console-entry.log-error {
  color: var(--accent-danger);
  background: color-mix(in srgb, var(--accent-danger) 10%, transparent);
}

/* Removed redundant old styles */

.console-time {
  opacity: 0.5;
  font-size: 11px;
  min-width: 60px;
  flex-shrink: 0;
}

.console-msg {
  flex: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}




.notification-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.notification-empty .material-symbols-rounded {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.2;
  color: var(--text-secondary);
}

.notification-empty p {
  font-size: 16px;
  font-weight: 500;
}

/* Badge tinh tế hơn */
.nav-btn#settingsTrigger.has-new::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: var(--accent-danger);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  z-index: 5;
  box-shadow: none;
  animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}