/* ===== Google Fonts & FontAwesome ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

html {
  font-size: calc(16px * var(--ui-scale, 1));
}

/* CSS chuẩn cho PC và Tablet */
.video-responsive {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Thay thế padding-bottom giúp chống biến dạng trong modal */
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: block; 
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Thủ thuật thu nhỏ bộ nút Google Drive CHỈ áp dụng cho màn hình Mobile */
@media (max-width: 768px) {
    .video-responsive iframe {
        width: 200%;
        height: 200%;
        transform: scale(0.5);
        transform-origin: top left;
    }
}

/* ===== CSS Variables (Apple Vision / LiquidGlass Style) ===== */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --primary: #007aff;
  --primary-dark: #005bb5;
  --secondary: #34c759;
  --accent: #ff9500;
  --bg: #f5f5f7;
  --bg-card: rgba(255, 255, 255, 0.15); /* Original subtle glass */
  --text: #1d1d1f;
  --text-muted: #4b4b52; /* Darkened for better contrast in light mode */
  --border: rgba(255, 255, 255, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.15); /* Original subtle glass */
  --glass-blur: blur(60px) saturate(180%);
  --glass-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 10px 30px rgba(0, 0, 0, 0.05);
  --navbar-height: 70px;
  --radius: 20px;
  --transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme='dark'] {
  --bg: #000000;
  --bg-card: rgba(30, 30, 32, 0.55); /* Vision OS dark glass */
  --text: #f5f5f7; /* Crisp white */
  --text-muted: #86868b;
  --glass-bg: rgba(40, 40, 45, 0.45);
  --border: rgba(255, 255, 255, 0.1);
  --glass-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), inset 0 0 0 1px rgba(255,255,255,0.05), 0 16px 40px rgba(0, 0, 0, 0.5);
}



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

html { 
  scroll-behavior: smooth; 
  background: var(--bg);
}

body {
  font-weight: var(--weight-body, 500);
  font-style: var(--style-body, normal);
  --color-heading: var(--custom-color-heading-light, inherit);
  --color-body: var(--custom-color-body-light, var(--text));
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--color-body);
  font-weight: 500; /* Tng độ dày chữ nhẹ để chống chìm */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  transition: background var(--transition), color var(--transition);
  position: relative;
  overflow-x: hidden;
  z-index: 0;
}

/* Headings Custom Font */
h1, h2, h3, h4, h5, h6, .logo-text, .section-title, .modal-title, .bubble-title, .module-title {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: var(--weight-heading, 700);
  font-style: var(--style-heading, normal);
}

/* Global Text Selection for Liquid Glass */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: inherit;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
::-moz-selection {
  background: rgba(99, 102, 241, 0.3);
  color: inherit;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Global Form Elements for Liquid Glass */
input, select, textarea {
  appearance: none;
  -webkit-appearance: none;
  background: var(--glass-bg) !important;
  border: none !important; /* Use box-shadow for inner borders like Apple */
  color: var(--text) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 1rem;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: var(--glass-shadow);
}
input:focus, select:focus, textarea:focus {
  background: var(--bg-card) !important;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.4), inset 0 1px 2px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}
input::placeholder, textarea::placeholder {
  color: rgba(29, 29, 31, 0.55);
  font-weight: 500;
}
[data-theme='dark'] input::placeholder, [data-theme='dark'] textarea::placeholder {
  color: rgba(245, 245, 247, 0.55);
}

  /* ===== Bảng dữ liệu (Table) ===== */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  }

/* ===== ROLE CHIPS (Global) ===== */
.role-chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.role-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
  user-select: none;
}
.role-chip input[type=radio] { display: none; }
.role-chip:has(input:checked),
.role-chip.selected {
  border-color: var(--primary);
  background: rgba(0,122,255,0.1);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,122,255,0.2), inset 0 1px 1px rgba(255,255,255,0.3);
}
.role-chip:hover:not(:has(input:checked)) {
  border-color: rgba(0,122,255,0.35);
  color: var(--primary);
}
select option {
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
}

/* Liquid Glass animated background */
body::before {
  content: "";
  position: fixed;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 122, 255, 0.4) 0%, transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(255, 45, 85, 0.4) 0%, transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(52, 199, 89, 0.4) 0%, transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(255, 149, 0, 0.4) 0%, transparent 55%),
    /* Thêm các bong bóng khí nổi lên */
    radial-gradient(circle at 40% 10%, rgba(255, 255, 255, 0.8) 0%, transparent 8%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.6) 0%, transparent 12%);
  z-index: -1;
  pointer-events: none;
  animation: liquidBg 15s infinite alternate ease-in-out;
}

@keyframes liquidBg {
  0% { transform: rotate(0deg) scale(1) translate(0px, 0px); }
  50% { transform: rotate(3deg) scale(1.1) translate(15px, -15px); }
  100% { transform: rotate(-3deg) scale(1.2) translate(-15px, 15px); }
}

/* ===== NAVBAR (Bubble Style) ===== */
.navbar {
  position: sticky;
  top: 15px;
  margin: 0 auto 30px auto; /* TÄƒng margin bottom Ä‘á»ƒ cÃ¡ch xa ná»™i dung dÆ°á»›i */
  max-width: 1200px;
  width: calc(100% - 40px); /* TÄƒng khoáº£ng cÃ¡ch hai bÃªn */
  z-index: 1000;
  height: var(--navbar-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  border-radius: 40px; /* Bong bÃ³ng trÃ²n trá»‹a */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
  transition: all var(--transition);
}

/* Logo */
.navbar .nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar .nav-logo .logo-text {
  font-size: 1.35rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* Right side wrapper */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

/* Individual nav items */
.nav-right .nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

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

.nav-right .nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

/* Community link - hidden by default, shown via JS */
.nav-right .nav-link.nav-community {
  display: none;
}

/* Dashboard link - hidden by default, shown via JS */
.nav-right .nav-link.nav-dashboard {
  display: none;
}

/* Auth button: Login/Register */
.btn-auth-login {
  display: none; /* shown by JS */
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  padding: 0.5rem 1.1rem !important;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.btn-auth-login:hover { opacity: 0.88; transform: translateY(-1px); }

/* Logout btn */
.btn-auth-logout {
  display: none; /* shown by JS */
  background: transparent;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  font-size: 0.88rem !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-auth-logout:hover { color: #ef4444 !important; border-color: #ef4444; background: rgba(239,68,68,0.05); }

/* User Avatar */
.nav-avatar {
  display: none; /* shown by JS */
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  transition: background var(--transition);
  text-decoration: none;
}
.nav-avatar:hover { background: rgba(99,102,241,0.08); }

.nav-avatar .avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.nav-avatar .avatar-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--transition);
  border: none;
  background: transparent;
}
.nav-hamburger:hover { background: rgba(99,102,241,0.08); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Sidebar Toggle next to Title */
#desktopSidebarToggle {
  display: flex;
  background: transparent;
  border: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.3s;
}
#desktopSidebarToggle:hover {
  background: rgba(128,128,128,0.2);
}
#desktopSidebarToggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Mobile menu overlay */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  flex-direction: column;
  align-items: flex-end;
  padding: 1rem 1.5rem;
  gap: 0.25rem;
  z-index: 999;
}
.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu .nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  text-align: right;
}
.nav-mobile-menu .nav-link:hover, .nav-mobile-menu .nav-link.active {
  color: var(--primary);
  background: rgba(99,102,241,0.08);
}
.nav-mobile-menu .nav-link.nav-community { display: none; }
.nav-mobile-menu .nav-link.nav-dashboard { display: none; }
.nav-mobile-menu .btn-auth-login { display: none; align-self: flex-end; margin-top: 0.5rem; }
.nav-mobile-menu .btn-auth-logout { display: none; align-self: flex-end; margin-top: 0.25rem; }
.nav-mobile-menu .nav-avatar { display: none; align-self: flex-end; }

/* ===== Breakpoint: show desktop nav >= 1200px ===== */
@media (min-width: 1200px) {
  .nav-hamburger { display: none !important; }
  .nav-right { display: flex !important; }
}

@media (max-width: 1199px) {
  .nav-right { display: none; }
  .nav-hamburger { display: flex; }
}

/* ===== MAIN & CONTENT ===== */
main.main-wrapper {
  flex: 1;
  padding: 2.5rem 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ===== FOOTER (Bubble Style) ===== */
.footer {
  flex-shrink: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  border-radius: 40px;
  color: var(--text);
  padding: 3rem 2rem 1.5rem;
  margin: auto auto 20px auto;
  max-width: 1200px;
  width: calc(100% - 40px);
}

.footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.footer .footer-col h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer .footer-col p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.footer .footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  transition: color var(--transition);
}
.footer .footer-col a:hover { color: var(--primary); }

.footer .footer-bottom {
  max-width: 1200px;
  margin: 1.25rem auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-container {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--navbar-height) - 100px);
  max-width: 1400px;
  margin: 0 auto 3rem auto; /* ThÃªm margin bottom */
  gap: 2rem; /* TÄƒng khoáº£ng cÃ¡ch giá»¯a sidebar vÃ  main */
  padding: 0 20px;
  width: 100%;
}

.dashboard-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  position: fixed;
  top: calc(var(--navbar-height) + 30px);
  left: -300px; /* áº¨n ngoÃ i cÃ¹ng bÃªn trÃ¡i */
  z-index: 999;
  height: max-content;
  max-height: calc(100vh - var(--navbar-height) - 50px);
  overflow-y: auto;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0;
  visibility: hidden;
}

.dashboard-sidebar.open {
  left: 15px;
  opacity: 1;
  visibility: visible;
}

.dashboard-sidebar.peek {
  left: -220px !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: 10px 0 20px rgba(0,0,0,0.1) !important;
}

/* áº¨n cÃ¡c CSS @media cÅ© cá»§a sidebar */
@media (min-width: 992px) {
  /* Xóa hiệu ứng hover ci, dùng click class .open */
}

.dashboard-sidebar h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
}

.dashboard-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}
.dashboard-sidebar a:hover { background: rgba(99,102,241,0.08); color: var(--primary); }
.dashboard-sidebar a.active { background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(16,185,129,0.1)); color: var(--primary); font-weight: 600; }

.dashboard-main {
  flex: 1;
  padding: 2rem;
  min-width: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  height: fit-content;
}

/* Äáº£m báº£o Font vÃ  Component co dÃ£n tá»± Ä‘á»™ng theo mÃ n hÃ¬nh */
html {
  font-size: clamp(14px, 1vw + 10px, 16px);
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

@media (max-width: 991px) {
  .dashboard-container {
    flex-direction: column;
  }
  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: -300px !important;
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    opacity: 1;
    visibility: visible;
    display: block;
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--border);
    z-index: 10000;
    transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }
  .dashboard-sidebar.open {
    left: 0 !important;
  }
  .dashboard-main {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ===== HERO SECTION ===== */
.hero {
  text-align: center;
  padding: 4rem 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.15;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.hero .hero-cta:hover { opacity: 0.88; transform: translateY(-2px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .dashboard-container { flex-direction: column; }
  .dashboard-main { padding: 1.5rem 1rem; }
}

@media (max-width: 600px) {
  .navbar { padding: 0 1rem; }
  main.main-wrapper { padding: 1.5rem 1rem; }
  .footer { padding: 2rem 1rem 1rem; }
}

/* ===== UTILITY ===== */
h1, h2, h3, h4, h5, h6 { line-height: 1.35; margin-bottom: 0.5em; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* ===== GLOBAL MODAL OVERLAY ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  animation: overlayFadeIn 0.3s ease-out;
}
@keyframes overlayFadeIn {
  from { background: rgba(0,0,0,0); backdrop-filter: blur(0px); }
  to { background: rgba(0,0,0,0.65); backdrop-filter: blur(15px); }
}
.modal-overlay.active { display: flex; }

.modal-panel {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.65), 0 20px 60px rgba(0,0,0,0.12);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  margin: auto;
  overflow-y: auto;
  animation: modalIn 0.35s cubic-bezier(0.25, 1, 0.5, 1) both;
}
@keyframes modalIn {
  0% { opacity: 0; transform: scale(0.85) translateY(30px) rotateX(10deg); }
  60% { opacity: 1; transform: scale(1.02) translateY(-5px) rotateX(-2deg); }
  100% { opacity: 1; transform: scale(1) translateY(0) rotateX(0); }
}

[data-theme='dark'] .modal-panel {
  background: rgba(30, 30, 36, 0.7);
  border-color: rgba(255,255,255,0.08);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 1.5rem 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ===== GLOBAL BUTTON SYSTEM ===== */

/* Primary â€” Apple Blue gradient */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(0,122,255,0.35), inset 0 1px 1px rgba(255,255,255,0.25);
  transition: all var(--transition);
}
.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,122,255,0.45); }
.btn-primary:active { transform: translateY(0); }

/* Secondary (Neutral) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #e2e8f0;
  color: #475569;
  border: none;
  border-radius: 20px;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: all var(--transition);
}
.btn-secondary:hover  { background: #cbd5e1; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); color: #0f172a; }
.btn-secondary:active { transform: translateY(0); }

/* Ghost â€” Glass */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  border-radius: 20px;
  padding: 0.65rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.btn-ghost:hover { background: rgba(255,255,255,0.35); transform: translateY(-1px); }

/* Danger */
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #ff3b30, #c0392b);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.65rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(255,59,48,0.35);
  transition: all var(--transition);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(255,59,48,0.45); }

/* Small size variants */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  border-radius: 12px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.btn-sm-primary  { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color:#fff; box-shadow: 0 2px 8px rgba(0,122,255,0.3); }
.btn-sm-primary:hover  { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,122,255,0.45); }
.btn-sm-secondary { background: linear-gradient(135deg, var(--secondary), #28a745); color:#fff; box-shadow: 0 2px 8px rgba(52,199,89,0.3); }
.btn-sm-secondary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(52,199,89,0.45); }
.btn-sm-danger   { background: linear-gradient(135deg, #ff3b30, #c0392b); color:#fff; box-shadow: 0 2px 8px rgba(255,59,48,0.3); }
.btn-sm-danger:hover   { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,59,48,0.45); }
.btn-sm-ghost    { background: var(--glass-bg); border: 1px solid var(--border); color: var(--text); }
.btn-sm-ghost:hover { background: rgba(255,255,255,0.35); }

/* ===== GLOBAL BADGE / PILL ===== */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 0.22rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.badge-blue    { background: rgba(0,122,255,0.12);  color: var(--primary);  border: 1px solid rgba(0,122,255,0.2); }
.badge-green   { background: rgba(52,199,89,0.12);  color: var(--secondary); border: 1px solid rgba(52,199,89,0.25); }
.badge-orange  { background: rgba(255,149,0,0.12);  color: var(--accent);   border: 1px solid rgba(255,149,0,0.25); }
.badge-red     { background: rgba(255,59,48,0.12);  color: #ff3b30;         border: 1px solid rgba(255,59,48,0.25); }
.badge-gray    { background: rgba(134,134,139,0.1); color: var(--text-muted); border: 1px solid rgba(134,134,139,0.2); }

/* ===== GLOBAL FORM GROUPS ===== */
.form-group { margin-bottom: 1.25rem; width: 100%; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  display: block;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.req { color: #ff3b30; font-size: 0.8rem; margin-left: 2px; }

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow), 0 12px 30px rgba(0,0,0,0.08);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== DIVIDER LABEL ===== */
.divider-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1rem 0;
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Hide scrollbar globally based on user request */
* { 
  scrollbar-width: none; 
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
}



/* Focus States for Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== RESPONSIVE TWEAKS FOR ALL PAGES ===== */
@media (max-width: 768px) {
  .modal-form-row { flex-direction: column !important; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .page-header-right { width: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
  .page-header-right input { width: 100% !important; }
  .page-header-right select { width: 100% !important; }
  .btn-primary-action { width: 100%; justify-content: center; }
  .data-table th, .data-table td { padding: 0.5rem; font-size: 0.85rem; }
  .custom-modal-box { width: 95%; padding: 1.5rem; }
  .dashboard-sidebar { width: 250px; left: -250px !important; }
  .dashboard-sidebar.active { left: 0 !important; }
  .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .code-gen-row { flex-direction: column !important; }
  .conditions-block { flex-direction: column !important; }
}
@media (max-width: 480px) {
  h1, .page-title { font-size: 1.5rem; }
  .btn, .btn-sm { width: 100%; text-align: center; margin-bottom: 5px; }
  .form-group input, .form-group select { font-size: 16px; /* prevent iOS zoom */ }
  .nav-avatar-wrapper { position: static; }
  .nav-dropdown-content { width: 100%; left: 0; box-shadow: none; border-radius: 0; }
}


@media (max-width: 768px) {
  .modal-panel { padding: 1.2rem !important; max-height: 90vh !important; overflow-y: auto !important; width: 100% !important; margin: auto; }
  .modal-form { gap: 0.8rem !important; }
  .modal-title { font-size: 1.2rem !important; }
  .code-gen-row button { width: 100% !important; }
}


@media (max-width: 768px) {
  .modal-form-row { flex-direction: column !important; }
  .modal-form-row > * { width: 100% !important; }
}


@media (max-width: 768px) {
  .modal-footer { flex-direction: column-reverse !important; align-items: stretch !important; }
  .modal-footer button { width: 100% !important; margin: 0 !important; }
  .code-gen-row input { width: 100% !important; }
}

/* ===== SLEEK APPLE GLASSMORPHISM THEME SWITCHER BUTTON ===== */
.btn-theme-toggle {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all var(--transition);
  outline: none;
  padding: 0;
  flex-shrink: 0;
}

.btn-theme-toggle:hover {
  background: var(--bg-card);
  transform: scale(1.05) rotate(15deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-theme-toggle:active {
  transform: scale(0.95);
}

.btn-theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Mobile alignment for Right controls */
.nav-mobile-right {
  display: none;
}

@media (max-width: 1199px) {
  .nav-mobile-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
}

/* --- Toast Notifications --- */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--glass-bg, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-color);
  padding: 16px 24px;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 20px rgba(0, 122, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  max-width: 400px;
  animation: toastSlideInBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: relative;
  overflow: hidden;
  border-left: 5px solid var(--primary-color);
  border: 1px solid rgba(255,255,255,0.4);
  border-left: 5px solid var(--primary-color);
  z-index: 10000;
}
.toast.error {
  border-left-color: #ef4444;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 20px rgba(239, 68, 68, 0.3);
}
.toast.success {
  border-left-color: #10b981;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 20px rgba(16, 185, 129, 0.3);
}
.toast-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.toast-msg {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}
.toast-close {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: color 0.2s;
}
.toast-close:hover {
  color: var(--text-color);
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary-color);
  width: 100%;
  animation: toastProgress 3s linear forwards;
}
.toast.error .toast-progress {
  background: #ef4444;
}
.toast.success .toast-progress {
  background: #10b981;
}
@keyframes toastSlideInBounce {
  0% { transform: translateX(100%); opacity: 0; }
  60% { transform: translateX(-15px); opacity: 1; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}
@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}
/* --- Omnibar Search (Ctrl+K) --- */
#omnibar-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#omnibar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.omnibar-container {
  background: var(--bg-card);
  width: 90%;
  max-width: 600px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}
#omnibar-overlay.active .omnibar-container {
  transform: translateY(0);
}
.omnibar-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}
.omnibar-header i {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-right: 10px;
}
#omnibar-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: var(--text-color);
  outline: none;
}
.omnibar-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-color);
  padding: 2px 6px;
  border-radius: 4px;
}
.omnibar-results {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px 0;
}
.omnibar-result-item {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.omnibar-result-item:hover {
  background: var(--bg-color);
}
.omnibar-result-item.selected {
  background: var(--primary-color);
  color: #fff;
}
.omnibar-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}
.omnibar-result-item.selected .omnibar-result-icon {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.omnibar-result-title {
  font-weight: 600;
  margin-bottom: 3px;
}
.omnibar-result-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.omnibar-result-item.selected .omnibar-result-subtitle {
  color: rgba(255,255,255,0.8);
}

/* --- Chá»©c nÄƒng 8: Focus Mode --- */
body.focus-mode .sidebar,
body.focus-mode header.navbar,
body.focus-mode .nav-mobile-right {
  display: none !important;
}
body.focus-mode .main-content {
  margin-left: 0 !important;
  padding-top: 20px !important;
  max-width: 1200px;
  margin: 0 auto !important;
}
.focus-toggle-btn {
  position: fixed;
  bottom: 25px;
  right: 95px;
  background: linear-gradient(135deg, var(--primary-color), #0ea5e9);
  color: #fff;
  border: none;
  border-radius: 30px; /* Make it a pill shape instead of just a circle */
  padding: 0 20px;
  height: 50px;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 4px 15px rgba(0,122,255,0.4), 0 0 0 4px rgba(0,122,255,0.1);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulseFocus 2s infinite;
}
@keyframes pulseFocus {
  0% { box-shadow: 0 0 0 0 rgba(0,122,255,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0,122,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,122,255,0); }
}
.focus-toggle-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0,122,255,0.6);
}

/* Skeleton Loading */
.skeleton-box { background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.5) 50%, var(--border) 75%); background-size: 200% 100%; animation: skeletonLoading 1.5s infinite; border-radius: 8px; }
@keyframes skeletonLoading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-item { display:flex; align-items:center; gap:1.2rem; padding:1.2rem; background:var(--glass-bg); border-radius:12px; border:1px solid var(--border); margin-bottom:1rem; }
.skeleton-icon { width:40px; height:40px; border-radius:50%; }
.skeleton-details { flex:1; }
.skeleton-line { height:15px; margin-bottom:8px; width:70%; }
.skeleton-line.short { width:40%; }
.skeleton-btn { width:100px; height:35px; border-radius:20px; }



 / *   U I / U X   E n h a n c e m e n t s   * / 
 . e m p t y - s t a t e   {   t e x t - a l i g n :   c e n t e r ;   p a d d i n g :   3 r e m   1 r e m ;   c o l o r :   v a r ( - - t e x t - m u t e d ) ;   } 
 . e m p t y - s t a t e - i c o n   {   f o n t - s i z e :   4 r e m ;   m a r g i n - b o t t o m :   1 r e m ;   o p a c i t y :   0 . 5 ;   f i l t e r :   g r a y s c a l e ( 1 0 0 % ) ;   } 
 . e m p t y - s t a t e - t i t l e   {   f o n t - s i z e :   1 . 2 r e m ;   f o n t - w e i g h t :   b o l d ;   m a r g i n - b o t t o m :   0 . 5 r e m ;   c o l o r :   v a r ( - - t e x t ) ;   } 
 . b t n - l o a d i n g   {   p o s i t i o n :   r e l a t i v e ;   c o l o r :   t r a n s p a r e n t   ! i m p o r t a n t ;   p o i n t e r - e v e n t s :   n o n e ;   } 
 . b t n - l o a d i n g : : a f t e r   {   c o n t e n t :   ' ' ;   p o s i t i o n :   a b s o l u t e ;   l e f t :   5 0 % ;   t o p :   5 0 % ;   t r a n s f o r m :   t r a n s l a t e ( - 5 0 % ,   - 5 0 % ) ;   w i d t h :   2 0 p x ;   h e i g h t :   2 0 p x ;   b o r d e r :   3 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ;   b o r d e r - t o p - c o l o r :   # f f f ;   b o r d e r - r a d i u s :   5 0 % ;   a n i m a t i o n :   s p i n   1 s   i n f i n i t e   l i n e a r ;   } 
 @ k e y f r a m e s   s p i n   {   t o   {   t r a n s f o r m :   t r a n s l a t e ( - 5 0 % ,   - 5 0 % )   r o t a t e ( 3 6 0 d e g ) ;   }   } 
  
 
/* Custom Color Picker Styling */
input[type="color"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  border: none;
  cursor: pointer;
  width: 50px !important;
  height: 45px !important;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
}
input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
}

/* Custom Glass Dropdown */
.custom-select-wrapper {
  position: relative;
  flex: 1;
  user-select: none;
  height: 100%;
}
.custom-select-display {
  padding: 0 1.2rem;
  height: 100%;
  box-sizing: border-box;
  border-radius: 100px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}
.custom-select-display:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
}
.custom-select-display::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.3s;
}
.custom-select-wrapper.open .custom-select-display::after {
  transform: rotate(180deg);
}
.custom-select-options {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 250px;
  overflow-y: auto;
}
.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.custom-option {
  padding: 0.8rem 1.2rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, padding-left 0.2s;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.custom-option:last-child {
  border-bottom: none;
}
.custom-option:hover {
  background: var(--primary);
  color: #fff;
  padding-left: 1.5rem;
}

/* Responsive Settings Rows */
.responsive-row {
  display: grid;
  grid-template-columns: minmax(140px, 2.5fr) minmax(100px, 1.5fr) minmax(100px, 1.5fr) 50px;
  gap: 0.5rem;
  align-items: stretch;
}
.responsive-row .custom-select-wrapper {
  min-width: 0;
  flex: none; /* override old flex rules if they linger */
}
.responsive-row input[type="color"] {
  width: 50px !important;
  flex: none;
}

@media (max-width: 600px) {
  .responsive-row {
    grid-template-columns: 1.5fr 1fr;
    gap: 0.8rem;
  }
  .responsive-row input[type="color"] {
    width: 100% !important;
  }
}

/* Settings Columns */
.settings-col {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.settings-col label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.settings-col.font-col { flex: 2 1 180px; }
.settings-col.prop-col { flex: 1 1 100px; }
.settings-col.color-col { flex: 0 0 50px; }

p { margin-bottom: 1em; }

.responsive-row input[type="color"] { height: 100% !important; box-sizing: border-box; min-height: 45px; }

.responsive-row input[type="color"] { border-radius: 100px !important; }


/* Sidebar scroll */
.dashboard-sidebar {
    overflow-y: auto !important;
    max-height: 55vh !important; /* Giới hạn chiều cao cho máy tính */
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 991px) {
    .dashboard-sidebar {
        height: 100vh !important;
        max-height: 100vh !important;
        bottom: 0 !important;
    }
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
    display: block !important;
}
.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: rgba(128,128,128,0.4);
    border-radius: 10px;
}
