:root {
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --primary-light: #e8f0fe;
  --bg-main: #f8fafd;
  --bg-surface: #ffffff;
  --bg-sidebar: #f1f3f4;
  --text-main: #202124;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --border-color: #dadce0;
  --hover-bg: #f1f3f4;
  --active-bg: #e8f0fe;
  --danger: #d93025;
  --warning: #f29900;
  --success: #188038;
  --badge-sv: #188038;
  --badge-cl: #1a73e8;
  --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-md: 0 4px 8px 3px rgba(60,64,67,0.15);
  --radius: 12px;
}

[data-theme="dark"] {
  --primary: #8ab4f8;
  --primary-hover: #aecbfa;
  --primary-light: rgba(138,180,248,0.15);
  --bg-main: #131314;
  --bg-surface: #1e1f20;
  --bg-sidebar: #191a1a;
  --text-main: #e3e3e3;
  --text-primary: #e3e3e3;
  --text-secondary: #9aa0a6;
  --border-color: #3c4043;
  --hover-bg: #2d2e30;
  --active-bg: rgba(138,180,248,0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
}

/* 3D Audio Player Theme cho Dark Mode */
[data-theme="dark"] .audio-bar-icon {
  border-color: #000000;
  background: radial-gradient(circle at center, #1f2937 0%, #0b0f17 70%, #000000 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 3px rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .audio-ctrl-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  box-shadow: none;
}

[data-theme="dark"] .audio-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: none;
  transform: scale(1.06);
}

[data-theme="dark"] .audio-ctrl-btn:active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.94);
  box-shadow: none;
}

[data-theme="dark"] .audio-ctrl-btn.active {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.18);
  box-shadow: none;
}

[data-theme="dark"] .audio-ctrl-btn.active:hover {
  background: rgba(96, 165, 250, 0.28);
  color: #93c5fd;
}

[data-theme="dark"] .btn-audio-playpause {
  background: #ffffff !important;
  color: #0f172a !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .btn-audio-playpause:hover {
  background: #38bdf8 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.45) !important;
}

[data-theme="dark"] .btn-audio-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  box-shadow: none;
}

[data-theme="dark"] .btn-audio-close:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  box-shadow: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ================= LOGIN MODAL ================= */
#loginModalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-card {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 36px;
  width: 420px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  text-align: center;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 24px;
}

.form-group {
  text-align: left;
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* ================= APP CONTAINER ================= */
#appContainer {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* ================= SIDEBAR ================= */
.sidebar {
  width: 270px;
  min-width: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 16px;
  user-select: none;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, transform 0.3s ease;
  overflow: hidden;
  flex-shrink: 0;
  height: 100vh;
}

.sidebar.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.btn-guest {
  background: #16a34a;
  color: #ffffff;
  transition: all 0.2s ease;
}
.btn-guest:hover {
  background: #15803d;
}
.btn-guest.disabled {
  background: #64748b !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.btn-kick {
  padding: 5px 12px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-kick:hover {
  background: #dc2626;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.brand-badge {
  font-size: 10px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.new-btn-group {
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
}

.btn-new {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.btn-new:hover {
  box-shadow: var(--shadow-md);
  background: var(--hover-bg);
}

.btn-new-secure {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
  color: var(--primary);
}

.btn-new-secure:hover {
  background: rgba(2, 132, 199, 0.16);
  border-color: var(--primary);
}

.nav-menu {
  list-style: none;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin: 16px 0 6px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--hover-bg);
}

.nav-item.active {
  background: var(--active-bg);
  color: var(--primary);
  font-weight: 600;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-menu {
  list-style: none;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 12px;
  padding-right: 4px;
  min-height: 120px;
}

/* Quota Bar */
.storage-status-card {
  background: var(--bg-surface);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  margin-top: auto;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.progress-bar-bg {
  height: 6px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s;
}

/* ================= MAIN AREA ================= */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Topbar */
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-surface);
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Thanh thông báo trạng thái hệ thống nằm sát mép dưới Header */
.top-notification-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: rgba(26, 115, 232, 0.08);
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 500;
  position: sticky;
  top: 64px;
  z-index: 95;
  transition: all 0.25s ease;
}

.top-notification-bar.danger {
  background: rgba(234, 67, 53, 0.12);
  color: #d93025;
  border-bottom-color: #ea4335;
}

.top-notification-bar.warning {
  background: rgba(242, 153, 0, 0.12);
  color: #b45309;
  border-bottom-color: #f29900;
}

.top-notification-bar.success {
  background: rgba(24, 128, 56, 0.12);
  color: #188038;
  border-bottom-color: #34a853;
}

.top-notification-bar.info {
  background: rgba(26, 115, 232, 0.12);
  color: #1a73e8;
  border-bottom-color: #1a73e8;
}

.btn-top-noti-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid rgba(2, 132, 199, 0.4);
  background: #0284c7;
  color: #ffffff !important;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-top-noti-action:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.btn-top-noti-action:active {
  transform: translateY(0);
}

.log-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.log-badge.info {
  background: rgba(26, 115, 232, 0.12);
  color: #1a73e8;
}
.log-badge.success {
  background: rgba(24, 128, 56, 0.12);
  color: #188038;
}
.log-badge.warn {
  background: rgba(242, 153, 0, 0.12);
  color: #b45309;
}
.log-badge.error {
  background: rgba(234, 67, 53, 0.12);
  color: #d93025;
}

.search-box {
  width: 220px;
  max-width: 260px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 6px 12px 6px 32px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 13px;
}

/* Dung lượng lưu trữ trên Topbar (Gọn gàng Used/Total) */
.topbar-storage-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  cursor: default;
  transition: background 0.2s ease;
}

.topbar-storage-badge:hover {
  background: rgba(26, 115, 232, 0.08);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.network-switcher-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--hover-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.network-switcher-badge:hover {
  background: var(--bg-surface);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.network-switcher-badge.is-lan {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.35);
  color: #16a34a;
}

.network-switcher-badge.is-lan .status-dot {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
}

.network-switcher-badge.is-wan {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.35);
  color: #0284c7;
}

.network-switcher-badge.is-wan .status-dot {
  background: #0284c7;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.6);
}

/* Hiệu ứng nhấp nháy thu hút sự chú ý khi phát hiện WiFi nội bộ */
.network-switcher-badge.pulse-glow {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.25), rgba(2, 132, 199, 0.25)) !important;
  border-color: #16a34a !important;
  color: #15803d !important;
  animation: badgePulseGlow 1.6s infinite alternate ease-in-out;
}

@keyframes badgePulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(22, 163, 74, 0);
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    transform: scale(1);
  }
}

/* Wrapper và Checkbox Tự động chuyển mạng (đặt gọn dưới dòng LAN/WAN) */
.network-switcher-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  line-height: 1.15;
}

.auto-switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  padding: 1px 4px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auto-switch-toggle:hover {
  color: var(--primary);
  border-color: var(--border-color);
  background: var(--hover-bg);
}

.auto-switch-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: #059669;
  width: 12px;
  height: 12px;
  margin: 0;
}

.auto-switch-label-full {
  display: inline;
}

.auto-switch-label-short {
  display: none;
}

.auto-switch-banner-toggle {
  background: rgba(255, 255, 255, 0.85);
  border-color: #a7f3d0;
  color: #065f46;
  padding: 3px 8px;
  font-size: 11px;
}

/* Banner gợi ý chuyển đổi mạng LAN khi ở WiFi nội bộ (Đã gộp vào top-notification-bar) */
.lan-suggestion-banner {
  display: none !important;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
  border-bottom: 2px solid #86efac;
  color: #065f46;
  font-size: 13px;
  position: sticky;
  top: 54px;
  z-index: 96;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
  animation: slideDownBanner 0.3s ease-out;
  box-sizing: border-box;
}

@keyframes slideDownBanner {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.lan-suggestion-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.lan-suggestion-badge {
  background: #10b981;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lan-suggestion-text {
  line-height: 1.4;
  color: #047857;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lan-suggestion-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
  flex-shrink: 0;
}

.lan-banner-countdown {
  font-size: 11px;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: #065f46;
}

.btn-lan-switch-now {
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
  white-space: nowrap;
}

.btn-lan-switch-now:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.35);
}

.btn-lan-dismiss {
  background: none;
  border: none;
  font-size: 16px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}

.btn-lan-dismiss:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #374151;
}

@media (max-width: 768px) {
  .network-switcher-wrapper {
    gap: 4px;
    flex-shrink: 0;
  }
  .auto-switch-toggle {
    padding: 2px 5px;
    font-size: 10px;
    gap: 3px;
    border-radius: 10px;
  }
  .auto-switch-label-full {
    display: none !important;
  }
  .auto-switch-label-short {
    display: inline !important;
    font-size: 10px;
    font-weight: 700;
  }
  .auto-switch-banner-toggle {
    display: none !important;
  }
  .lan-suggestion-banner {
    padding: 6px 10px;
    gap: 6px;
    top: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
  }
  .lan-suggestion-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
  }
  .lan-suggestion-badge {
    font-size: 10px;
    padding: 2px 6px;
    flex-shrink: 0;
  }
  .lan-suggestion-text {
    display: none !important; /* Ẩn triệt để text dài trên mobile */
  }
  .lan-suggestion-left > span:not(.lan-suggestion-badge) {
    display: none !important; /* Không cho phép bất kỳ span text dài nào làm xô lệch mobile */
  }
  .lan-suggestion-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .btn-lan-switch-now {
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 6px;
  }
  .btn-lan-dismiss {
    padding: 2px 4px;
    font-size: 14px;
  }
}

.network-switch-icon {
  font-size: 10px;
  opacity: 0.75;
  transition: transform 0.25s ease;
}

.network-switcher-badge:hover .network-switch-icon {
  transform: rotate(180deg);
  opacity: 1;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--hover-bg);
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--bg-main);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 13px;
  cursor: pointer;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

/* Content Area */
.content-body {
  flex: 1;
  padding: 20px 28px;
  overflow-y: auto;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.crumb-link {
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}

/* Table View */
.file-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.file-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 var(--border-color);
}

.file-table th:first-child {
  border-top-left-radius: 11px;
}

.file-table th:last-child {
  border-top-right-radius: 11px;
}

.file-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.file-row:hover {
  background: var(--hover-bg);
}

.file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.file-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.file-name-cell span:not(.file-icon):not(.badge-shared-system):not(.badge-playing),
.file-name-cell b {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

/* Storage Badges */
.badge-storage {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-sv {
  background: rgba(24, 128, 56, 0.15);
  color: var(--badge-sv);
}

.badge-cl {
  background: rgba(26, 115, 232, 0.15);
  color: var(--badge-cl);
}

.badge-none {
  background: var(--hover-bg);
  color: var(--text-secondary);
}

.badge-expire {
  background: rgba(242, 153, 0, 0.15);
  color: var(--warning);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-forever {
  background: rgba(26, 115, 232, 0.1);
  color: var(--primary);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 6px;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: 0.15s;
}

.btn-icon:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

/* ================= REMOTE DOWNLOADER TAB ================= */
.downloader-card {
  background: var(--bg-surface);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.downloader-input-group {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ================= MODALS & PLAYERS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}

/* ================= THANH ĐIỀU KHIỂN NHẠC NẰM DƯỚI HEADER ================= */
#floatingAudioPlayer,
.top-audio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 98;
  gap: 16px;
  animation: fadeInDown 0.25s ease;
  position: relative;
  bottom: auto;
  right: auto;
  left: auto;
  top: auto;
  border-radius: 0;
}

/* ================= DRAG & DROP OVERLAY ================= */
.drag-drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 115, 232, 0.12);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 4px dashed var(--primary);
  margin: 12px;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.drag-drop-overlay.active {
  display: flex;
}

.drag-drop-box {
  background: var(--bg-surface);
  padding: 40px 60px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  animation: pulseBox 1.5s infinite alternate;
}

@keyframes pulseBox {
  from { transform: scale(0.98); }
  to { transform: scale(1.02); }
}

.audio-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  max-width: 320px;
}

.audio-bar-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: radial-gradient(circle at center, #262c36 0%, #111827 70%, #000000 100%);
  border: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 3px rgba(255, 255, 255, 0.05);
  animation: bounceMusic 1.5s infinite ease-in-out;
  user-select: none;
  flex-shrink: 0;
}

@keyframes bounceMusic {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.audio-bar-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.audio-bar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-bar-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
}

.audio-track-counter {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.audio-repeat-badge {
  font-weight: 600;
  color: #16a34a;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.audio-bar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  max-width: 620px;
}

.audio-ctrls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Nút Điều Khiển Nhạc Tinh Gọn Chuẩn YouTube / Windows Media Player */
.audio-ctrl-btn {
  font-size: 15px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-primary, #334155);
  user-select: none;
}

.audio-ctrl-btn svg {
  display: block;
}

.audio-ctrl-btn:hover {
  background: rgba(0, 0, 0, 0.07);
  color: #0f172a;
  transform: scale(1.06);
}

.audio-ctrl-btn:active {
  transform: scale(0.94);
  background: rgba(0, 0, 0, 0.12);
}

.audio-ctrl-btn.active {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
}

.audio-ctrl-btn.active:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #1d4ed8;
}

.audio-ctrl-btn.active:active {
  transform: scale(0.94);
}

/* Nút Play/Pause Nổi Bật Chuẩn Hiện Đại (YouTube / Windows Media Player) */
.btn-audio-playpause {
  display: inline-flex !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 50% !important;
  background: #1769e0 !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 18px !important;
  box-shadow: 0 2px 8px rgba(23, 105, 224, 0.3) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none;
}

.btn-audio-playpause:hover {
  transform: scale(1.08) !important;
  background: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4) !important;
}

.btn-audio-playpause:active {
  transform: scale(0.95) !important;
}

/* Nút Close Tinh Gọn */
.btn-audio-close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #64748b;
  box-shadow: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-audio-close:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.btn-audio-close:active {
  transform: scale(0.94);
}

.btn-audio-expand,
.audio-mini-progress {
  display: none;
}

/* Seekable Timeline Row */
.audio-timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 440px;
}

.audio-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 34px;
  text-align: center;
  user-select: none;
}

.audio-timeline-track {
  flex: 1;
  height: 6px;
  background: rgba(100, 116, 139, 0.2);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
}

.audio-timeline-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  width: 0%;
  pointer-events: none;
  transition: width 0.1s linear;
}

.audio-timeline-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  left: 0%;
  transition: left 0.1s linear;
}

/* Volume Control Wrapper & Popover */
.audio-volume-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Trên PC: Dải trượt âm lượng mở sang bên phải của nút Loa để không bị Header che khuất */
.audio-volume-popover {
  display: none;
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  bottom: auto;
  transform: translateY(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  z-index: 1005;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: fadeInSlideRight 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-volume-popover::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--border-color);
}

.audio-volume-popover::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right-color: var(--bg-surface);
}

.audio-volume-wrapper.active .audio-volume-popover {
  display: flex;
}

@keyframes fadeInSlideRight {
  from { opacity: 0; transform: translate(-8px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}

.btn-vol-mute-quick {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
}

.audio-vol-slider {
  width: 80px;
  height: 5px;
  accent-color: var(--primary);
  cursor: pointer;
}

.audio-vol-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 30px;
  text-align: right;
}

#audioElement {
  display: none !important;
}

.audio-bar-right {
  display: flex;
  align-items: center;
}

/* ================= THANH TRẠNG THÁI TẢI LÊN NẰM DƯỚI HEADER ================= */
.upload-status-bar,
.upload-status-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: var(--bg-surface);
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  z-index: 97;
  gap: 20px;
  animation: fadeInDown 0.25s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  max-width: 380px;
}

.upload-bar-icon {
  font-size: 20px;
  animation: pulseUpload 1.5s infinite;
}

@keyframes pulseUpload {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.upload-bar-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.upload-bar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.upload-bar-filename {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.upload-bar-detail {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-bar-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  max-width: 520px;
  gap: 4px;
}

.upload-bar-center .upload-progress-track {
  width: 100%;
  height: 7px;
  background: var(--hover-bg);
  border-radius: 4px;
  overflow: hidden;
  margin: 0;
}

.upload-bar-center .upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1a73e8, #34a853);
  transition: width 0.15s ease;
}

.upload-status-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.upload-percent-text {
  font-weight: 700;
  color: var(--primary);
}

.upload-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.upload-countdown-badge {
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  background: rgba(217, 119, 6, 0.12);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(217, 119, 6, 0.3);
  font-variant-numeric: tabular-nums;
  animation: pulseTimer 1s infinite alternate;
}

@keyframes pulseTimer {
  from { opacity: 0.85; }
  to { opacity: 1; transform: scale(1.02); }
}

/* ================= BATCH ACTION BAR ================= */
.batch-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
  animation: fadeIn 0.2s ease;
}

.batch-btn-group {
  display: flex;
  gap: 8px;
}

.btn-batch {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-batch:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #fff;
  filter: brightness(1.08);
}

.btn-batch-danger {
  background: #dc2626 !important;
  color: #fff !important;
  border: 1px solid #dc2626 !important;
}

.btn-batch-danger:hover {
  background: #b91c1c !important;
  color: #fff !important;
}

/* ================= ADMIN BATCH ACTION BUTTONS ================= */
.btn-admin-copy {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #0284c7 !important;
}
.btn-admin-copy:hover {
  background: #0369a1 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
}

.btn-admin-move {
  background: #d97706 !important;
  color: #ffffff !important;
  border: 1px solid #d97706 !important;
}
.btn-admin-move:hover {
  background: #b45309 !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
}

.btn-admin-delete {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #dc2626 !important;
}
.btn-admin-delete:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

.btn-admin-clear {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}
.btn-admin-clear:hover {
  background: var(--hover-bg) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* ================= ADMIN VIEW SWITCHER TABS ================= */
.admin-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-view-tab:hover {
  background: var(--hover-bg);
  color: var(--primary);
  border-color: var(--primary);
}

.admin-view-tab.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.35);
}

/* ================= CANCEL BUTTON ================= */
.btn-cancel {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

/* ================= CUSTOM CONTEXT MENU ================= */
.custom-context-menu {
  position: fixed;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  padding: 6px 0;
  min-width: 190px;
  z-index: 5000;
  display: none;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
}

.context-menu-item:hover {
  background: var(--hover-bg);
  color: var(--primary);
}

.context-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* ================= SIDEBAR FOLDER TREE VIEW ================= */
.folder-tree-container {
  margin-top: 4px;
  margin-left: 8px;
  border-left: 2px solid var(--border-color);
  padding-left: 4px;
  display: none;
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.tree-node {
  display: flex;
  flex-direction: column;
}

.folder-tree-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.folder-tree-item:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.folder-tree-item.active {
  background: rgba(26, 115, 232, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.tree-node-expander {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 3px;
  flex-shrink: 0;
  user-select: none;
  transition: background 0.15s ease;
}

.tree-node-expander:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.tree-node-expander.empty {
  cursor: default;
  opacity: 0.3;
  font-size: 9px;
}

.folder-tree-icon {
  font-size: 13px;
  flex-shrink: 0;
  margin-right: 2px;
  display: inline-flex;
  align-items: center;
}

.folder-tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.tree-children {
  display: flex;
  flex-direction: column;
}

.tree-toggle-icon {
  font-size: 10px;
  margin-left: auto;
  padding: 2px 4px;
  border-radius: 3px;
  transition: transform 0.2s ease;
}

.tree-toggle-icon:hover {
  background: rgba(0, 0, 0, 0.06);
}

.tree-toggle-icon.open {
  transform: rotate(90deg);
}

/* Modal Bảng 7 Màu Cơ Bản */
.color-palette-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.color-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease;
  outline: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.color-circle-btn:hover {
  transform: scale(1.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.color-circle-btn.selected {
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px var(--primary);
  transform: scale(1.12);
}

.color-checkmark {
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* File Checkbox Table Styling */
.file-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ================= MOBILE RESPONSIVE & DRAWER ================= */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 9998;
  display: none;
  transition: opacity 0.2s ease;
}
.sidebar-backdrop.active {
  display: block;
}

@media (max-width: 768px) {
  #appContainer {
    position: relative;
    overflow-x: hidden;
  }

  /* SIDEBAR TRÊN MOBILE */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 80vw;
    height: 100vh;
    z-index: 9999;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    padding: 12px;
  }

  .sidebar.collapsed {
    transform: translateX(-100%) !important;
    width: 260px !important;
    min-width: 260px !important;
    max-width: 80vw !important;
    padding: 12px !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .main-area {
    width: 100vw;
    min-width: 100vw;
  }

  /* TOPBAR GỌN GÀNG TRÊN MOBILE */
  .topbar {
    padding: 4px 8px;
    gap: 4px;
    min-height: 46px;
    height: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .topbar::-webkit-scrollbar {
    display: none;
  }

  #sidebarToggleBtn {
    width: 28px;
    height: 28px;
    font-size: 15px;
    margin-right: 2px;
    padding: 2px;
    flex-shrink: 0;
  }

  .search-box {
    width: 90px;
    max-width: 105px;
    flex-shrink: 0;
  }

  .search-input {
    padding: 4px 6px 4px 22px;
    font-size: 10.5px;
    border-radius: 12px;
  }

  .search-icon {
    font-size: 10px;
    left: 6px;
  }

  .topbar-right {
    gap: 4px;
    flex-shrink: 0;
  }

  .topbar-storage-badge {
    display: none !important; /* Ẩn trên mobile để nhường diện tích cho Tên User & nút Đăng xuất */
  }

  .network-switcher-wrapper {
    gap: 2px;
    flex-shrink: 0;
  }

  .network-switcher-badge {
    padding: 2px 6px;
    font-size: 10px;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .network-switcher-badge .network-host-full {
    display: none !important; /* Luôn ẩn IP trên mobile để không bị tràn chữ */
  }

  /* Ẩn các nút phụ trên Mobile Header (đã có sẵn trong Sidebar/Menu) để thanh Header luôn gọn đẹp */
  #btnHelpDocTopbar {
    display: none !important;
  }

  #btnChangePasswordTopbar {
    display: none !important;
  }

  .status-indicator {
    display: none;
  }

  .user-badge {
    display: flex !important;
    align-items: center !important;
    padding: 3px 8px !important;
    gap: 5px !important;
    max-width: 170px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    cursor: pointer !important;
    border-radius: 14px !important;
    background: var(--hover-bg) !important;
  }

  .top-notification-bar {
    padding: 6px 12px;
    font-size: 11px;
    top: 50px;
  }

  .user-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }

  #userRoleDisplay {
    display: none !important;
  }

  #userNameDisplay {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    max-width: 125px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }

  .sidebar-user-card {
    display: flex !important;
  }

  /* CONTENT BODY & CÁC NÚT BẤM */
  .content-body {
    padding: 8px 10px;
  }

  .breadcrumbs {
    font-size: 12px;
    margin-bottom: 8px;
  }

  /* THANH THAO TÁC HÀNG LOẠT (BATCH BAR) */
  .batch-action-bar {
    flex-wrap: wrap;
    padding: 6px 10px;
    gap: 6px;
    font-size: 11px;
  }

  .batch-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
  }

  .btn-batch {
    padding: 4px 7px;
    font-size: 10px;
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  /* BẢNG FILE TRÊN MOBILE */
  .file-table {
    font-size: 11.5px;
    width: 100% !important;
    table-layout: auto;
  }

  .file-table th, 
  .file-table td {
    padding: 6px 3px;
  }

  /* Bảng có cột Checkbox (Tệp của tôi, Chia sẻ HT, Chia sẻ nội bộ):
     - Cột 1: Checkbox (32px)
     - Cột 2: Tên tệp tin (auto, chiếm trọn màn hình, cho phép xuống dòng)
     - Cột cuối: Thao tác (1% nowrap)
     - Toàn bộ các cột ở giữa: Ẩn đi để màn hình mobile thoáng và tên file không bị chèn ép */
  table.has-checkbox-col th:not(:first-child):not(:nth-child(2)):not(:last-child),
  table.has-checkbox-col td:not(:first-child):not(:nth-child(2)):not(:last-child) {
    display: none !important;
  }
  table.has-checkbox-col th:first-child,
  table.has-checkbox-col td:first-child {
    width: 32px !important;
    max-width: 32px !important;
    padding: 6px 2px !important;
    text-align: center;
  }
  table.has-checkbox-col th:nth-child(2),
  table.has-checkbox-col td:nth-child(2) {
    width: auto !important;
    min-width: 0 !important;
    padding: 6px 6px !important;
  }
  table.has-checkbox-col th:last-child,
  table.has-checkbox-col td:last-child {
    width: 1% !important;
    white-space: nowrap !important;
    text-align: right !important;
    padding: 6px 4px !important;
  }

  /* Bảng không có cột Checkbox (Liên kết công khai):
     - Cột 1: Tên tệp tin (auto, xuống dòng đầy đủ)
     - Cột cuối: Thao tác
     - Các cột ở giữa ẩn đi */
  table.no-checkbox-col th:not(:first-child):not(:last-child),
  table.no-checkbox-col td:not(:first-child):not(:last-child) {
    display: none !important;
  }
  table.no-checkbox-col th:first-child,
  table.no-checkbox-col td:first-child {
    width: auto !important;
    min-width: 0 !important;
    padding: 6px 6px !important;
  }
  table.no-checkbox-col th:last-child,
  table.no-checkbox-col td:last-child {
    width: 1% !important;
    white-space: nowrap !important;
    text-align: right !important;
    padding: 6px 4px !important;
  }

  /* HIỂN THỊ TÊN TỆP TIN TRÊN MOBILE: Xuống dòng tự nhiên, không bao giờ bị cắt ngắn ... */
  .file-name-cell {
    max-width: none !important;
    font-size: 12.5px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .file-name-cell .file-icon {
    font-size: 18px !important;
    flex-shrink: 0 !important;
    margin-top: 1px !important;
  }

  .file-name-cell span:not(.file-icon),
  .file-name-cell b {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    display: inline !important;
    min-width: 0 !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
  }

  .file-name-cell .badge-shared-system,
  .file-name-cell .badge-playing {
    font-size: 10px !important;
    padding: 1px 5px !important;
    white-space: nowrap !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: 4px !important;
  }

  .action-btns {
    gap: 2px;
    justify-content: flex-end;
    white-space: nowrap;
    display: flex;
    align-items: center;
  }

  .action-btns .btn-icon {
    padding: 3px 5px;
    font-size: 12px;
  }

  /* ================= DOCKED BOTTOM AUDIO PLAYER TRÊN MOBILE ================= */
  body.has-music-playing .main-content {
    padding-bottom: 75px !important;
  }

  /* Trạng thái ẩn bắt buộc khi người dùng đóng trình phát nhạc */
  #floatingAudioPlayer.audio-player-hidden,
  #floatingAudioPlayer[style*="display: none"],
  #floatingAudioPlayer[style*="display:none"],
  .top-audio-bar.audio-player-hidden {
    display: none !important;
  }

  #floatingAudioPlayer,
  #floatingAudioPlayer.top-audio-bar,
  .top-audio-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    z-index: 1000 !important;
    background: var(--bg-surface) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.15) !important;
    border-top: 1px solid var(--border-color) !important;
    border-bottom: none !important;
    padding: 4px 10px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  #floatingAudioPlayer .audio-mini-progress,
  .top-audio-bar .audio-mini-progress {
    display: block !important;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
  }

  #floatingAudioPlayer .audio-mini-progress-fill,
  .top-audio-bar .audio-mini-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.25s linear;
  }

  /* Chế độ thu gọn Mini Player mặc định trên mobile */
  #floatingAudioPlayer.mobile-mini,
  .top-audio-bar.mobile-mini {
    height: 60px !important;
    padding: 6px 10px 4px 10px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-inner-row,
  .top-audio-bar.mobile-mini .audio-bar-inner-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
    margin-top: 0 !important;
    padding: 0 !important;
    height: 100% !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-timeline-row,
  .top-audio-bar.mobile-mini .audio-timeline-row {
    display: none !important;
  }

  #floatingAudioPlayer.mobile-mini .btn-audio-full-ctrl,
  #floatingAudioPlayer.mobile-mini .audio-volume-wrapper,
  .top-audio-bar.mobile-mini .btn-audio-full-ctrl,
  .top-audio-bar.mobile-mini .audio-volume-wrapper {
    display: none !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-ctrls-row,
  .top-audio-bar.mobile-mini .audio-ctrls-row {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
  }

  #floatingAudioPlayer.mobile-mini #btnAudioPrev,
  #floatingAudioPlayer.mobile-mini #btnAudioNext,
  .top-audio-bar.mobile-mini #btnAudioPrev,
  .top-audio-bar.mobile-mini #btnAudioNext {
    display: inline-flex !important;
    font-size: 13px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #floatingAudioPlayer.mobile-mini .btn-audio-playpause,
  .top-audio-bar.mobile-mini .btn-audio-playpause {
    display: inline-flex !important;
    background: var(--primary) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3) !important;
    font-size: 14px !important;
    padding: 0 !important;
  }

  #floatingAudioPlayer.mobile-mini .btn-audio-expand,
  #floatingAudioPlayer.mobile-mini .btn-audio-close,
  .top-audio-bar.mobile-mini .btn-audio-expand,
  .top-audio-bar.mobile-mini .btn-audio-close {
    display: inline-flex !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    padding: 0 !important;
    font-size: 13px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-left,
  .top-audio-bar.mobile-mini .audio-bar-left {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: hidden !important;
    cursor: pointer;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-icon,
  .top-audio-bar.mobile-mini .audio-bar-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-info,
  .top-audio-bar.mobile-mini .audio-bar-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-title,
  .top-audio-bar.mobile-mini .audio-bar-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    max-width: 100% !important;
    color: var(--text-primary) !important;
    display: block !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-sub,
  .top-audio-bar.mobile-mini .audio-bar-sub {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-track-counter,
  .top-audio-bar.mobile-mini .audio-track-counter {
    font-size: 11px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    color: var(--primary) !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-repeat-badge,
  .top-audio-bar.mobile-mini .audio-repeat-badge {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-center,
  .top-audio-bar.mobile-mini .audio-bar-center {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2px !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-right,
  .top-audio-bar.mobile-mini .audio-bar-right {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex: 0 0 auto !important;
  }

  /* Khi người dùng bấm mở rộng (Bottom Sheet) */
  #floatingAudioPlayer.mobile-expanded,
  .top-audio-bar.mobile-expanded {
    height: auto !important;
    max-height: 85vh !important;
    padding: 16px 20px 24px 20px !important;
    border-radius: 20px 20px 0 0 !important;
    overflow-y: auto !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35) !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-bar-inner-row,
  .top-audio-bar.mobile-expanded .audio-bar-inner-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    position: relative !important;
    display: flex !important;
    margin-top: 0 !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-bar-left,
  .top-audio-bar.mobile-expanded .audio-bar-left {
    max-width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    justify-content: center !important;
    margin-top: 8px !important;
    gap: 6px !important;
    display: flex !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-bar-icon,
  .top-audio-bar.mobile-expanded .audio-bar-icon {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    font-size: 32px !important;
    margin-bottom: 4px !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-bar-info,
  .top-audio-bar.mobile-expanded .audio-bar-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    white-space: normal !important;
    text-align: center !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-bar-title,
  .top-audio-bar.mobile-expanded .audio-bar-title {
    font-size: 16px !important;
    max-width: 100% !important;
    text-align: center !important;
    font-weight: 700 !important;
    white-space: normal !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-bar-sub,
  .top-audio-bar.mobile-expanded .audio-bar-sub {
    justify-content: center !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-bar-center,
  .top-audio-bar.mobile-expanded .audio-bar-center {
    width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    display: flex !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-timeline-row,
  .top-audio-bar.mobile-expanded .audio-timeline-row {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    gap: 10px !important;
    margin: 4px 0 8px 0 !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-timeline-track,
  .top-audio-bar.mobile-expanded .audio-timeline-track {
    height: 8px !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-timeline-thumb,
  .top-audio-bar.mobile-expanded .audio-timeline-thumb {
    width: 16px !important;
    height: 16px !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-ctrls-row,
  .top-audio-bar.mobile-expanded .audio-ctrls-row {
    display: flex !important;
    width: 100% !important;
    justify-content: space-around !important;
    align-items: center !important;
    gap: 6px !important;
  }

  #floatingAudioPlayer.mobile-expanded .btn-audio-full-ctrl,
  .top-audio-bar.mobile-expanded .btn-audio-full-ctrl {
    display: inline-flex !important;
    font-size: 18px !important;
    padding: 8px 10px !important;
  }

  #floatingAudioPlayer.mobile-expanded #btnAudioPrev,
  #floatingAudioPlayer.mobile-expanded #btnAudioNext,
  .top-audio-bar.mobile-expanded #btnAudioPrev,
  .top-audio-bar.mobile-expanded #btnAudioNext {
    display: inline-flex !important;
    font-size: 20px !important;
    padding: 8px 12px !important;
    width: auto !important;
    height: auto !important;
  }

  #floatingAudioPlayer.mobile-expanded .btn-audio-playpause,
  .top-audio-bar.mobile-expanded .btn-audio-playpause {
    display: inline-flex !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 20px !important;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4) !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-volume-wrapper,
  .top-audio-bar.mobile-expanded .audio-volume-wrapper {
    display: inline-flex !important;
  }

  #floatingAudioPlayer.mobile-expanded .audio-volume-wrapper .btn-audio-vol,
  .top-audio-bar.mobile-expanded .audio-volume-wrapper .btn-audio-vol {
    font-size: 18px;
    padding: 8px 10px;
  }

  #floatingAudioPlayer.mobile-expanded .audio-volume-popover,
  .top-audio-bar.mobile-expanded .audio-volume-popover {
    top: auto;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    animation: fadeInPopUp 0.15s ease;
  }

  .top-audio-bar.mobile-expanded .audio-volume-popover::before,
  .top-audio-bar.mobile-expanded .audio-volume-popover::after {
    display: none;
  }

  @keyframes fadeInPopUp {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
  }

  .top-audio-bar.mobile-expanded .btn-audio-expand {
    display: inline-flex !important;
    transform: rotate(180deg);
  }

  .top-audio-bar.mobile-expanded .audio-bar-right {
    position: absolute;
    top: -6px;
    right: 0;
  }

  /* BREADCRUMBS CUỘN NGANG MƯỢT MÀ TRÊN MOBILE */
  .breadcrumbs {
    display: flex !important;
    align-items: center !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: calc(100vw - 110px);
    padding: 3px 0 !important;
  }
  .breadcrumbs::-webkit-scrollbar {
    display: none;
  }

  /* UPLOAD STATUS BAR TRÊN MOBILE */
  .upload-status-bar,
  .upload-status-widget {
    flex-direction: column;
    align-items: stretch !important;
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .upload-bar-left {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .upload-bar-center {
    width: 100% !important;
    max-width: 100% !important;
  }

  .upload-bar-right {
    justify-content: flex-end;
  }

  /* TAB TỰ ĐỘNG TẢI TỆP TRÊN MOBILE */
  .downloader-input-group {
    flex-direction: column;
  }

  .downloader-input-group button {
    width: 100% !important;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 6px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .task-item > div:last-child {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* Trạng thái tệp đang chờ Di chuyển (Cut) */
.file-row.cut-pending {
  opacity: 0.55;
  border-left: 3px dashed #d97706 !important;
  background: rgba(217, 119, 6, 0.08) !important;
}

/* Trạng thái tệp đang phát nhạc (Playing) */
.file-row.playing-row {
  background: rgba(22, 163, 74, 0.12) !important;
  border-left: 3px solid #16a34a !important;
}

.file-row.playing-row .file-name-cell {
  font-weight: 700;
  color: #16a34a;
}

/* ================= ĐẢM BẢO GIAO DIỆN PC CHO TRÌNH PHÁT NHẠC (CHỈ KHI MÀN HÌNH ĐỦ LỚN CẢ RỘNG LẪN CAO) ================= */
@media (min-width: 769px) and (min-height: 501px) {
  #floatingAudioPlayer,
  .top-audio-bar {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 8px 24px !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    z-index: 98 !important;
  }

  #floatingAudioPlayer .audio-bar-inner-row {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 16px !important;
  }

  #floatingAudioPlayer .audio-bar-left {
    min-width: 200px !important;
    max-width: 320px !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  #floatingAudioPlayer .audio-bar-icon {
    font-size: 20px !important;
    margin-bottom: 0 !important;
  }

  #floatingAudioPlayer .audio-bar-title {
    font-size: 13px !important;
    max-width: 240px !important;
    text-align: left !important;
  }

  #floatingAudioPlayer .audio-bar-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    max-width: 620px !important;
    width: auto !important;
  }

  #floatingAudioPlayer .audio-timeline-row,
  #floatingAudioPlayer .btn-audio-full-ctrl,
  #floatingAudioPlayer .audio-volume-wrapper {
    display: flex !important;
  }

  #floatingAudioPlayer .audio-ctrls-row {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    width: auto !important;
  }

  #floatingAudioPlayer .btn-audio-expand,
  #floatingAudioPlayer .audio-mini-progress {
    display: none !important;
  }

  #floatingAudioPlayer .audio-bar-right {
    position: static !important;
    display: flex !important;
  }
}

/* ================= TỐI ƯU GIAO DIỆN KHI THIẾT BỊ DI ĐỘNG XOAY NGANG (LANDSCAPE) ================= */
@media (max-height: 550px), (max-width: 1024px) and (orientation: landscape) {
  #floatingAudioPlayer,
  #floatingAudioPlayer.top-audio-bar,
  .top-audio-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    height: 48px !important;
    padding: 2px 10px !important;
    z-index: 1000 !important;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.15) !important;
    border-top: 1px solid var(--border-color) !important;
    border-bottom: none !important;
  }

  body.has-music-playing .main-content {
    padding-bottom: 56px !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-inner-row,
  .top-audio-bar.mobile-mini .audio-bar-inner-row {
    margin-top: 2px !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-title,
  .top-audio-bar.mobile-mini .audio-bar-title {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #floatingAudioPlayer.mobile-mini .audio-bar-sub,
  .top-audio-bar.mobile-mini .audio-bar-sub {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .topbar {
    height: 44px !important;
    padding: 2px 12px !important;
  }
}



