/* ==========================================================================
   Huá»³nh Nguyá»…n ThÃ nh Äáº¡t - Design System & Global Styles
   TÃ¡c giáº£: Huá»³nh Nguyá»…n ThÃ nh Äáº¡t
   Há»— trá»£ Dark/Light Theme, Glassmorphism, Micro-animations, Responsive
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Dark Mode (Máº·c Ä‘á»‹nh) */
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-glass: rgba(17, 24, 39, 0.65);
  --bg-glass-nav: rgba(11, 15, 25, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #06b6d4;
  --accent-glow: rgba(99, 102, 241, 0.35);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --font-heading: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-glass-nav: rgba(248, 250, 252, 0.88);
  --border-glass: rgba(226, 232, 240, 0.8);
  --border-focus: rgba(99, 102, 241, 0.4);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-secondary: #0284c7;
  --accent-glow: rgba(79, 70, 229, 0.2);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.15);
}

/* ================= Reset & Base ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;
  position: relative;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: var(--font-body);
}

/* NgÄƒn cháº·n Safari iOS tá»± Ä‘á»™ng zoom mÃ n hÃ¬nh khi báº¥m vÃ o Ã´ input */
@media (max-width: 768px) {

  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  select,
  textarea,
  .form-control {
    font-size: 16px !important;
  }
}

/* Background Ambient Glows - GPU Accelerated & Compositor Isolated */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
  contain: strict;
}

body::after {
  content: '';
  position: fixed;
  bottom: -150px;
  left: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(99, 102, 241, 0.04) 50%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
  contain: strict;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

/* ================= Layout & Containers ================= */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .container {
    padding: 0 0.85rem;
  }
}

main.main-content {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

/* ================= Glass Elements ================= */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.glass-panel:hover {
  border-color: rgba(99, 102, 241, 0.25);
}

/* ================= Navbar (Ultra-clean & Compact) ================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.45rem 0;
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: nowrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-text {
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.mobile-only-drawer-item {
  display: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-primary), #4338ca);
  box-shadow: 0 3px 12px var(--accent-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Social Links on Top Navbar */
.nav-social-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-social-btn:hover {
  transform: translateY(-2px) scale(1.1);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Micro badges for navbar items */
.nav-badge-micro {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
  margin-left: 0.25rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

[data-theme="dark"] .nav-badge-micro {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}

.nav-badge-micro.badge-beta,
.nav-badge-micro.badge-demo {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.nav-badge-micro.badge-game {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.35);
}

.nav-item-dropdown {
  position: relative;
}

.nav-item-dropdown:hover .links-dropdown-menu,
.nav-item-dropdown .links-dropdown-menu.show {
  display: flex;
}

/* Mega Dropdown for Desktop Navbar */
.nav-mega-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 560px;
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
  pointer-events: none;
}

[data-theme="dark"] .nav-mega-dropdown {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.nav-item-dropdown:hover .nav-mega-dropdown,
.nav-item-dropdown:focus-within .nav-mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav-mega-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

[data-theme="dark"] .nav-mega-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-mega-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.nav-mega-all {
  font-size: 0.76rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  transition: color 0.15s ease;
}

[data-theme="dark"] .nav-mega-all {
  color: #60a5fa;
}

.nav-mega-all:hover {
  text-decoration: underline;
}

.nav-mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.nav-mega-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  background: transparent;
  transition: all 0.18s ease;
}

.nav-mega-item:hover {
  background: rgba(37, 99, 235, 0.08);
  transform: translateX(3px);
}

[data-theme="dark"] .nav-mega-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-mega-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.nav-mega-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.nav-mega-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-mega-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 992px) {
  .nav-mega-dropdown {
    position: static;
    width: 100%;
    transform: none;
    box-shadow: none;
    padding: 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    display: none;
  }

  .nav-item-dropdown:hover .nav-mega-dropdown,
  .nav-item-dropdown.expanded .nav-mega-dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .nav-mega-grid {
    grid-template-columns: 1fr;
  }
}

.links-dropdown-menu {
  top: 100%;
  left: 0;
  right: auto;
}

@media (max-width: 680px) {
  .nav-social-links {
    display: none;
  }
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.05);
  border-color: var(--accent-primary);
}

/* User Menu & Badges */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.6rem 0.25rem 0.3rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.user-profile-badge:hover {
  border-color: var(--accent-primary);
}

.user-avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-name-text {
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.role-tag.admin {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.role-tag.user {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(99, 102, 241, 0.15));
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}


/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  z-index: 1050;
  backdrop-filter: blur(16px);
}

.dropdown-menu.show {
  display: flex;
  animation: dropdownFadeIn 0.2s ease forwards;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 0.4rem 0;
}

/* Mobile Menu Hamburger */
.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.4rem;
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.3rem;
  border-radius: var(--radius-sm, 8px);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  text-decoration: none;
  line-height: 1.2;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.btn-accent {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.btn-accent:hover {
  background: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
}

/* ================= Forms & Inputs ================= */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

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

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

/* Password Input with Toggle Button */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-control {
  padding-right: 2.85rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  font-size: 1.15rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 2;
  user-select: none;
}

.password-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover, rgba(255, 255, 255, 0.08));
  transform: translateY(-50%) scale(1.05);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.remember-me-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.remember-me-label:hover {
  color: var(--text-primary);
}

.remember-me-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-primary);
  cursor: pointer;
  border-radius: 4px;
}

/* ================= Flash Alerts ================= */
.alert {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.alert-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* ================= Modals ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(600px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  margin: auto;
  animation: scaleUp 0.25s ease;
}


@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-glass);
}

/* ================= Toast Notification System ================= */
.toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 460px;
  padding: 1rem 1.35rem;
  border-radius: var(--radius-md, 12px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  line-height: 1.45;
}

.toast-success {
  border-left: 4px solid #10b981;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toast-error {
  border-left: 4px solid #ef4444;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toast-warning {
  border-left: 4px solid #f59e0b;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toast-info {
  border-left: 4px solid #6366f1;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ================= Hero / Profile Section ================= */
.hero-section {
  position: relative;
  padding: 3rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 1.25rem;
}

.text-gradient {
  background: linear-gradient(135deg, #6366f1, #06b6d4, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-avatar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-avatar-card {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.35);
  border: 4px solid rgba(255, 255, 255, 0.15);
  animation: morphBlob 8s ease-in-out infinite;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}

@keyframes morphBlob {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }

  50% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-stat-card {
  position: absolute;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-card-1 {
  bottom: -15px;
  left: -20px;
}

.stat-card-2 {
  top: 20px;
  right: -20px;
}

/* ================= Footer ================= */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-grid>div,
.footer-links li {
  min-width: 0;
}

.footer-link:hover {
  color: var(--accent-primary);
}

.footer-brand {
  margin-bottom: 0.85rem;
}

.footer-description {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 420px;
  margin-bottom: 1rem;
}

.footer-contact-item {
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ================= Mobile Drawer Backdrop ================= */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ================= Responsive Queries ================= */
@media (max-width: 992px) {
  .mobile-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
  }

  .mobile-toggle-btn:hover,
  .mobile-toggle-btn:active {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
  }

  .nav-menu {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 1rem 1rem 1.75rem;
    gap: 0.35rem;
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    z-index: 999;
    max-height: calc(100vh - 54px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    display: flex;
  }

  .nav-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
  }

  .mobile-only-drawer-item {
    display: block !important;
    width: 100%;
  }

  .drawer-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 0.65rem 0;
    width: 100%;
  }

  .drawer-auth-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 0.25rem 0;
  }

  .drawer-auth-box .btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
  }

  .drawer-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid var(--border-glass);
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
  }

  .drawer-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
    flex-shrink: 0;
  }

  .drawer-user-info {
    flex: 1;
    min-width: 0;
  }

  .drawer-user-name {
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .drawer-user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-avatar-wrapper {
    margin-top: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-avatar-card {
    width: 230px;
    height: 230px;
  }

  .site-footer {
    padding: 2rem 0 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .footer-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .footer-links {
    gap: 0.55rem;
  }

  .footer-link {
    font-size: 0.9rem;
    padding: 0.15rem 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .footer-grid>div>p,
  .footer-grid>div>ul>li {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 1.25rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    max-width: 175px;
    gap: 0.35rem;
  }

  .brand-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .brand-text {
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-container {
    gap: 0.35rem;
  }

  .nav-actions {
    gap: 0.35rem;
  }

  .theme-toggle-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .user-name-text {
    display: none;
  }

  .user-profile-badge .role-tag {
    display: none;
  }

  .user-profile-badge {
    padding: 2px;
    background: transparent;
    border: none;
  }

  .user-avatar-sm {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-primary);
  }

  /* áº¨n nÃºt Ä‘Äƒng kÃ½ trÃªn top bar mÃ n hÃ¬nh háº¹p, Ä‘á»ƒ trong drawer */
  .nav-actions .btn-guest-register {
    display: none !important;
  }

  .nav-actions .btn-guest-login {
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
  }
}


/* ================= Portal Shell phong cÃ¡ch DuyKhoa ================= */
.portal-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-primary);
  position: relative;
  align-items: stretch;
}

/* 1. Left Sidebar (Menu Tab) - Cá»‘ Ä‘á»‹nh 100vh khÃ´ng bá»‹ tÃ¡ch rá»i */
.portal-sidebar {
  width: 250px;
  height: 100vh;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  flex-shrink: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.portal-sidebar.collapsed {
  width: 72px;
  overflow: visible;
}

.portal-sidebar.collapsed .portal-brand-text,
.portal-sidebar.collapsed .portal-nav-text,
.portal-sidebar.collapsed .portal-nav-group-title,
.portal-sidebar.collapsed .portal-group-toggle-btn,
.portal-sidebar.collapsed .portal-badge-hot,
.portal-sidebar.collapsed .portal-badge-star,
.portal-sidebar.collapsed .portal-nav-badge,
.portal-sidebar.collapsed .portal-subnav-toggle-btn,
.portal-sidebar.collapsed .portal-subnav-list,
.portal-sidebar.collapsed .portal-sidebar-search-wrap,
.portal-sidebar.collapsed .portal-sidebar-lang-row,
.portal-sidebar.collapsed .portal-sidebar-footer-info span:last-child {
  display: none !important;
}

.portal-sidebar.collapsed .portal-group-items {
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding: 0 !important;
}

.portal-sidebar.collapsed .portal-nav-link {
  justify-content: center;
  padding: 0.65rem;
}

.portal-sidebar.collapsed .portal-sidebar-footer {
  justify-content: center;
  padding: 0 0.5rem;
  overflow: hidden;
}

.portal-sidebar.collapsed .portal-sidebar-footer-info {
  justify-content: center;
  width: auto;
}

.portal-sidebar-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.15rem;
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
  transition: padding 0.25s ease;
  position: relative;
  overflow: visible;
}

.portal-sidebar.collapsed .portal-sidebar-header {
  padding: 0 0.5rem;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.portal-sidebar.collapsed .portal-sidebar-header:hover .portal-brand-icon {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.portal-sidebar-toggle-btn {
  display: none !important;
}

.portal-brand-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.portal-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-brand-logo:hover .portal-brand-icon {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
}

.portal-brand-img {
  height: 36px;
  width: auto;
  max-width: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 2px 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-brand-logo:hover .portal-brand-img {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.portal-mobile-brand-img,
.brand-img {
  height: 32px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  padding: 2px 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.portal-mobile-brand:hover .portal-mobile-brand-img,
.brand-logo:hover .brand-img {
  transform: scale(1.05);
}

.portal-brand-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


.portal-sidebar-close-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.portal-sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.portal-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.55rem 0.6rem 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
  display: flex;
  flex-direction: column;
}

.portal-sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}

.portal-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.3);
  border-radius: 4px;
}

.portal-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  flex: 1;
}

.portal-nav-group-title {
  font-size: 0.67rem;
  font-weight: 800;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  padding: 0.5rem 0.65rem 0.25rem;
  display: block;
}

/* Collapsible Group Section (Accordion Sidebar) */
.portal-nav-group-section {
  list-style: none;
  margin-top: 0.22rem;
  border-radius: 11px;
  transition: background 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

.portal-nav-group-section.group-expanded {
  background: rgba(37, 99, 235, 0.035);
  border-color: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .portal-nav-group-section.group-expanded {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}

.portal-group-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.48rem 0.68rem;
  border: none;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

[data-theme="dark"] .portal-group-toggle-btn {
  background: rgba(30, 41, 59, 0.65);
  color: #94a3b8;
}

.portal-group-toggle-btn:hover {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

[data-theme="dark"] .portal-group-toggle-btn:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.portal-nav-group-section.group-expanded .portal-group-toggle-btn,
.portal-nav-group-section.has-active-item .portal-group-toggle-btn {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .portal-nav-group-section.group-expanded .portal-group-toggle-btn,
[data-theme="dark"] .portal-nav-group-section.has-active-item .portal-group-toggle-btn {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.16);
}

.portal-group-title-left {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-nav-group-section.has-active-item:not(.group-expanded) .portal-group-title-left::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.7);
  flex-shrink: 0;
}

.portal-group-title-right {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.portal-group-count {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  color: #2563eb;
  line-height: 1.25;
}

[data-theme="dark"] .portal-group-count {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

.portal-group-chevron {
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
}

.portal-nav-group-section.group-expanded .portal-group-chevron,
.portal-nav-group-section.search-open .portal-group-chevron {
  transform: rotate(180deg);
}

.portal-group-items {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, padding 0.22s ease;
}

.portal-nav-group-section.group-expanded .portal-group-items,
.portal-nav-group-section.search-open .portal-group-items {
  max-height: 850px;
  opacity: 1;
  padding: 0.22rem 0.18rem 0.2rem;
}

.portal-nav-item {
  margin-bottom: 1px;
}

.portal-nav-link {
  display: flex;
  align-items: center;
  gap: 0.68rem;
  padding: 0.48rem 0.78rem;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.portal-nav-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #3b82f6;
  transform: translateX(3px);
}

.portal-nav-link.active {
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #3b82f6;
}

.portal-nav-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  height: 1.25em;
}

.portal-nav-icon .portal-nav-emoji-img,
.portal-nav-icon img,
.portal-nav-icon svg {
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  display: block;
}

.portal-nav-emoji-img {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -0.18em;
  object-fit: contain;
  pointer-events: none;
}

.portal-nav-emoji-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.15em;
}

.portal-nav-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-badge-hot {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  margin-left: auto;
  line-height: 1.2;
}

.portal-badge-star {
  font-size: 0.78rem;
  color: #eab308;
  margin-left: auto;
}

.portal-nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  line-height: 1.2;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.portal-nav-badge.badge-game {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.35);
}

.portal-nav-badge.badge-beta,
.portal-nav-badge.badge-demo {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.portal-nav-badge.badge-tools {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .portal-nav-badge.badge-tools {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.portal-nav-badge.badge-new,
.portal-nav-badge.badge-moi {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
}

.portal-nav-badge.badge-hot {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.portal-nav-badge.badge-maintenance,
.portal-nav-badge.badge-baotri {
  background: linear-gradient(135deg, #10b981, #f59e0b);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.45);
}

.portal-nav-badge.badge-pro {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

/* Giao diện Thông Báo Bảo Trì Toàn Trang (Maintenance Screen) */
.portal-maint-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 2.5rem 1rem;
}

.portal-maint-card {
  max-width: 580px;
  width: 100%;
  background: var(--surface-card, #ffffff);
  border: 1px solid var(--border-glass, rgba(226, 232, 240, 0.8));
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .portal-maint-card {
  background: #1e293b;
  border-color: rgba(51, 65, 85, 0.8);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.portal-maint-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-maint-icon {
  font-size: 2.5rem;
  display: inline-block;
  animation: maintRotate 4s ease-in-out infinite;
}

@keyframes maintRotate {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.portal-maint-pulse {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.5);
  animation: maintPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes maintPulse {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}

.portal-maint-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  margin-bottom: 1rem;
}

.portal-maint-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .portal-maint-title {
  color: #f8fafc;
}

.portal-maint-message {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary, #64748b);
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .portal-maint-message {
  color: #94a3b8;
}

.portal-maint-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 1.75rem;
  text-align: left;
}

[data-theme="dark"] .portal-maint-meta {
  background: rgba(15, 23, 42, 0.6);
  color: #94a3b8;
}

.portal-maint-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.portal-maint-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.portal-maint-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.portal-maint-btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.portal-maint-btn-secondary {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary, #334155);
}

[data-theme="dark"] .portal-maint-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.portal-maint-btn-secondary:hover {
  background: rgba(148, 163, 184, 0.25);
  transform: translateY(-2px);
}

.portal-maint-btn-outline {
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-secondary, #64748b);
}

.portal-maint-btn-outline:hover {
  border-color: #2563eb;
  color: #2563eb;
}

/* ==========================================================================
   POPUP MODAL THÔNG BÁO BẢO TRÌ TỨC THỜI KHI CLICK TỪ MENU
   ========================================================================== */
.portal-maint-popup-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  animation: fadeInPopup 0.22s ease;
}

@keyframes fadeInPopup {
  from { opacity: 0; }
  to { opacity: 1; }
}

.portal-maint-popup-card {
  background: var(--surface-card, #ffffff);
  border: 2px solid rgba(245, 158, 11, 0.5);
  border-radius: 24px;
  max-width: 440px;
  width: 95%;
  padding: 2rem 1.6rem 1.6rem;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: scaleUpPopup 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .portal-maint-popup-card {
  background: #1e293b;
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
}

@keyframes scaleUpPopup {
  0% { transform: scale(0.88) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.portal-maint-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.15);
  border: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.portal-maint-popup-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  transform: rotate(90deg);
}

.portal-maint-popup-icon-wrap {
  position: relative;
  width: 74px;
  height: 74px;
  margin: 0 auto 1.15rem;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-maint-popup-icon {
  font-size: 2.3rem;
  display: inline-block;
  animation: maintRotate 4s ease-in-out infinite;
}

.portal-maint-popup-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #f59e0b;
  animation: maintPulse 2.2s infinite;
}

.portal-maint-popup-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.portal-maint-popup-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
[data-theme="dark"] .portal-maint-popup-title {
  color: #f8fafc;
}

.portal-maint-popup-msg {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary, #64748b);
  margin-bottom: 1.25rem;
}
[data-theme="dark"] .portal-maint-popup-msg {
  color: #94a3b8;
}

.portal-maint-popup-meta {
  background: rgba(148, 163, 184, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  text-align: left;
  color: var(--text-muted, #64748b);
  margin-bottom: 1.4rem;
}
[data-theme="dark"] .portal-maint-popup-meta {
  background: rgba(15, 23, 42, 0.55);
  color: #94a3b8;
}

.portal-maint-meta-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.portal-maint-popup-actions {
  display: flex;
  gap: 0.6rem;
  flex-direction: column;
}

.portal-maint-btn-ok {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0.72rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.portal-maint-btn-ok:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.portal-maint-btn-contact {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary, #334155);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}
[data-theme="dark"] .portal-maint-btn-contact {
  color: #e2e8f0;
}
.portal-maint-btn-contact:hover {
  background: rgba(148, 163, 184, 0.22);
}

.portal-maint-btn-admin-bypass {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}
.portal-maint-btn-admin-bypass:hover {
  transform: translateY(-1px);
}

/* Banner Cảnh Báo Cho Admin Khi Đang Bảo Trì */
.portal-admin-maint-alert {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #d97706;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  margin: 1rem 1.5rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
}

[data-theme="dark"] .portal-admin-maint-alert {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.portal-subnav-count {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
}

/* Submenu / Accordion Dropdown cho danh má»¥c Shop á»Ÿ Sidebar */
.portal-nav-has-sub {
  position: relative;
}

.portal-nav-link-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.portal-nav-link-wrap .portal-nav-link {
  flex: 1;
  padding-right: 2.3rem;
}

.portal-subnav-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.portal-subnav-toggle-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
}

.portal-subnav-chevron {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-nav-has-sub.expanded .portal-subnav-chevron {
  transform: rotate(180deg);
}

.portal-subnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.25s ease;
  border-left: 2px solid rgba(59, 130, 246, 0.3);
  margin-left: 1.45rem;
  margin-top: 0.15rem;
  margin-bottom: 0.15rem;
}

.portal-nav-has-sub.expanded .portal-subnav-list {
  max-height: 400px;
  opacity: 1;
  padding: 0.25rem 0 0.35rem 0.65rem;
}

.portal-subnav-item {
  margin-bottom: 2px;
}

.portal-subnav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.65rem;
  border-radius: 7px;
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.portal-subnav-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #3b82f6;
  transform: translateX(2px);
}

.portal-subnav-link.active {
  background: rgba(37, 99, 235, 0.18);
  color: #3b82f6;
  font-weight: 700;
}

.portal-subnav-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.portal-subnav-img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.04);
}

.portal-subnav-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-subnav-my-orders .portal-subnav-link {
  color: #f59e0b;
  font-weight: 600;
}

.portal-subnav-my-orders .portal-subnav-link:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.portal-sidebar-footer {
  height: 52px;
  min-height: 52px;
  border-top: 1px solid var(--border-glass);
  padding: 0 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  background: var(--bg-surface);
  overflow: hidden;
  box-sizing: border-box;
}

.sidebar-v-tag {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}

.portal-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* 2. Main Shell & Topbar */
.portal-main-area {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin-left: 250px;
  width: calc(100% - 250px);
  max-width: calc(100% - 250px);
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-sidebar.collapsed ~ .portal-main-area,
.portal-sidebar.collapsed + .portal-sidebar-backdrop + .portal-main-area {
  margin-left: 72px;
  width: calc(100% - 72px);
  max-width: calc(100% - 72px);
}

.portal-topbar {
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg-glass-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.portal-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Single Master Topbar Toggle Button (Linear / GitHub / macOS Style) */
.portal-topbar-toggle-btn,
.portal-mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.portal-topbar-toggle-btn:hover,
.portal-mobile-menu-btn:hover {
  background: var(--bg-surface-hover, rgba(0, 0, 0, 0.05));
  border-color: var(--border-glass, rgba(0, 0, 0, 0.08));
  color: var(--text-primary);
  transform: scale(1.04);
}

.portal-topbar-toggle-btn:active,
.portal-mobile-menu-btn:active {
  transform: scale(0.95);
}

.portal-topbar-toggle-btn:focus-visible,
.portal-mobile-menu-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.portal-topbar-toggle-svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  transition: stroke 0.2s ease, transform 0.25s ease;
}

/* Khi sidebar thu gá»n, nÃºt cÃ³ sáº¯c thÃ¡i tinh táº¿ */
.portal-sidebar.collapsed ~ .portal-main-area .portal-topbar-toggle-btn,
.portal-sidebar.collapsed + .portal-sidebar-backdrop + .portal-main-area .portal-topbar-toggle-btn,
.portal-sidebar.collapsed ~ .portal-main-area .portal-mobile-menu-btn,
.portal-sidebar.collapsed + .portal-sidebar-backdrop + .portal-main-area .portal-mobile-menu-btn {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}

.portal-sidebar.collapsed ~ .portal-main-area .portal-topbar-toggle-btn:hover,
.portal-sidebar.collapsed + .portal-sidebar-backdrop + .portal-main-area .portal-topbar-toggle-btn:hover,
.portal-sidebar.collapsed ~ .portal-main-area .portal-mobile-menu-btn:hover,
.portal-sidebar.collapsed + .portal-sidebar-backdrop + .portal-main-area .portal-mobile-menu-btn:hover {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}

/* Mobile Brand Logo / Title */
.portal-mobile-brand {
  display: none;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.portal-mobile-brand:hover {
  opacity: 0.9;
}

.portal-mobile-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.portal-mobile-brand-text {
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Mobile Search Button in Topbar */
.portal-mobile-search-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  font-size: 0.85rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.portal-mobile-search-btn:hover,
.portal-mobile-search-btn:active {
  border-color: #3b82f6;
  color: #3b82f6;
  transform: scale(1.05);
}

/* Mobile Search Slide-Down Panel */
.portal-mobile-search-panel {
  display: none;
  position: sticky;
  top: 54px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 899;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.5rem 0.75rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
}

.portal-mobile-search-panel.open {
  display: block;
  animation: slideDownSearch 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portal-mobile-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.portal-mobile-search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.portal-mobile-search-input {
  width: 100%;
  height: 38px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  padding: 0 2.2rem 0 2.2rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-mobile-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.portal-mobile-search-close {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.portal-mobile-search-close:hover {
  color: #ef4444;
  border-color: #ef4444;
}

/* Avatar Ring & Role Badges */
.portal-avatar-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-avatar-role-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  font-size: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: #1e293b;
  border: 1px solid var(--border-glass);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.portal-avatar-role-dot.role-admin {
  background: #f59e0b;
  color: #ffffff;
}

.portal-avatar-role-dot.role-member {
  background: #10b981;
  color: #ffffff;
}

/* Sidebar Drawer Search Box - Chá»‰ hiá»‡n trÃªn Mobile Drawer <= 992px */
.portal-sidebar-search-wrap {
  display: none;
  padding: 0.65rem 0.85rem 0.35rem;
}

.portal-sidebar-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.portal-sidebar-search-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

.portal-sidebar-search-input {
  width: 100%;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0 0.75rem 0 2.1rem;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.portal-sidebar-search-input:focus {
  border-color: #3b82f6;
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Sidebar Drawer Language Switch - Chá»‰ hiá»‡n trÃªn Mobile Drawer <= 992px */
.portal-sidebar-lang-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.45rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
}

.portal-sidebar-lang-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.portal-sidebar-lang-select {
  height: 28px;
  font-size: 0.75rem;
  padding: 0 0.5rem 0 0.5rem;
  max-width: 120px;
}

.portal-sidebar-footer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.portal-search-box {
  position: relative;
  width: 270px;
  max-width: 100%;
}

.portal-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.portal-search-input {
  width: 100%;
  height: 36px;
  border-radius: 18px;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  padding: 0 1rem 0 2.1rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.portal-search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.portal-search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  padding: 1px 6px;
  pointer-events: none;
  font-family: inherit;
}

@media (max-width: 680px) {
  .portal-search-kbd {
    display: none;
  }
}

.portal-topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex-shrink: 1;
}

.portal-topbar-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  max-width: 100%;
  flex-shrink: 1;
  min-width: 0;
  height: 36px;
  box-sizing: border-box;
}

.portal-breadcrumb-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-breadcrumb-icon .portal-nav-emoji-img,
.portal-breadcrumb-icon img,
.portal-breadcrumb-icon svg {
  width: 1.1em;
  height: 1.1em;
  object-fit: contain;
  display: block;
}

.portal-breadcrumb-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  display: inline-block;
}

.portal-breadcrumb-live {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1180px) {
  .portal-topbar-center {
    display: none !important;
  }
}

.portal-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.portal-sparkle-icon {
  font-size: 1.25rem;
  cursor: default;
  opacity: 0.9;
}

.portal-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.portal-lang-select-box {
  display: flex;
  align-items: center;
}

.portal-lang-select {
  height: 32px;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0 0.65rem;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 13px;
  padding-right: 1.5rem;
}

.portal-lang-select:hover,
.portal-lang-select:focus {
  border-color: #2563eb;
  background-color: var(--bg-surface-hover, rgba(255, 255, 255, 0.08));
}

/* Google Translate Clean Styling */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
iframe.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

body {
  top: 0px !important;
  position: static !important;
}

#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

.portal-theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-theme-toggle-btn:hover {
  border-color: #2563eb;
  transform: rotate(15deg);
}

.portal-notif-wrapper {
  position: relative;
}

.portal-notif-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.portal-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.portal-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 310px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.portal-notif-dropdown.show {
  display: block;
}

.portal-notif-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 800;
}

.notif-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.portal-notif-list {
  display: flex;
  flex-direction: column;
}

.portal-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-glass);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.portal-notif-item:last-child {
  border-bottom: none;
}

.portal-notif-item:hover {
  background: rgba(37, 99, 235, 0.06);
}

.portal-notif-item.unread {
  background: rgba(37, 99, 235, 0.04);
}

.notif-item-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.notif-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.portal-admin-contact-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem 0.25rem 0.3rem;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-admin-contact-btn:hover {
  border-color: #2563eb;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.portal-admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #2563eb;
}

.portal-admin-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.portal-admin-label {
  font-size: 0.64rem;
  color: var(--text-muted);
}

.portal-admin-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Guest Auth Buttons in Topbar */
.portal-guest-auth-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.portal-guest-login-btn,
.portal-guest-register-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.portal-guest-login-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.portal-guest-login-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-1px);
}

.portal-guest-register-btn {
  background: var(--accent-primary);
  border: 1px solid transparent;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.portal-guest-register-btn:hover {
  background: var(--accent-primary-hover);
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.portal-alert-wrap {
  padding: 1rem 1.5rem 0;
}

/* 3. Main Center Content Container */
.portal-content {
  flex: 1;
  padding: 1.25rem 1.5rem 3rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.portal-content>.container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.portal-content>.container.auth-container {
  max-width: 480px;
  margin: 1.5rem auto 3rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* 4. Top Announcement Bar */
.portal-announcement-bar {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 12px;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.announcement-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
  flex: 1;
}

.announcement-icon-badge {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.announcement-ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
}

.announcement-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  animation: marqueePortal 32s linear infinite;
}

@keyframes marqueePortal {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.announcement-ticker-item {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.announcement-ticker-sep {
  color: #3b82f6;
  font-size: 0.8rem;
}

.announcement-zalo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.announcement-zalo-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.5);
}

/* 5. 3 Featured Showcase Link Cards */
.portal-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.portal-showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.portal-showcase-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.showcase-brand-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.showcase-brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin: 0;
  color: var(--text-primary);
}

.showcase-hot-badge {
  font-size: 0.64rem;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* Banner Artwork Box in each card */
.showcase-banner-artwork {
  border-radius: 12px;
  padding: 1.1rem 0.9rem;
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 195px;
}

.artwork-purple {
  background: linear-gradient(145deg, #1e1b4b, #2e1065);
  border: 1px solid #4338ca;
  color: #ffffff;
}

.artwork-blue {
  background: linear-gradient(145deg, #082f49, #0c4a6e);
  border: 1px solid #0284c7;
  color: #ffffff;
}

.artwork-indigo {
  background: linear-gradient(145deg, #172554, #1e3a8a);
  border: 1px solid #2563eb;
  color: #ffffff;
}

.artwork-top-subtitle {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.88;
  margin-bottom: 0.5rem;
  text-align: center;
}

.artwork-main-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  justify-content: center;
}

.artwork-icon-large {
  font-size: 2.1rem;
  line-height: 1;
}

.artwork-brand-name {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.artwork-brand-slogan {
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.9;
}

.artwork-feature-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  font-size: 0.74rem;
  font-weight: 600;
}

.bullet-check {
  color: #34d399;
  font-weight: 900;
  margin-right: 0.35rem;
}

.artwork-bottom-reactions {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  font-size: 0.95rem;
  opacity: 0.85;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 0.5rem;
}

.showcase-brief-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 0.95rem;
  min-height: 2.5em;
}

.showcase-action-btn {
  width: 100%;
  justify-content: center;
  padding: 0.58rem 1rem;
  font-size: 0.86rem;
  font-weight: 800;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-purple {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-purple:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-blue {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.btn-amber {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* 6. Feed Two-Columns Section (Creator Post + Updates) */
.portal-content-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
}

.portal-focused-grid {
  grid-template-columns: 1.3fr 1fr;
  max-width: 1400px;
  margin: 0 auto 2rem;
}

.portal-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-author-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.post-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
}

.post-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px #10b981;
}

.post-author-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.post-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
}

.post-meta-time {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.post-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.post-official-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.post-more-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
}

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

.post-card-message {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-inline-link {
  color: #3b82f6;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.15s;
}

.post-inline-link:hover {
  text-decoration: underline;
}

.post-tech-banner {
  background: radial-gradient(circle at center, #1e1b4b 0%, #090d16 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 1.25rem 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.tech-banner-robot {
  font-size: 2.6rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.7));
}

.tech-banner-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #22d3ee;
  letter-spacing: 0.6px;
  margin-bottom: 0.2rem;
}

.tech-banner-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 0.2rem;
  letter-spacing: -0.3px;
}

.tech-banner-sub {
  font-size: 0.76rem;
  color: #cbd5e1;
  margin: 0;
}

.post-contact-section {
  margin-bottom: 1.25rem;
}

.contact-section-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.portal-channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.channel-card-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.channel-card-item:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.channel-card-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.channel-card-meta {
  min-width: 0;
  flex: 1;
}

.channel-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
}

.channel-val {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.post-quick-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.action-btn-full {
  flex: 1;
  min-width: 140px;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
}

/* ================= Guest Portal Card (When not logged in) ================= */
.portal-guest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.guest-card-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07) 0%, rgba(124, 58, 237, 0.07) 100%);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
}

.guest-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulse 1.8s infinite;
}

.guest-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.guest-hero-desc {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
}

.guest-cta-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem;
}

.guest-cta-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.guest-btn-main {
  flex: 1;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm, 8px);
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
  text-decoration: none;
}

.guest-btn-main:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.guest-btn-sub {
  flex: 1;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm, 8px);
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
  text-decoration: none;
}

.guest-btn-sub:hover {
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-1px);
}

.guest-cta-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.guest-services-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.guest-section-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.guest-section-icon {
  font-size: 1.1rem;
}

.guest-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  margin: 0;
}

.guest-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.guest-feature-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.95rem;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.guest-feature-item:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.guest-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.icon-schedule {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.icon-places {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.icon-game {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.icon-shop {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.guest-feature-info {
  min-width: 0;
  flex: 1;
}

.guest-feature-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.guest-feature-text {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guest-feature-link {
  font-size: 0.74rem;
  font-weight: 700;
  color: #2563eb;
}

.guest-trust-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.trust-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.trust-text strong {
  font-size: 0.76rem;
  color: var(--text-primary);
}

.trust-text span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ================= Member Portal Card (When logged in as User) ================= */
.portal-member-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.member-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.member-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.member-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2563eb;
}

.member-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-card);
}

.member-meta {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.member-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.member-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.member-edit-btn {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
}

.member-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.member-stat-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.member-stat-box:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.stat-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 7. Right Column: Updates Widget */
.portal-updates-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.updates-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-glass);
}

.updates-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--text-primary);
}

.btn-add-update {
  padding: 0.32rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #0284c7);
  border: none;
  color: #fff;
  transition: all 0.2s ease;
}

.btn-add-update:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.updates-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.update-card-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  position: relative;
}

.update-card-row:hover {
  transform: translateX(3px);
  border-color: rgba(37, 99, 235, 0.4);
}

.update-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.box-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.box-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.box-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.box-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.box-emerald {
  background: rgba(5, 150, 105, 0.15);
  color: #059669;
}

.box-rose {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

.update-body-box {
  flex: 1;
  min-width: 0;
}

.update-text-content {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: 0.25rem;
  white-space: pre-line;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.update-text-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
  display: inline-block;
  white-space: pre-line;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.update-text-link:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.update-timestamp {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.update-admin-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.btn-icon-action {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.18s ease;
}

.btn-icon-action:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: #2563eb;
  transform: scale(1.08);
}

.btn-delete-update:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.updates-empty-box {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.updates-empty-box span {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 0.5rem;
}

.updates-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-glass);
  text-align: center;
}

.sys-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: #10b981;
  font-weight: 700;
}

.status-indicator-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
}

/* 8. Portal Bottom Footer */
.portal-footer {
  min-height: 52px;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.portal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* 9. Floating Social Bar on Right Edge */
.portal-floating-social {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: -2px 4px 14px rgba(0, 0, 0, 0.25);
  border-radius: 8px 0 0 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 0;
}

/* áº¨n cÃ¡c button há»— trá»£ / floating social trÃªn cÃ¡c trang má»¥c Giáº£i TrÃ­ (game cá» tá»· phÃº, tiá»‡m trÃ  sá»¯a) */
body.is-entertainment-page .portal-floating-social,
body.page-game .portal-floating-social,
body.page-milktea .portal-floating-social,
body.page-expenses .portal-floating-social,
body.page-cv .portal-floating-social,
body.page-shop .portal-floating-social,
body.page-clones .portal-floating-social {
  display: none !important;
}

/* Ẩn floating social trên Mobile, Tablet & Màn hình laptop để không che khuất nội dung, form input và dropdown */
@media (max-width: 1200px) {
  .portal-floating-social {
    display: none !important;
  }
}

/* Chá»‘ng trÃ n ngang vÃ  cá»‘ Ä‘á»‹nh viewport 100% cho Tiá»‡m TrÃ  Sá»¯a trÃªn mobile/tablet */
body.page-milktea {
  overflow-x: hidden !important;
}

body.page-milktea .portal-wrapper {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  min-width: 0 !important;
}

body.page-milktea .portal-main-area {
  overflow-x: hidden !important;
  min-width: 0 !important;
}

body.page-milktea .portal-content {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.35rem 0.25rem 2rem !important;
}

.social-btn-float {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.2s ease, width 0.2s ease;
  position: relative;
}

.social-btn-float:hover {
  transform: translateX(-4px);
}

.fb-float {
  background: #1877f2;
}

.zalo-float {
  background: #0068ff;
}

.yt-float {
  background: #ef4444;
}

/* 10. Interactive Utility Modals */
.portal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.portal-modal-backdrop.show {
  display: flex;
}

.portal-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.portal-modal-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-modal-title-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
}

.portal-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-modal-close:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.portal-modal-body {
  padding: 1.25rem;
}

.modal-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.result-2fa-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  margin-top: 0.85rem;
}

.otp-code-display {
  font-family: 'Inter', monospace;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 6px;
  color: #3b82f6;
  margin-bottom: 0.45rem;
}

.otp-timer-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.otp-timer-progress {
  height: 100%;
  width: 100%;
  background: #3b82f6;
  border-radius: 999px;
  transition: width 1s linear;
}

.otp-timer-text {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.contact-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-modal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.contact-modal-item:hover {
  border-color: #2563eb;
  transform: translateX(3px);
}

.contact-modal-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

/* 11. Responsive Breakpoints */
@media (max-width: 992px) {
  .portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px;
    z-index: 1100;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  .portal-sidebar.active {
    transform: translateX(0);
  }

  .portal-main-area {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .portal-sidebar.collapsed ~ .portal-main-area,
  .portal-sidebar.collapsed + .portal-sidebar-backdrop + .portal-main-area {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .portal-sidebar-search-wrap {
    display: block;
  }

  .portal-sidebar-footer {
    height: auto;
    min-height: 52px;
    padding: 0.6rem 0.85rem;
    flex-direction: column;
    gap: 0.45rem;
    overflow: visible;
  }

  .portal-sidebar-lang-row {
    display: flex;
    width: 100%;
    margin-bottom: 0;
  }

  .portal-sidebar-footer-info {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .portal-sidebar-close-btn {
    display: flex;
  }

  .portal-sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .portal-sidebar-toggle-btn {
    display: none;
  }

  .portal-mobile-menu-btn {
    display: flex;
  }

  .portal-mobile-brand {
    display: flex;
  }

  .portal-topbar-center {
    display: none !important;
  }

  .portal-search-box {
    display: none !important;
  }

  .portal-mobile-search-btn {
    display: flex;
  }

  .portal-topbar {
    height: 56px;
    padding: 0 0.85rem;
    gap: 0.65rem;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: clip;
  }

  .portal-showcase-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .portal-content-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ==========================================================================
   MOBILE HEADER REDESIGN: <= 640px (FIX Lá»†CH MÃ€N HÃŒNH & CHá»® CHá»’NG ÄÃˆ)
   ========================================================================== */
@media (max-width: 640px) {
  .portal-topbar {
    height: 52px;
    padding: 0 0.65rem;
    gap: 0.4rem;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: clip;
    justify-content: space-between;
    align-items: center;
  }

  .portal-topbar-left {
    gap: 0.45rem;
    min-width: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .portal-mobile-menu-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .portal-mobile-brand-icon {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .portal-mobile-brand-text {
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap !important;
    letter-spacing: -0.2px;
  }

  .portal-topbar-right {
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
  }

  /* 1. áº¨N TEXT META USER Äá»‚ LOáº I Bá»Ž TRIá»†T Äá»‚ Lá»–I CHá»’NG ÄÃˆ CHá»® */
  .portal-admin-meta {
    display: none !important;
  }

  .portal-admin-contact-btn {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .portal-admin-avatar {
    width: 30px;
    height: 30px;
    border: 2px solid #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
  }

  /* 2. Sá» DÆ¯ VÃ Náº°M TRÃŠN 1 DÃ’NG DUY NHáº¤T, KHÃ”NG GÃƒY DÃ’NG HOáº¶C CHÃˆN NHAU */
  .portal-wallet-badge {
    padding: 0.2rem 0.45rem 0.2rem 0.5rem;
    gap: 0.3rem;
    white-space: nowrap !important;
    flex-shrink: 0;
    max-width: none;
    box-sizing: border-box;
    border-radius: var(--radius-sm, 6px);
  }

  .portal-wallet-icon {
    font-size: 0.82rem;
    line-height: 1;
    flex-shrink: 0;
  }

  .portal-wallet-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    line-height: 1;
    white-space: nowrap !important;
  }

  .portal-wallet-label {
    display: none !important;
    /* áº¨n chá»¯ 'Sá»‘ dÆ°' bá»‹ trÃ n vÃ  chá»“ng chá»¯ */
  }

  .portal-wallet-amount {
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap !important;
    letter-spacing: -0.2px;
    color: #10b981;
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .portal-wallet-deposit-btn {
    padding: 0.15rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: var(--radius-xs, 4px);
    white-space: nowrap !important;
    line-height: 1.2;
  }

  /* 3. THU Gá»ŒN CÃC NÃšT ICON TRÃŠN TOPBAR MOBILE */
  .portal-theme-toggle-btn {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
    flex-shrink: 0;
    border-radius: 8px;
  }

  .portal-mobile-search-btn {
    display: none !important;
    /* Tá»‘i Æ°u hÃ³a khÃ´ng gian thanh header, chuyá»ƒn tÃ¬m kiáº¿m vÃ o Mobile Drawer */
  }

  .portal-mobile-search-panel {
    display: none !important;
  }

  /* 4. CHUYá»‚N Bá»˜ CHá»ŒN NGÃ”N NGá»® VÃ€O SIDEBAR DRAWER */
  .portal-lang-select-box:not(.sidebar-lang-box) {
    display: none !important;
  }

  /* 5. GUEST ACTIONS Gá»ŒN GÃ€NG: CHá»ˆ HIá»†N 1 NÃšT ÄÄ‚NG NHáº¬P CHUáº¨N Äáº¸P */
  .portal-guest-auth-actions {
    gap: 0.3rem;
    flex-shrink: 0;
  }

  .portal-guest-login-btn {
    padding: 0.22rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    white-space: nowrap !important;
  }

  .portal-guest-register-btn {
    display: none !important;
    /* ÄÄƒng kÃ½ Ä‘Ã£ cÃ³ sáºµn trong Drawer Menu vÃ  Trang Chá»§ */
  }

  /* Cháº·n toÃ n bá»™ nguyÃªn nhÃ¢n gÃ¢y trÃ n mÃ n hÃ¬nh ngang */
  .portal-wrapper {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .portal-main-area {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .portal-topbar {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .portal-content {
    padding: 0.85rem 0.65rem 2.5rem;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  body.page-milktea .portal-content {
    padding: 0.35rem 0.2rem 2rem;
  }

  .portal-guest-card {
    padding: 0.85rem;
    border-radius: 12px;
  }

  .guest-card-hero {
    padding: 0.85rem;
    border-radius: 10px;
  }

  .guest-cta-box {
    padding: 0.75rem;
  }

  .guest-cta-btns {
    flex-direction: column;
    gap: 0.5rem;
  }

  .guest-btn-main,
  .guest-btn-sub {
    min-width: 0 !important;
    width: 100% !important;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    box-sizing: border-box;
  }

  .portal-channels-grid {
    grid-template-columns: 1fr;
  }

  .post-quick-actions {
    flex-direction: column;
  }

  .action-btn-full {
    width: 100%;
  }

  .portal-footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .guest-features-grid {
    grid-template-columns: 1fr;
  }

  .guest-trust-banner {
    grid-template-columns: 1fr;
  }

  .member-stats-grid {
    grid-template-columns: 1fr;
  }

  .guest-hero-title {
    font-size: 1.15rem;
  }
}

/* ==========================================================================
   MÃ€N HÃŒNH SIÃŠU NHá»Ž (<= 340px: iPhone 4/5/SE1, Galaxy Fold cover, v.v.)
   ========================================================================== */
@media (max-width: 340px) {
  .portal-topbar {
    padding: 0 0.4rem;
    gap: 0.25rem;
  }

  .portal-mobile-brand-text {
    display: none;
    /* Chá»‰ giá»¯ icon âš¡ khi mÃ n hÃ¬nh siÃªu háº¹p <= 340px */
  }

  .portal-wallet-amount {
    font-size: 0.7rem;
    max-width: 65px;
  }

  .portal-wallet-deposit-btn {
    padding: 0.12rem 0.35rem;
    font-size: 0.62rem;
  }

  .portal-guest-register-btn .guest-btn-text {
    display: none;
  }
}


.home-hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--border-glass);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 85% 25%, rgba(99, 102, 241, 0.2), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(6, 182, 212, 0.12), transparent 30%),
    var(--bg-card);
  box-shadow: var(--shadow-lg);
}

.home-hero-content {
  position: relative;
  z-index: 2;
}

.home-eyebrow {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.home-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -2px;
}

.home-subtitle {
  max-width: 720px;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

.home-actions {
  margin-bottom: 0;
}

.home-visual {
  min-height: 390px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-avatar-card {
  position: relative;
  z-index: 2;
  width: min(330px, 78vw);
  height: min(390px, 82vw);
  padding: 10px;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  transform: rotate(2deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.home-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
}

.home-avatar-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  background: rgba(10, 12, 25, 0.72);
  backdrop-filter: blur(12px);
  color: #fff;
}

.home-avatar-caption span {
  font-size: 0.78rem;
  opacity: 0.7;
}

.home-orbit {
  position: absolute;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 50%;
}

.orbit-one {
  width: 390px;
  height: 390px;
}

.orbit-two {
  width: 270px;
  height: 270px;
  border-color: rgba(6, 182, 212, 0.2);
  transform: rotate(35deg);
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.home-stat-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem;
  border-radius: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}

.home-stat-icon {
  font-size: 1.65rem;
}

.home-stat-card div {
  display: flex;
  flex-direction: column;
}

.home-stat-card strong {
  font-size: 1.45rem;
  line-height: 1.1;
}

.home-stat-card span:not(.home-stat-icon) {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.home-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin: 4rem 0 1.5rem;
}

.home-section-heading h2 {
  margin: 0;
  font-size: 2rem;
}

.home-section-heading p {
  max-width: 520px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.home-feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 220px;
  padding: 1.6rem;
  border-radius: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2rem;
}

.home-feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.home-feature-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.9rem;
}

/* ================= Quick Action Menu ================= */
.quick-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.quick-menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.quick-menu-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.18);
}

.quick-menu-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  border: 1px solid var(--border-glass);
  transition: transform var(--transition-fast);
}

.quick-menu-item:hover .quick-menu-icon {
  transform: scale(1.1) rotate(4deg);
}

.quick-menu-info {
  flex: 1;
  min-width: 0;
}

.quick-menu-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-menu-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-menu-arrow {
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 700;
  transition: transform var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.quick-menu-item:hover .quick-menu-arrow {
  transform: translateX(4px);
  color: var(--accent-primary);
}

@media (max-width: 640px) {
  .quick-menu-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .quick-menu-item {
    padding: 0.9rem 1.1rem;
  }
}

/* ================= Home Social Links Panel (Below Quick Menu) ================= */
.home-links-panel {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--transition-normal);
}

.home-links-panel:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.home-links-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.home-links-title {
  margin: 0.35rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.home-links-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.home-social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.home-social-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.home-social-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.home-social-item.social-github:hover {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.08);
  box-shadow: 0 10px 24px rgba(168, 85, 247, 0.18);
}

.home-social-item.social-facebook:hover {
  border-color: rgba(24, 119, 242, 0.5);
  background: rgba(24, 119, 242, 0.08);
  box-shadow: 0 10px 24px rgba(24, 119, 242, 0.18);
}

.home-social-item.social-linkedin:hover {
  border-color: rgba(10, 102, 194, 0.5);
  background: rgba(10, 102, 194, 0.08);
  box-shadow: 0 10px 24px rgba(10, 102, 194, 0.18);
}

.home-social-item.social-email:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.18);
}

.home-social-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.home-social-item:hover .home-social-icon {
  transform: scale(1.12) rotate(4deg);
}

.home-social-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.home-social-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-social-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-social-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.home-social-item:hover .home-social-arrow {
  transform: translate(3px, -3px);
  color: var(--accent-primary);
}

@media (max-width: 992px) {
  .home-social-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .home-social-grid {
    grid-template-columns: 1fr;
  }

  .home-links-panel {
    padding: 1.25rem 1rem;
  }
}

.feature-arrow {
  margin-top: auto;
  font-size: 1.3rem;
  color: var(--accent-primary);
}

.feature-schedule {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.13), var(--bg-card));
}

.home-login-note {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.home-login-note p {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 992px) {
  .home-hero-card {
    grid-template-columns: 1fr;
  }

  .home-visual {
    min-height: 350px;
  }

  .home-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .home-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  main.main-content {
    padding: 1.25rem 0 2.5rem;
  }

  .home-dashboard {
    padding-top: 0.75rem;
  }

  .home-hero-card {
    padding: 1.5rem 1rem !important;
    border-radius: 1.25rem;
    gap: 1.5rem;
  }

  .home-title {
    font-size: clamp(1.75rem, 6.5vw, 2.5rem);
    letter-spacing: -0.5px;
    margin-bottom: 0.85rem;
  }

  .home-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.55;
  }

  .home-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .home-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .home-visual {
    min-height: 250px;
    overflow: hidden;
    max-width: 100%;
  }

  .home-avatar-card {
    width: 200px;
    height: 245px;
    border-radius: 1.25rem;
  }

  .orbit-one {
    width: 250px;
    height: 250px;
  }

  .orbit-two {
    width: 180px;
    height: 180px;
  }

  .home-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-login-note {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.15rem 1rem;
  }

  .quick-menu-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .quick-menu-item {
    padding: 0.85rem 1rem;
  }

  .home-section-heading {
    margin: 2.5rem 0 1.25rem;
    gap: 0.5rem;
  }

  .home-section-heading h2 {
    font-size: 1.5rem;
  }

  .home-links-title {
    font-size: 1.35rem;
  }

  .home-social-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    display: block;
  }

  /* Mobile Toast positioning */
  .toast-container {
    bottom: 1rem;
    right: 0.75rem;
    left: 0.75rem;
  }

  .toast {
    min-width: 0;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }
}

/* ================= Profile & Auth Responsive Utilities ================= */
.profile-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

/* Profile Redesign Enhancements */
.profile-avatar-wrapper:hover .avatar-edit-icon {
  transform: scale(1.15) rotate(5deg);
}

.profile-avatar-wrapper:hover img {
  transform: scale(1.05);
}

.profile-avatar-wrapper img {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

/* =========================================================================
   Profile Page & Light-Mode Enhancements
   ========================================================================= */
[data-theme="light"] .form-control {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .form-control:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

[data-theme="light"] .role-tag.admin {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

[data-theme="light"] .role-tag.user {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}

/* Profile Stat Cards */
.profile-stat-card {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

[data-theme="light"] .profile-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .profile-stat-card {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.profile-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Profile Segmented Tabs Nav */
.profile-segmented-nav {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  overflow-x: auto;
}

[data-theme="light"] .profile-segmented-nav {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.profile-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.profile-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.profile-tab-btn.active {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* Disabled Form Control */
.form-control-disabled {
  opacity: 0.85;
  cursor: not-allowed !important;
  user-select: none;
}

[data-theme="light"] .form-control-disabled {
  background: #f1f5f9 !important;
  border: 1.5px dashed #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="dark"] .form-control-disabled {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.14) !important;
  color: #94a3b8 !important;
}

/* Profile Meta Bar */
.profile-meta-bar {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

[data-theme="light"] .profile-meta-bar {
  background: #f8fafc;
  border-color: #e2e8f0;
}

@media (max-width: 768px) {
  .profile-layout-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.profile-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .profile-form-row-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.auth-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .auth-container {
    padding: 1rem 0.75rem 2.5rem;
  }

  .auth-panel {
    padding: 1.5rem 1.15rem !important;
  }
}

/* ===================================================
   In-App Modal Dialog System (Replaces Native Alert/Confirm/Prompt)
   =================================================== */
.app-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.app-dialog-overlay.active {
  opacity: 1;
  visibility: visible;
}

.app-dialog-container {
  background: var(--bg-surface, #1e293b);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.14));
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 35px rgba(99, 102, 241, 0.2);
  width: 100%;
  max-width: 440px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-dialog-overlay.active .app-dialog-container {
  transform: scale(1) translateY(0);
}

.app-dialog-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.app-dialog-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  flex-shrink: 0;
}

.app-dialog-icon.success {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.3);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.app-dialog-icon.danger,
.app-dialog-icon.error {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.3);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.app-dialog-icon.warning {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.3);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.app-dialog-icon.info,
.app-dialog-icon.question {
  background: rgba(99, 102, 241, 0.16);
  color: #818cf8;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.app-dialog-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.35;
}

.app-dialog-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-dialog-input-wrap {
  width: 100%;
}

.app-dialog-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-primary, #0c1222);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.15));
  border-radius: var(--radius-md, 12px);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.app-dialog-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.app-dialog-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.app-dialog-btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md, 12px);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
}

.app-dialog-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
}

.app-dialog-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

.app-dialog-btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.app-dialog-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
}

.app-dialog-btn-primary.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.app-dialog-btn-primary.danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
}

.app-dialog-btn-primary.success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

@media (max-width: 480px) {
  .app-dialog-container {
    padding: 1.4rem;
    border-radius: 18px;
  }

  .app-dialog-actions {
    flex-direction: column-reverse;
  }

  .app-dialog-btn {
    width: 100%;
  }

  .glass-panel {
    padding: clamp(1rem, 3.5vw, 1.35rem) !important;
  }

  .modal-footer {
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .modal-footer>* {
    flex: 1 1 auto;
    min-height: 38px;
    max-height: 48px;
  }

  .modal-detail-footer>* {
    flex: none !important;
  }

  .toast-container {
    bottom: 1rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-width: calc(100vw - 1.5rem);
  }

  .toast {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    transform: translateY(120%);
    box-sizing: border-box;
  }

  .toast.show {
    transform: translateY(0);
  }
}

@media (max-width: 360px) {
  .brand-logo {
    max-width: 135px;
  }

  .brand-text {
    font-size: 0.82rem;
  }

  .nav-actions {
    gap: 0.25rem;
  }

  .nav-actions .btn-sm {
    padding: 0.28rem 0.48rem;
    font-size: 0.74rem;
  }
}

/* Dual Grid for Admin Dashboard */
.admin-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 992px) {
  .admin-dual-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Admin Responsive Enhancements */
.admin-stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  width: 100%;
  box-sizing: border-box;
}

.admin-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 680px) {
  .admin-stat-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    margin-bottom: 1.25rem !important;
  }

  .admin-stat-cards-grid .glass-panel {
    padding: 0.75rem 0.65rem !important;
    gap: 0.55rem !important;
  }

  .admin-stat-cards-grid .glass-panel > div:first-child {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.2rem !important;
    border-radius: var(--radius-sm) !important;
    flex-shrink: 0 !important;
  }

  .admin-stat-cards-grid .glass-panel > div:last-child > div:first-child {
    font-size: 1.15rem !important;
    line-height: 1.2 !important;
  }

  .admin-stat-cards-grid .glass-panel > div:last-child > div:last-child {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
  }

  .admin-header-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem !important;
  }

  .admin-header-actions .btn {
    font-size: 0.76rem !important;
    padding: 0.45rem 0.45rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
  }
}

@media (max-width: 420px) {
  .admin-stat-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem !important;
  }

  .admin-header-actions {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.35rem !important;
  }

  .admin-header-actions .btn {
    font-size: 0.72rem !important;
    padding: 0.4rem 0.35rem !important;
  }
}

/* Responsive Table transformed to Cards on Mobile */
@media (max-width: 768px) {

  .admin-table-responsive,
  .admin-table-responsive thead,
  .admin-table-responsive tbody,
  .admin-table-responsive tr,
  .admin-table-responsive td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .admin-table-responsive thead {
    display: none;
  }

  .admin-table-responsive tr {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    margin-bottom: 1.15rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }

  .admin-table-responsive td {
    padding: 0.45rem 0 !important;
    border: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
  }

  .admin-table-responsive td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: left;
    padding-right: 0.75rem;
    flex-shrink: 0;
  }

  .admin-table-responsive td:last-child {
    margin-top: 0.65rem;
    padding-top: 0.75rem !important;
    border-top: 1px solid var(--border-glass) !important;
    justify-content: space-between;
  }
}

/* ==========================================================================
   VÃ TÃ€I KHOáº¢N & Há»† THá»NG Náº P TIá»€N VIETQR (WALLET & DEPOSIT STYLES)
   ========================================================================== */

/* 1. Portal Topbar Wallet Badge */
.portal-wallet-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.5rem 0.2rem 0.65rem;
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.portal-wallet-badge:hover {
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.portal-wallet-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.portal-wallet-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.portal-wallet-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.portal-wallet-amount {
  font-size: 0.85rem;
  font-weight: 800;
  color: #10b981;
}

.portal-wallet-deposit-btn {
  background: var(--success);
  color: #ffffff;
  border: none;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-xs, 4px);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.portal-wallet-deposit-btn:hover {
  background: #059669;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

/* 2. Standard Navbar Wallet Pill */
.user-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.2rem 0.5rem 0.2rem 0.65rem;
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.wallet-pill-icon {
  font-size: 0.95rem;
}

.wallet-pill-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #10b981;
}

.wallet-pill-btn {
  background: var(--success);
  color: #fff;
  border: none;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-xs, 4px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.wallet-pill-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* 3. Global Deposit Modal Styling */
/* Đảm bảo Modal Nạp Tiền luôn nổi trên mọi Modal chi tiết sản phẩm Shop / Clone / DVMXH */
#modalDepositWallet.portal-modal-backdrop {
  z-index: 10050 !important;
}

.wallet-deposit-modal-card {
  max-width: 560px !important;
  width: 95%;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 25px rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.wallet-deposit-modal-card .portal-modal-header {
  flex-shrink: 0;
}

.wallet-deposit-modal-card .portal-modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.15rem 1.25rem;
}

.wallet-modal-balance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.15rem;
}

.wallet-balance-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.wallet-modal-current-bal {
  font-size: 1.3rem;
  font-weight: 900;
  color: #10b981;
  letter-spacing: -0.5px;
}

.deposit-quick-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.deposit-chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-width: 0;
}

.deposit-chip-btn:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.deposit-chip-btn.active {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* 4. VietQR Step 2 Display */
.deposit-qr-wrap {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.deposit-qr-img-box {
  width: 100%;
  max-width: 210px;
  margin: 0 auto;
  text-align: center;
  background: #ffffff;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.deposit-qr-img {
  width: 100%;
  max-width: 190px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.deposit-info-card {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  box-sizing: border-box;
}

.deposit-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  min-width: 0;
}

.deposit-info-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.deposit-info-val {
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.deposit-info-row.memo-row {
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
}

.highlight-memo {
  font-family: monospace;
  font-size: 0.95rem;
  color: #f59e0b;
}

[data-theme="light"] .highlight-memo {
  color: #d97706;
}

.btn-copy-chip {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary, #6366f1);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-copy-chip:hover {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.btn-copy-chip.copied {
  background: #10b981 !important;
  color: #fff !important;
  border-color: #10b981 !important;
}

/* History Items */
.deposit-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  font-size: 0.8rem;
}

.deposit-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.deposit-status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.deposit-status-pill.approved {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.deposit-status-pill.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* SePay Live Payment Status & Dynamic QR Enhancements */
.sepay-live-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-md, 12px);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sepay-live-status-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.sepay-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: sepayPulseAnim 1.8s infinite;
}

@keyframes sepayPulseAnim {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.sepay-live-status-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #10b981;
  line-height: 1.3;
}

.sepay-live-status-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.sepay-countdown-pill {
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sepay-qr-frame {
  background: #ffffff;
  padding: 0.55rem;
  border-radius: 12px;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.sepay-qr-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #059669;
  background: rgba(16, 185, 129, 0.14);
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.deposit-qr-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.42rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.deposit-qr-download-btn:hover {
  border-color: #10b981;
  color: #10b981;
}

.sepay-success-check-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
}

.sepay-success-receipt {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md, 12px);
  padding: 0.95rem 1.1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.sepay-receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .portal-wallet-label {
    display: none;
  }

  /* Đảm bảo Modal Nạp Tiền luôn nổi trên mọi Modal chi tiết sản phẩm Shop / Clone / DVMXH */
#modalDepositWallet.portal-modal-backdrop {
  z-index: 10050 !important;
}

.wallet-deposit-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0 !important;
    margin-top: auto;
  }

  #modalDepositWallet.portal-modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .wallet-deposit-modal-card .portal-modal-body {
    padding: 1rem;
  }

  .deposit-quick-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .deposit-chip-btn {
    font-size: 0.8rem;
    padding: 0.55rem 0.35rem;
  }

  .deposit-qr-wrap {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .deposit-qr-img-box {
    width: 100%;
    max-width: 210px;
    margin: 0 auto;
  }
}

/* ==============================================================
   MULTI-BANK VIETQR SELECTOR (CHỌN NGÂN HÀNG THANH TOÁN / NẠP TIỀN)
   ============================================================== */
.qr-bank-selector-wrap {
  width: 100%;
  min-width: 0;
  margin-bottom: 0.85rem;
  box-sizing: border-box;
}

.qr-bank-selector-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.qr-bank-title-main {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary);
  font-weight: 700;
}

.qr-bank-selector-title .sub-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.qr-bank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.qr-bank-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-glass);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  user-select: none;
  outline: none;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

[data-theme="light"] .qr-bank-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.qr-bank-item:hover {
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.qr-bank-item.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: #6366f1;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .qr-bank-item.active {
  background: rgba(99, 102, 241, 0.08);
  border-color: #4f46e5;
}

.qr-bank-logo-wrap {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 7px;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.qr-bank-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.qr-bank-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.qr-bank-shortname {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qr-bank-item.active .qr-bank-shortname {
  color: #6366f1;
}

[data-theme="light"] .qr-bank-item.active .qr-bank-shortname {
  color: #4f46e5;
}

.qr-bank-accnum {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.qr-bank-check-icon {
  display: none;
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.qr-bank-item.active .qr-bank-check-icon {
  display: inline-flex;
}

@media (max-width: 480px) {
  .qr-bank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .qr-bank-item {
    padding: 0.45rem 0.5rem;
    gap: 0.4rem;
  }

  .qr-bank-logo-wrap {
    width: 28px;
    height: 28px;
    padding: 2px;
  }

  .qr-bank-shortname {
    font-size: 0.78rem;
  }

  .qr-bank-accnum {
    font-size: 0.66rem;
  }

  .qr-bank-check-icon {
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }
}

/* ==============================================================
   NÃšT HÃ€NH Äá»˜NG MODAL THANH TOÃN (TIáº¾P Tá»¤C MUA Sáº®M & XEM ÄÆ N HÃ€NG)
   ============================================================== */
.paid-modal-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0.85rem;
}

.btn-shop-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #ffffff);
  border: 1.5px solid var(--border-glass, rgba(255, 255, 255, 0.2));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 46px;
  line-height: 1.2;
  text-decoration: none;
}

[data-theme="light"] .btn-shop-continue,
body:not(.dark-mode) .btn-shop-continue {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-shop-continue:hover {
  background: rgba(99, 102, 241, 0.14) !important;
  border-color: #6366f1 !important;
  color: #6366f1 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-shop-continue:active {
  transform: translateY(0);
}

.btn-shop-goto-orders {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.55rem;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.38);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 46px;
  line-height: 1.2;
  text-decoration: none;
}

.btn-shop-goto-orders:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.48);
  filter: brightness(1.06);
}

.btn-shop-goto-orders:active {
  transform: translateY(0);
}

@media (max-width: 520px) {
  .paid-modal-actions {
    flex-direction: column-reverse;
    gap: 0.65rem;
  }

  .btn-shop-continue,
  .btn-shop-goto-orders {
    width: 100%;
    justify-content: center;
  }
}

/* ==============================================================
   THáºº Lá»°A CHá»ŒN PHÆ¯Æ NG THá»¨C THANH TOÃN (SHOP & DVMXH)
   ============================================================== */
.pay-option-card,
.shop-pay-option-card,
.dvmxh-pay-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

[data-theme="light"] .pay-option-card,
[data-theme="light"] .shop-pay-option-card,
[data-theme="light"] .dvmxh-pay-option-card,
body:not(.dark-mode) .shop-pay-option-card,
body:not(.dark-mode) .dvmxh-pay-option-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.pay-option-card:hover,
.shop-pay-option-card:hover,
.dvmxh-pay-option-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.pay-option-card.active,
.shop-pay-option-card.active,
.dvmxh-pay-option-card.active {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.09) !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .pay-option-card.active,
[data-theme="light"] .shop-pay-option-card.active,
[data-theme="light"] .dvmxh-pay-option-card.active,
body:not(.dark-mode) .shop-pay-option-card.active,
body:not(.dark-mode) .dvmxh-pay-option-card.active {
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: #6366f1 !important;
}

.pay-radio-check,
.dvmxh-pay-radio-check {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  border: 1.5px solid var(--border-glass, #64748b) !important;
  background: transparent !important;
  color: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  transition: all 0.2s ease !important;
}

.shop-pay-option-card.active .pay-radio-check,
.dvmxh-pay-option-card.active .dvmxh-pay-radio-check {
  background: #6366f1 !important;
  border-color: #6366f1 !important;
  color: #ffffff !important;
}

@media (max-width: 540px) {

  #shopPaymentMethodGrid,
  #dvmxhPaymentMethodGrid {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }
}

/* ==========================================================================
   FINAL OVERRIDE: PORTAL MOBILE HEADER (<= 640px)
   Cháº¯c cháº¯n khÃ´ng bá»‹ báº¥t ká»³ rule nÃ o bÃªn trÃªn override
   ========================================================================== */
@media (max-width: 640px) {
  .portal-topbar {
    height: 52px !important;
    padding: 0 0.55rem !important;
    gap: 0.35rem !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .portal-topbar-left {
    gap: 0.35rem !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .portal-mobile-menu-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .portal-mobile-brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
  }

  .portal-mobile-brand-icon {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.74rem !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .portal-mobile-brand-text {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    letter-spacing: -0.3px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 88px !important;
  }

  .portal-topbar-right {
    gap: 0.3rem !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
  }

  /* áº¨n search button vÃ  panel trÃªn mobile topbar */
  .portal-mobile-search-btn,
  .portal-mobile-search-panel,
  .portal-lang-select-box:not(.sidebar-lang-box) {
    display: none !important;
  }

  /* Theme button gá»n gÃ ng */
  .portal-theme-toggle-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.78rem !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
  }

  /* Wallet Badge: Cá»±c ká»³ gá»n gÃ ng trÃªn 1 dÃ²ng duy nháº¥t, khÃ´ng xuá»‘ng dÃ²ng, khÃ´ng chá»“ng chá»¯ */
  .portal-wallet-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    padding: 0.16rem 0.35rem 0.16rem 0.45rem !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    max-width: none !important;
  }

  .portal-wallet-icon {
    font-size: 0.8rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }

  .portal-wallet-info {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    gap: 0 !important;
  }

  .portal-wallet-label {
    display: none !important;
  }

  .portal-wallet-amount {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    letter-spacing: -0.2px !important;
    color: #10b981 !important;
    max-width: 75px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
  }

  .portal-wallet-deposit-btn {
    padding: 0.14rem 0.38rem !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    line-height: 1.15 !important;
    flex-shrink: 0 !important;
  }

  /* Avatar & Role Dot: áº¨n meta text name/title chá»‘ng chá»“ng Ä‘Ã¨ chá»¯ */
  .portal-admin-meta {
    display: none !important;
  }

  .portal-user-badge-wrap {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .portal-admin-contact-btn {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .portal-avatar-ring {
    width: 28px !important;
    height: 28px !important;
  }

  .portal-admin-avatar {
    width: 28px !important;
    height: 28px !important;
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4) !important;
  }

  .portal-avatar-role-dot {
    width: 12px !important;
    height: 12px !important;
    font-size: 0.5rem !important;
    bottom: -2px !important;
    right: -2px !important;
  }

  /* Guest actions gá»n gÃ ng */
  .portal-guest-auth-actions {
    display: inline-flex !important;
    gap: 0.3rem !important;
    flex-shrink: 0 !important;
  }

  .portal-guest-login-btn {
    padding: 0.22rem 0.55rem !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
  }

  .portal-guest-register-btn {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .portal-mobile-brand-text {
    display: none !important;
  }

  .portal-wallet-amount {
    max-width: 60px !important;
    font-size: 0.68rem !important;
  }
}

/* ==========================================================================
   10. COMPACT & OPTIMIZED HOMEPAGE PORTAL (CLEAN 2-COLUMN LAYOUT)
   ========================================================================== */

.portal-main-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.25rem 0 2rem;
}

/* 2-Column Focused Grid (Cá»™t TrÃ¡i: NgÆ°á»i DÃ¹ng & LiÃªn Há»‡ - Cá»™t Pháº£i: ThÃ´ng BÃ¡o & Cáº­p Nháº­t) */
.portal-focused-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.portal-left-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.portal-left-column > div {
  height: 100%;
}

.portal-right-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.portal-right-column > div {
  height: 100%;
}

.portal-contact-fullwidth {
  width: 100%;
  margin-top: 0;
}

.portal-channels-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

@media (max-width: 992px) {
  .portal-channels-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .portal-channels-grid-3col {
    grid-template-columns: 1fr;
  }
}

/* 1. Welcome Card (Guest) */
.portal-welcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.welcome-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.welcome-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-primary, #6366f1);
  letter-spacing: 0.4px;
}

.welcome-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
}

.welcome-subtext {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

.welcome-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* 2. User & Admin Summary Card */
.portal-user-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.portal-user-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.portal-user-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.portal-user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary, #6366f1);
}

.portal-user-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-card);
}

.portal-user-info {
  flex: 1;
  min-width: 180px;
}

.portal-user-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.3;
}

.portal-user-role-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.portal-user-role-pill.role-admin {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.portal-user-username {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.portal-user-wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 0.65rem;
}

.wallet-balance-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.wallet-balance-item .wallet-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.wallet-balance-item .wallet-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #10b981;
}

.wallet-actions-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* 3. Compact Services Hub */
.portal-services-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.portal-services-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-services-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.3px;
}

.portal-services-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.portal-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.portal-service-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0.85rem;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-service-item:hover {
  border-color: var(--accent-primary, #6366f1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .portal-service-item:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.portal-service-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.portal-service-icon .portal-nav-emoji-img,
.portal-service-icon img,
.portal-service-icon svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.portal-service-item:hover .portal-service-icon {
  transform: scale(1.08);
}

.icon-tint-green  { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.icon-tint-blue   { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.icon-tint-amber  { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.icon-tint-indigo { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.icon-tint-cyan   { background: rgba(6, 182, 212, 0.12);  color: #06b6d4; }
.icon-tint-rose   { background: rgba(244, 63, 94, 0.12);  color: #f43f5e; }
.icon-tint-teal   { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }
.icon-tint-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }

.portal-service-content {
  min-width: 0;
  flex: 1;
}

.portal-service-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.portal-service-tag {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  white-space: nowrap;
}

.portal-service-desc {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 4. Contact Channels Card */
.portal-contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Responsive queries cho Portal */
@media (max-width: 992px) {
  .portal-focused-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .portal-right-column {
    position: static;
  }

  .updates-feed-list {
    max-height: 340px;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: thin;
  }
}

@media (max-width: 600px) {
  .portal-main-container {
    padding: 0 0.5rem 1.5rem;
  }
  .portal-channels-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .portal-user-wallet-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .wallet-actions-group {
    width: 100%;
    display: flex;
    gap: 0.4rem;
  }
  .wallet-actions-group .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.78rem;
    padding: 0.45rem 0.5rem;
  }
}

/* ==========================================================================
   CAROUSEL SLIDE LOOP BANNER (Kiá»ƒu dÃ¡ng Carousel Loop Chuáº©n Bootstrap & TÃ¹y biáº¿n)
   ========================================================================== */
.carousel-banner-container,
.carousel.slide {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: 0 auto 1.25rem;
}

.carousel-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0 0.35rem;
}

.carousel-header-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-counter-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--accent-primary, #60a5fa);
  margin-left: 0.5rem;
}

.carousel-controls-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Accessibility - áº¨n phá»¥ trá»£ mÃ n hÃ¬nh chuáº©n khÃ´ng vá»¡ bá»‘ cá»¥c */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* NÃºt Icon Next/Prev chuáº©n */
.btn-icon.btn-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.btn-icon.btn-sm svg {
  display: block;
  stroke: var(--text-secondary);
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.btn-icon.btn-sm:hover {
  background: var(--accent-primary, #3b82f6);
  color: #ffffff;
  border-color: var(--accent-primary, #3b82f6);
  transform: scale(1.08);
}

.btn-icon.btn-sm:hover svg {
  stroke: #ffffff;
}

.carousel-icon-prev,
.carousel-icon-next {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
}

.carousel-icon-prev {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2394a3b8'%3e%3cpath fill-rule='evenodd' d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-icon-next {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2394a3b8'%3e%3cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.btn-icon.btn-sm:hover .carousel-icon-prev {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.btn-icon.btn-sm:hover .carousel-icon-next {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Rounded-5 gÃ³c cong má»m máº¡i */
.rounded-5 {
  border-radius: 1.5rem !important;
}

.carousel-inner,
.carousel-inner-box {
  position: relative;
  width: 100%;
  max-height: 320px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  background: radial-gradient(ellipse at center, rgba(30, 41, 59, 0.6) 0%, rgba(11, 15, 25, 0.95) 100%);
  border-radius: var(--radius-md, 14px);
}

/* Track trÆ°á»£t ngang siÃªu mÆ°á»£t */
.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-slide-item {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.carousel-item {
  position: relative;
  display: none;
  width: 100%;
  float: left;
  margin-right: -100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  backface-visibility: hidden;
}

.carousel-item.active {
  display: block;
  opacity: 1;
}

.banner-ad-img,
.carousel-item img,
.carousel-item .carousel-banner-img {
  width: 100%;
  height: 320px !important;
  max-height: 320px !important;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  transition: transform 0.4s ease;
}

.banner-ad-link {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 1.5rem;
}

.banner-ad-link:hover .banner-ad-img,
.carousel-item:hover img {
  transform: scale(1.012);
}

/* NÃºt Next vÃ  LÃ¹i Náº°M TRONG BANNER */
.carousel-inner-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  padding: 0;
  user-select: none;
}

.carousel-inner-btn svg {
  display: block;
  stroke: #ffffff;
  transition: transform 0.2s ease;
}

.carousel-inner-btn:hover {
  background: var(--accent-primary, #3b82f6);
  border-color: var(--accent-primary, #3b82f6);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.55);
}

.carousel-inner-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel-inner-prev {
  left: 18px;
}

.carousel-inner-next {
  right: 18px;
}

@media (max-width: 768px) {
  .carousel-inner-btn {
    width: 36px;
    height: 36px;
  }
  .carousel-inner-prev {
    left: 10px;
  }
  .carousel-inner-next {
    right: 10px;
  }
  .carousel-inner-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Lá»›p phá»§ phá»¥ Ä‘á» (Caption Overlay) */
.carousel-caption-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.55) 50%, rgba(15, 23, 42, 0.15) 100%);
  display: flex;
  align-items: center;
  padding: 2.2rem 3rem;
  z-index: 2;
}

.carousel-caption-content {
  max-width: 720px;
}

.carousel-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.45);
  backdrop-filter: blur(8px);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.carousel-caption-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.65rem 0;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.carousel-caption-desc {
  font-size: 0.92rem;
  color: #e2e8f0;
  margin: 0 0 1.2rem 0;
  line-height: 1.55;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-carousel-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  transition: all 0.2s ease;
}

.btn-carousel-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.55);
}

/* Dots Indicator */
.carousel-indicators-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  width: 28px;
  border-radius: 10px;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
}

/* ==========================================================================
   Tá»I Æ¯U HÃ“A GIAO DIá»†N CHUáº¨N & MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .carousel-banner-container,
  .carousel.slide {
    max-width: 100%;
    margin-bottom: 1.25rem;
  }
  .carousel-inner,
  .carousel-inner-box {
    max-height: 260px;
  }
  .banner-ad-img,
  .carousel-item img,
  .carousel-item .carousel-banner-img {
    height: 260px !important;
    max-height: 260px !important;
    object-fit: contain;
  }
}

@media (max-width: 768px) {
  .carousel-banner-container,
  .carousel.slide {
    margin-bottom: 1rem;
  }
  .carousel-inner,
  .carousel-inner-box {
    max-height: 200px;
  }
  .carousel-header-bar {
    margin-bottom: 0.65rem;
  }
  .carousel-header-title {
    font-size: 1.05rem;
  }
  .carousel-counter-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
  }
  .btn-icon.btn-sm {
    width: 30px;
    height: 30px;
  }
  .carousel-inner-btn {
    width: 30px;
    height: 30px;
  }
  .banner-ad-img,
  .carousel-item img,
  .carousel-item .carousel-banner-img {
    height: 200px !important;
    max-height: 200px !important;
    object-fit: contain;
  }
  .carousel-caption-overlay {
    padding: 1rem 1.2rem;
  }
  .carousel-caption-title {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
  }
  .carousel-caption-desc {
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
    -webkit-line-clamp: 1;
  }
  .btn-carousel-cta {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }
  .carousel-badge-pill {
    padding: 0.15rem 0.45rem;
    font-size: 0.65rem;
    margin-bottom: 0.35rem;
  }
  .carousel-indicators-dots {
    bottom: 0.5rem;
  }
  .carousel-dot {
    width: 7px;
    height: 7px;
  }
  .carousel-dot.active {
    width: 20px;
  }
}

@media (max-width: 576px) {
  .rounded-5 {
    border-radius: 1.1rem !important;
  }
  .carousel-inner {
    border-radius: 1.1rem !important;
  }
  .banner-ad-img,
  .carousel-item img,
  .carousel-item .carousel-banner-img {
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: contain;
  }
  .carousel-caption-overlay {
    padding: 0.85rem 1rem;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.65) 60%, transparent 100%);
    align-items: flex-end;
  }
  .carousel-caption-title {
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
  }
  .carousel-caption-desc {
    display: none;
  }
  .btn-carousel-cta {
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
  }
  .portal-welcome-card,
  .portal-user-summary-card,
  .portal-contact-card,
  .portal-updates-card {
    padding: 1rem 0.95rem;
    border-radius: 14px;
  }
  .portal-channels-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .channel-card-item {
    padding: 0.6rem 0.75rem;
  }
}

/* ==========================================================================
   ADMIN BANNER TOGGLE CONTROLS (QUẢN TRỊ ẨN / BẬT BANNER TRANG CHỦ)
   ========================================================================== */
.admin-banner-quick-wrap {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 25;
  pointer-events: auto;
}

.btn-admin-banner-quick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.btn-admin-banner-quick:hover {
  background: rgba(239, 68, 68, 0.92);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.admin-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
  animation: adminPulseDot 1.8s infinite;
}

@keyframes adminPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.admin-banner-hidden-bar {
  max-width: 880px;
  margin: 0 auto 1.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px dashed rgba(245, 158, 11, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: fadeInDown 0.3s ease;
}

.admin-banner-hidden-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-banner-hidden-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-banner-hidden-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #f59e0b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.admin-banner-hidden-text {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.4;
}

.admin-banner-hidden-text strong {
  color: #ef4444;
}

.btn-admin-banner-show {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
  user-select: none;
}

.btn-admin-banner-show:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

@media (max-width: 576px) {
  .admin-banner-quick-wrap {
    top: 6px;
    right: 8px;
  }
  .btn-admin-banner-quick {
    padding: 4px 9px;
    font-size: 0.72rem;
  }
  .admin-banner-hidden-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .btn-admin-banner-show {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
  }
}



/* =========================================================================
   ADMIN QUICK ACCESS SYSTEM (Nút Truy Cập Nhanh Trang Quản Trị Hệ Thống)
   Đồng bộ cho Desktop, Tablet & Mobile (Dark Mode & Light Mode)
   ========================================================================= */

/* 1. Nút Quản Trị Nhanh trên Header / Topbar */
.portal-quick-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  position: relative;
  flex-shrink: 0;
  user-select: none;
  cursor: pointer;
  line-height: 1.2;
}

.portal-quick-admin-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.portal-quick-admin-btn:active {
  transform: scale(0.97);
}

.portal-quick-admin-icon {
  font-size: 0.95rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.portal-quick-admin-text {
  font-weight: 800;
  letter-spacing: -0.2px;
}

.portal-quick-admin-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  line-height: 1.2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: pulseQuickBadge 1.8s infinite;
}

@keyframes pulseQuickBadge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
  }
}

/* 2. Admin Quick Dropdown Menu */
.portal-admin-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.portal-admin-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 290px;
  background: var(--bg-surface, #0f172a);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(99, 102, 241, 0.15);
  padding: 0.75rem 0.5rem 0.5rem;
  z-index: 1001;
  display: none;
  animation: adminDropFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.portal-admin-dropdown-menu.show {
  display: block;
}

[data-theme="light"] .portal-admin-dropdown-menu {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18), 0 0 1px rgba(15, 23, 42, 0.1);
}

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

.portal-admin-drop-header {
  padding: 0.4rem 0.75rem 0.65rem;
  border-bottom: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  margin-bottom: 0.35rem;
}

[data-theme="light"] .portal-admin-drop-header {
  border-bottom-color: #e2e8f0;
}

.portal-admin-drop-user {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.portal-admin-drop-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.portal-admin-drop-balance {
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-glass, rgba(255, 255, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

[data-theme="light"] .portal-admin-drop-balance {
  border-top-color: #e2e8f0;
}

.portal-admin-drop-balance strong {
  color: #10b981;
  font-weight: 800;
  font-size: 0.88rem;
}

.portal-admin-drop-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.portal-admin-drop-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  text-decoration: none !important;
  color: var(--text-primary) !important;
  transition: all 0.15s ease;
  position: relative;
}

.portal-admin-drop-item:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.06));
}

[data-theme="light"] .portal-admin-drop-item:hover {
  background: #f1f5f9;
}

.portal-admin-drop-item.highlight {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

[data-theme="light"] .portal-admin-drop-item.highlight {
  background: #fef3c7;
  border-color: #fde68a;
}

.portal-admin-drop-item.highlight .portal-admin-drop-name {
  color: #f59e0b;
  font-weight: 800;
}

[data-theme="light"] .portal-admin-drop-item.highlight .portal-admin-drop-name {
  color: #d97706;
}

.portal-admin-drop-item.danger {
  color: #ef4444 !important;
}

.portal-admin-drop-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
}

.portal-admin-drop-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.portal-admin-drop-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.portal-admin-drop-name {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-admin-drop-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-admin-drop-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.portal-admin-drop-divider {
  height: 1px;
  background: var(--border-glass, rgba(255, 255, 255, 0.08));
  margin: 0.3rem 0.5rem;
}

[data-theme="light"] .portal-admin-drop-divider {
  background: #e2e8f0;
}

/* 3. Nút Nổi Quản Trị Nhanh (Floating Admin Action Button - FAB) */
.portal-admin-fab-wrap {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 850;
  animation: adminFabEntrance 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adminFabEntrance {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.portal-admin-fab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  color: #fbbf24 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.65);
  border-radius: 999px;
  text-decoration: none !important;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 18px rgba(245, 158, 11, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  cursor: pointer;
  position: relative;
}

[data-theme="light"] .portal-admin-fab {
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
  color: #b45309 !important;
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 10px 28px rgba(180, 83, 9, 0.2), 0 0 12px rgba(245, 158, 11, 0.15);
}

.portal-admin-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 24px rgba(245, 158, 11, 0.45);
  border-color: #f59e0b;
}

[data-theme="light"] .portal-admin-fab:hover {
  box-shadow: 0 14px 34px rgba(180, 83, 9, 0.28), 0 0 18px rgba(245, 158, 11, 0.3);
}

.portal-admin-fab:active {
  transform: scale(0.96);
}

.admin-fab-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.admin-fab-text {
  font-weight: 800;
  letter-spacing: -0.2px;
}

.admin-fab-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  line-height: 1.2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  animation: pulseQuickBadge 1.8s infinite;
}

/* 4. Responsive cho Nút Quản Trị Nhanh trên Mobile (<= 640px) */
@media (max-width: 640px) {
  .portal-quick-admin-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.76rem;
    gap: 0.3rem;
  }

  .portal-admin-fab-wrap {
    bottom: 16px;
    left: 14px;
  }

  .portal-admin-fab {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }

  .portal-admin-dropdown-menu {
    width: min(92vw, 300px);
    right: -10px;
  }
}

@media (max-width: 400px) {
  .portal-quick-admin-text {
    display: none; /* Thu gọn chữ 'Quản Trị' thành icon 👑 trên mobile siêu hẹp */
  }

  .portal-quick-admin-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .admin-fab-text {
    display: none;
  }

  .portal-admin-fab {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}
