/* ==========================================================================
   LispCAD - Design System & Stylesheet (Modern Engineering Theme)
   Tác giả: Nhất Nguyễn (thietketudien.vn) | Hotline/Zalo: 0976018272
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Dark Mode Palette (Default) */
  --bg-body: #0b0f17;
  --bg-surface: #111726;
  --bg-surface-alt: #182238;
  --bg-card: #131b2e;
  --bg-card-hover: #1c2742;
  --border-color: #233150;
  --border-focus: #3b82f6;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

button, input, select, textarea {
  font-family: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}
[data-theme="light"] .navbar {
  background-color: rgba(255, 255, 255, 0.88);
}

.navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-main);
}

/* Dropdown Navigation */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

.dropdown-toggle .arrow-down {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.dropdown:hover .dropdown-toggle .arrow-down {
  transform: rotate(180deg);
}

.dropdown:hover .dropdown-toggle {
  color: var(--accent-cyan);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 190px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  padding: 8px 0;
  margin-top: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 10px;
}

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

.dropdown-menu li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-menu li a {
  display: block;
  padding: 9px 18px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background: var(--bg-surface-alt);
  color: var(--accent-cyan);
  padding-left: 22px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-theme-toggle {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.btn-theme-toggle:hover {
  border-color: var(--accent-cyan);
}

.btn-admin {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-admin:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
}

/* Hero Section */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 250px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(6, 182, 212, 0.1) 50%, transparent 70%);
  filter: blur(50px);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.8px;
}

.hero-title span {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  line-height: 1.6;
}

/* Search Bar */
.search-wrapper {
  max-width: 620px;
  margin: 0 auto 30px;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px 8px 6px 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.search-box:focus-within {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.search-icon {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
}
.search-input::placeholder {
  color: var(--text-dim);
}

.search-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Category Filters */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover {
  background: var(--bg-surface-alt);
  color: var(--text-main);
  border-color: var(--border-focus);
}
.filter-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

/* App Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

/* Pagination Controls */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  text-decoration: none;
}

.page-btn:hover:not(:disabled):not(.disabled):not(.active) {
  background: var(--bg-surface-alt);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.page-btn.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #0b0f17;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.page-btn:disabled,
.page-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.page-dots {
  padding: 0 6px;
  color: var(--text-dim);
  font-weight: 700;
  user-select: none;
}

/* Video-First Application Card (Theo đúng mẫu thiết kế của bạn) */
.video-app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.video-app-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(6, 182, 212, 0.2);
}

.video-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.video-app-card:hover .video-thumb-img {
  transform: scale(1.05);
}

/* Nút Play YouTube đỏ (Ẩn để thumbnail sạch sẽ) */
.yt-play-button {
  display: none !important;
}

.video-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.4px;
  z-index: 2;
}

.video-card-body {
  padding: 22px 18px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.video-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-main);
  transition: color 0.2s;
}

.video-app-card:hover .video-card-title {
  color: var(--accent-cyan);
}

.video-card-author {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

.video-card-shortcuts {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.video-card-shortcuts b {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.app-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--bg-card-hover);
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.cmd-badge {
  font-family: var(--font-mono);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: var(--accent-cyan);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-free {
  background: #10b981;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.badge-pro {
  background: #d97706;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.app-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-main);
}
.app-title:hover {
  color: var(--accent-cyan);
}

.app-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  margin-bottom: 18px;
}
.app-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-cyan);
}
.app-price.free {
  color: var(--accent-green);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-secondary:hover {
  background: var(--border-color);
}

.btn-primary {
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   PRODUCT DETAIL VIEW - EXACT USER FORMAT SPECIFICATION (.shop, .pInfo, .pMart)
   ========================================================================== */

.product-detail-container {
  max-width: 900px;
  margin: 30px auto 60px;
}

.detail-header-block {
  margin-bottom: 24px;
}

.detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}

/* User's Exact Classes */
span.prices {
  display: none; /* Internal marker */
}

.shop {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.pPric {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.pPric::before {
  content: attr(data-text);
  font-weight: 600;
  color: var(--text-main);
}
.pPric i.price {
  font-style: normal;
  font-size: 1.8rem;
  font-weight: 800;
  color: #009688;
}

.pInfo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.pInfo div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pInfo small {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.pInfo span {
  font-size: 0.98rem;
  color: var(--text-main);
  font-weight: 600;
}

.pMart {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pMart small {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.pMart a {
  height: 42px;
  border-width: 1px;
  border-style: solid;
  transition: var(--transition);
}
.pMart a:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

/* Tabs: Mô tả & Hướng dẫn */
.tab-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.tbHd {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-alt);
}

.tbHd label {
  padding: 16px 24px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tbHd label::before {
  content: attr(data-text);
}

.tbCn {
  padding: 30px;
  font-size: 1rem;
  line-height: 1.7;
}

.tbCn p {
  margin-bottom: 16px;
}

.tbCn ul.step {
  list-style-type: none;
  counter-reset: step-counter;
  padding-left: 0;
  margin: 16px 0 24px;
}

.tbCn ul.step li {
  position: relative;
  counter-increment: step-counter;
  padding-left: 38px;
  margin-bottom: 14px;
}
.tbCn ul.step li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  background: var(--accent-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.tbCn code {
  font-family: var(--font-mono);
  background: var(--bg-surface-alt);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-size: 0.9em;
}

/* Video Showcase Frame */
.video-frame-box {
  margin: 20px 0 30px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #000;
  box-shadow: var(--shadow-md);
}

/* Image Showcase Frame - Viền bo ôm sát ảnh sắc nét, không vỡ hình */
.image-showcase-box {
  margin: 20px 0 30px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.image-showcase-box img {
  max-width: 100%;
  height: auto;
  max-height: 540px;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  background: var(--bg-surface);
}

.responsive-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}
.responsive-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   ADMIN PANEL STYLES - TRỰC QUAN & DỄ NHẬP LIỆU
   ========================================================================== */

.admin-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  margin-bottom: 30px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  margin-bottom: 60px;
}

.admin-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.admin-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-cyan);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}
.form-label span.req {
  color: var(--accent-red);
}

.form-control {
  width: 100%;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* Category Chips & Delete Button */
.category-chip {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
}
.category-chip:hover {
  border-color: var(--border-focus);
}

.btn-del-cat {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--accent-red);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  padding: 0;
  transition: var(--transition);
}
.btn-del-cat:hover {
  background: var(--accent-red);
  color: #fff;
  transform: scale(1.15);
}

/* Admin Data Table */
.data-table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-surface-alt);
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--bg-surface-alt);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 25px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

/* ==========================================================================
   BOOKMARK (ĐÁNH DẤU LƯU TRỮ CÔNG CỤ YÊU THÍCH)
   ========================================================================== */

/* Nút Bookmark trên thanh điều hướng Navbar */
.btn-bookmark-toggle {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  padding: 0;
}
.btn-bookmark-toggle:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.nav-bookmark-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  background: var(--accent-cyan);
  color: #0b0f19;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: var(--radius-full);
  padding: 0 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Nút Bookmark ở góc trên bên TRÁI trên từng Thẻ Card (Trang Chủ) */
.btn-card-bookmark {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}
.btn-card-bookmark:hover {
  background: rgba(11, 15, 25, 0.95);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: scale(1.1);
}
.btn-card-bookmark.active {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.btn-card-bookmark.active svg {
  fill: var(--accent-cyan);
  stroke: var(--accent-cyan);
}

/* Nút Bookmark trong trang Chi Tiết Sản Phẩm */
.btn-detail-bookmark {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 0 15px;
  border-radius: 8px;
  height: 40px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.92rem;
  border-width: 1px;
  border-style: solid;
}
.btn-detail-bookmark:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
}
.btn-detail-bookmark.active {
  background: var(--accent-cyan);
  color: #0b0f19;
  border-color: var(--accent-cyan);
}
.btn-detail-bookmark.active svg {
  fill: #0b0f19;
}

/* Hộp thoại Popup Bookmark Modal */
.bookmark-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 68px 24px 24px;
}
.bookmark-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.bookmark-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: bookmarkSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bookmarkSlideDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bookmark-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-alt);
}
.bookmark-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}
.btn-close-bookmark {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.btn-close-bookmark:hover {
  color: var(--text-main);
}
.bookmark-modal-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 0;
}
.bookmark-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
  transition: background 0.15s;
}
.bookmark-item:last-child {
  border-bottom: none;
}
.bookmark-item:hover {
  background: var(--bg-surface-alt);
}
.bookmark-item-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bookmark-item-link:hover {
  color: var(--accent-cyan);
}
.btn-remove-bm {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.btn-remove-bm:hover {
  color: #ef4444;
}
.bookmark-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.bookmark-modal-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface-alt);
  display: flex;
  justify-content: flex-end;
}
.btn-clear-bookmarks {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 6px;
}
.btn-clear-bookmarks:hover {
  color: #ef4444;
  text-decoration: underline;
}

