/* ==========================================================================
   AACAST PRO - MODERN AUTOMOTIVE DESIGN SYSTEM & APPLICATION STYLES
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Primary Brand & Automotive Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.28);

  --accent: #06b6d4;
  --accent-hover: #0891b2;
  --accent-light: #ecfeff;
  --accent-glow: rgba(6, 182, 212, 0.25);

  --cyan-bright: #38bdf8;

  /* Dark Automotive Surfaces */
  --bg-dark-root: #070b12;
  --bg-dark-card: #0e1524;
  --bg-dark-surface: #141f33;
  --bg-dark-subtle: #1c2a45;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-dark-hover: rgba(56, 189, 248, 0.35);

  /* Light Neutrals & Surfaces (Admin / Docs) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #f8fafc;

  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #93c5fd;

  /* Status Colors */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --success-border: #a7f3d0;

  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --warning-border: #fde68a;

  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --danger-border: #fecaca;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 24px var(--primary-glow);
  --shadow-dark-card: 0 16px 36px rgba(0, 0, 0, 0.45);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--primary-hover);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

p {
  color: var(--text-muted);
}

code, pre {
  font-family: var(--font-mono);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.68rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: #ffffff !important;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #ffffff !important;
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-subtle);
  color: var(--text-main);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

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

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.btn-danger:hover {
  background: #fee2e2;
  color: #7f1d1d;
}

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

.btn-success:hover {
  background: #059669;
  color: #ffffff;
}

.btn-cyan {
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #ffffff !important;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-cyan:hover {
  background: linear-gradient(135deg, #0891b2, #0369a1);
  box-shadow: 0 4px 18px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.42rem 0.8rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   FORM INPUTS & CONTROLS
   ========================================================================== */

.form-group {
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="month"],
input[type="number"],
input[type="file"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  outline: none;
}

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

/* Month picker: giữ lịch chọn tháng nhưng luôn hiển thị số MM/YYYY */
.month-field {
  position: relative;
  display: inline-block;
}

.month-field > input[type="month"] {
  color: transparent;
}

.month-field-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  pointer-events: none;
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Password show/hide toggle */
.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.password-toggle:hover {
  background: rgba(148, 163, 184, 0.18);
  color: var(--primary);
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

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

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-neutral {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-bright);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */

.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #f8fafc;
}

/* ==========================================================================
   DATATABLES (admin/users)
   ========================================================================== */

.dt-container .dt-length,
.dt-container .dt-info {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dt-container .dt-length label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  white-space: nowrap;
}

.dt-container .dt-length select {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.85rem;
}

.dt-container .dt-paging .dt-paging-button {
  min-width: 34px;
  padding: 0.35rem 0.6rem;
  margin-left: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main) !important;
  font-size: 0.85rem;
  box-shadow: none;
}

.dt-container .dt-paging .dt-paging-button:hover:not(.disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary) !important;
}

.dt-container .dt-paging .dt-paging-button.current {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #fff !important;
}

.dt-container .dt-paging .dt-paging-button.disabled {
  color: var(--text-subtle) !important;
  border-color: var(--border-subtle);
}

/* ==========================================================================
   CARD SYSTEM
   ========================================================================== */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

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

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* ==========================================================================
   ALERTS
   ========================================================================== */

.alert {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.alert-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

/* ==========================================================================
   PUBLIC LANDING PAGE (AUTOMOTIVE TECH PORTAL)
   ========================================================================== */

.public-body {
  background: var(--bg-dark-root);
  color: #f1f5f9;
  overflow-x: hidden;
  position: relative;
}

/* Background Ambient Glows */
.public-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 480px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.24) 0%, rgba(6, 182, 212, 0.12) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

.public-glow-subtle {
  position: absolute;
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(90px);
  z-index: 0;
}

/* Public Header & Sticky Navigation */
.public-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-link:hover {
  color: #ffffff;
}

/* AACast Pro App Logo Style */
.app-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 60%, #06b6d4 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  transition: var(--transition);
}

.app-logo-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.app-logo-icon-lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 1.5rem;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 0 35px rgba(6, 182, 212, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Single brand logo asset (public/assets/aacast-logo.png) */
.app-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: inherit;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 60%, #06b6d4 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-item {
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:hover {
  color: #ffffff;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle-btn svg {
  pointer-events: none;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--cyan-bright);
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 2px;
}

.theme-icon-sun {
  display: block;
}

.theme-icon-moon {
  display: none;
}

/* Light mode: hide sun, show moon on blog pages */
.blog-page[data-theme="light"] .theme-icon-sun,
body.blog-page[data-theme="light"] .theme-icon-sun {
  display: none !important;
}

.blog-page[data-theme="light"] .theme-icon-moon,
body.blog-page[data-theme="light"] .theme-icon-moon {
  display: block !important;
}

/* Dark mode: show sun, hide moon on blog pages */
.blog-page[data-theme="dark"] .theme-icon-sun,
body.blog-page[data-theme="dark"] .theme-icon-sun {
  display: block !important;
}

.blog-page[data-theme="dark"] .theme-icon-moon,
body.blog-page[data-theme="dark"] .theme-icon-moon {
  display: none !important;
}

.drawer-theme-row {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.drawer-theme-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
}

/* Mobile Slide-in Drawer */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: #0c121e;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
  z-index: 99;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-drawer-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.drawer-nav-item:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.15);
}

.drawer-footer {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ==========================================================================
   HOMEPAGE HERO SECTION
   ========================================================================== */

.hero-section {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3.5rem;
  z-index: 1;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.95rem 0.35rem 0.45rem;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-full);
  color: var(--cyan-bright);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.14);
}

.app-logo-icon-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.hero-brand-title {
  margin-bottom: 1.25rem;
}

.hero-brand-name {
  font-size: clamp(3.8rem, 7.2vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
  display: block;
  background: linear-gradient(135deg, #ffffff 15%, #38bdf8 65%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 0 35px rgba(56, 189, 248, 0.28));
}

.hero-brand-tagline {
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
  display: block;
  letter-spacing: -0.015em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 2.25rem;
  max-width: 540px;
}

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

/* 4 Confirmed Capability Badges (Replacing all unconfirmed marketing claims) */
.hero-confirmed-badges {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-confirmed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: rgba(14, 21, 36, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.hero-confirmed-badge:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.hero-confirmed-badge svg {
  color: var(--cyan-bright);
  flex-shrink: 0;
}

/* Seamless Automotive Cockpit Stage (Expanded, completely dissolved into dark background) */
.hero-blend-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-blend-glow {
  position: absolute;
  top: 48%;
  left: 54%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle at 60% 48%, rgba(6, 182, 212, 0.28) 0%, rgba(37, 99, 235, 0.15) 45%, transparent 70%);
  filter: blur(95px);
  pointer-events: none;
  z-index: 0;
}

.hero-blend-media {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: visible;
  z-index: 1;
  border: none;
  background: transparent;
  box-shadow: none;
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at 55% 50%, black 50%, transparent 98%);
  mask-image: radial-gradient(ellipse 92% 88% at 55% 50%, black 50%, transparent 98%);
}

.hero-screen-glow {
  position: absolute;
  top: 48%;
  left: 54%;
  width: 52%;
  height: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.28) 0%, rgba(6, 182, 212, 0.14) 45%, transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
  filter: blur(18px);
}

.hero-blend-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transform: scale(1.08);
  filter: contrast(1.08) brightness(1.04);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-blend-stage:hover .hero-blend-media img {
  transform: scale(1.11);
}

/* Multi-edge gradient overlay seamlessly melting into #070b12 background with focused screen illumination */
.hero-blend-overlay {
  position: absolute;
  inset: -2px;
  background: 
    radial-gradient(ellipse 40% 30% at 54% 48%, rgba(56, 189, 248, 0.2) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 80%),
    linear-gradient(to right, #070b12 0%, rgba(7, 11, 18, 0.92) 12%, rgba(7, 11, 18, 0.35) 28%, transparent 55%),
    linear-gradient(to top, #070b12 0%, rgba(7, 11, 18, 0.92) 10%, rgba(7, 11, 18, 0.25) 25%, transparent 45%),
    linear-gradient(to bottom, rgba(7, 11, 18, 0.88) 0%, rgba(7, 11, 18, 0.25) 15%, transparent 35%),
    linear-gradient(to left, #070b12 0%, rgba(7, 11, 18, 0.82) 8%, rgba(7, 11, 18, 0.2) 20%, transparent 38%),
    radial-gradient(ellipse at 56% 48%, transparent 30%, rgba(7, 11, 18, 0.6) 70%, #070b12 100%);
  pointer-events: none;
  z-index: 3;
}

.photo-placeholder-box {
  padding: 2.5rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: #94a3b8;
}

.photo-placeholder-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-bright);
  margin-bottom: 0.25rem;
}

.photo-placeholder-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
}

.photo-placeholder-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  max-width: 380px;
  line-height: 1.5;
}

/* ==========================================================================
   REAL PRODUCT GALLERY (CAROUSEL / SLIDER)
   ========================================================================== */

.gallery-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  color: var(--cyan-bright);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  color: #ffffff;
  font-size: clamp(1.9rem, 3.2vw, 2.4rem);
  font-weight: 800;
}

.product-carousel {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #090e18;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-dark-card);
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.slide-media-box {
  width: 100%;
  max-width: 680px;
  aspect-ratio: 16 / 9;
  background: #040811;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.slide-title {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.slide-subtitle {
  color: #94a3b8;
  font-size: 0.92rem;
  max-width: 500px;
}

.carousel-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 21, 36, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: rgba(37, 99, 235, 0.9);
  border-color: #38bdf8;
  transform: translateY(-50%) scale(1.08);
}

.carousel-btn.prev {
  left: 1.25rem;
}

.carousel-btn.next {
  right: 1.25rem;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem 0 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.carousel-dot.active {
  width: 28px;
  border-radius: var(--radius-full);
  background: var(--cyan-bright);
  box-shadow: 0 0 10px var(--cyan-bright);
}

/* ==========================================================================
   FEATURE STRIP (COMPACT HORIZONTAL BAR)
   ========================================================================== */

.feature-strip-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.feature-strip-container {
  background: rgba(14, 21, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.feature-strip-header {
  text-align: center;
  margin-bottom: 2rem;
}

.feature-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-strip-card {
  background: rgba(10, 16, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
}

.feature-strip-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.feature-strip-card.highlight-card {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, rgba(10, 16, 28, 0.8) 100%);
}

.feature-strip-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-strip-icon-box.yt-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

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

.feature-strip-icon-box.split-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.feature-strip-icon-box.web-icon {
  background: rgba(37, 99, 235, 0.15);
  color: var(--cyan-bright);
}

.feature-strip-text h3 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.feature-strip-text p {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

/* ==========================================================================
   HOMEPAGE — LATEST ARTICLES SECTION (#articles)
   ========================================================================== */

.latest-articles-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4.5rem;
}

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

.article-card {
  background: rgba(14, 21, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.article-card-thumb {
  aspect-ratio: 16 / 9;
  background: #111a2d;
  position: relative;
  overflow: hidden;
}

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

.article-card:hover .article-card-thumb img {
  transform: scale(1.04);
}

.article-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0e172a, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.article-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.article-card-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.article-card-excerpt {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-link {
  color: var(--cyan-bright);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
}

.article-card-link:hover {
  color: #ffffff;
}

.public-empty-box {
  background: rgba(14, 21, 36, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  color: #94a3b8;
  max-width: 800px;
  margin: 0 auto;
}

.public-empty-box svg {
  margin: 0 auto 1.25rem;
  color: var(--cyan-bright);
}

/* ==========================================================================
   HOMEPAGE CONTACT SECTION (#contact)
   ========================================================================== */

.contact-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.contact-card {
  background: linear-gradient(135deg, rgba(14, 21, 36, 0.95), rgba(8, 14, 26, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 99, 235, 0.15);
}

.contact-card h2 {
  color: #ffffff;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact-card p {
  color: #94a3b8;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.contact-cta-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   FLOATING FACEBOOK BUTTON
   ========================================================================== */

.floating-fb-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #1877f2;
  color: #ffffff !important;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.45);
  font-weight: 700;
  font-size: 0.92rem;
  transition: var(--transition);
  text-decoration: none;
}

.floating-fb-btn:hover {
  background: #166fe5;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(24, 119, 242, 0.6);
}

.floating-fb-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   PUBLIC FOOTER
   ========================================================================== */

.public-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #04070d;
  padding: 3.5rem 1.5rem 2.5rem;
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-brand strong {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
}

.footer-brand p {
  font-size: 0.85rem;
  color: #64748b;
  max-width: 450px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--cyan-bright);
}

/* ==========================================================================
   BLOG LIST PAGE STYLING (PHASE 2)
   ========================================================================== */

.blog-list-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
}

.blog-header {
  margin-bottom: 2.5rem;
  text-align: left;
}

.blog-header h1 {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.blog-header p {
  color: #94a3b8;
  font-size: 1.05rem;
}

/* Category Filter Tabs & Search Bar */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-categories-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-pill {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--cyan-bright);
}

.blog-search-box {
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.blog-search-input {
  width: 100%;
  height: 40px;
  background: rgba(14, 21, 36, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: #ffffff;
  padding: 0 2.65rem 0 1.15rem;
  font-size: 0.88rem;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.blog-search-input:focus {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: rgba(14, 21, 36, 0.95);
}

.blog-search-btn {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.blog-search-btn:hover {
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.15);
}

.blog-search-btn:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 1px;
}

.blog-search-result-info {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.blog-query-highlight {
  color: #ffffff;
}

/* Feed Layout (Clickable Cards with Subtle Hover Effect) */
.blog-feed-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.blog-feed-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.75rem;
  background: rgba(14, 21, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 1.25rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.blog-feed-item:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.blog-feed-item:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 2px;
}

.blog-feed-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0e1524;
}

.blog-feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.blog-feed-item:hover .blog-feed-thumb img {
  transform: scale(1.03);
}

.blog-feed-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #0f172a;
}

.blog-feed-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-feed-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.blog-feed-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.blog-feed-item:hover .blog-feed-title {
  color: var(--cyan-bright);
}

.blog-feed-desc {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pagination UI */
.pagination-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.pagination-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* ==========================================================================
   ARTICLE DETAIL PAGE STYLING (PHASE 2)
   ========================================================================== */

.article-detail-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  color: #ffffff;
  font-size: clamp(2rem, 3.8vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.article-short-desc {
  color: #cbd5e1;
  font-size: 1.15rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: #94a3b8;
}

.article-meta-row strong {
  color: #f1f5f9;
}

.article-cover-media {
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-cover-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

/* Typography for Long-Form Content */
.article-rich-body {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-rich-body p {
  color: #cbd5e1;
  margin-bottom: 1.4rem;
}

.article-rich-body h2 {
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-rich-body h3 {
  color: #f8fafc;
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.article-rich-body ul,
.article-rich-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.article-rich-body li {
  color: #cbd5e1;
}

.article-rich-body a {
  color: var(--cyan-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-rich-body a:hover {
  color: #ffffff;
}

.article-image-figure {
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-image-figure img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-image-figure figcaption {
  font-size: 0.82rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.6rem;
  font-style: italic;
}

.article-video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000000;
}

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

/* Article Table of Contents */
.article-toc {
  background: rgba(14, 21, 36, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.article-toc-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.article-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.article-toc-list a {
  color: #94a3b8;
  font-size: 0.9rem;
  text-decoration: none;
}

.article-toc-list a:hover {
  color: var(--cyan-bright);
}

/* Article Footer Actions */
.article-footer-box {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-copy-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-copy-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-copied {
  background: var(--success) !important;
  color: #ffffff !important;
  border-color: var(--success) !important;
}

/* In-Article AACast Pro Promo */
.article-promo-card {
  margin-top: 3rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Article & Blog Typography Helpers */
.article-section-title {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.article-card-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.article-card:hover .article-card-title {
  color: var(--cyan-bright);
}

.promo-card-title {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.promo-card-desc {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
}

.article-footer-hint {
  font-size: 0.85rem;
  color: #64748b;
}

.public-empty-title {
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

/* ==========================================================================
   LIGHT MODE FOR BLOG & ARTICLE (SCOPED STRICTLY TO .blog-page)
   ========================================================================== */

body.blog-page[data-theme="light"],
.blog-page[data-theme="light"] {
  background-color: #f8fafc !important;
  background: #f8fafc !important;
  color: #1e293b !important;
}

body.blog-page[data-theme="light"] .public-glow {
  opacity: 0.15;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.10) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 75%);
}

body.blog-page[data-theme="light"] .public-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.blog-page[data-theme="light"] .brand-link {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .brand-link:hover {
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .nav-item {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .nav-item:hover {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .nav-item.active {
  color: var(--primary) !important;
  font-weight: 600;
}

body.blog-page[data-theme="light"] .theme-toggle-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.blog-page[data-theme="light"] .theme-toggle-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .mobile-menu-btn {
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .mobile-menu-btn:hover {
  background: #f1f5f9 !important;
}

body.blog-page[data-theme="light"] .mobile-drawer {
  background: #ffffff !important;
  border-left: 1px solid #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .mobile-drawer-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .mobile-drawer-close {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .mobile-drawer-close:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

body.blog-page[data-theme="light"] .drawer-nav-item {
  color: #334155 !important;
}

body.blog-page[data-theme="light"] .drawer-nav-item:hover {
  background: #f1f5f9 !important;
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .drawer-nav-item.active {
  color: var(--primary) !important;
  font-weight: 600;
  background: #eff6ff !important;
}

body.blog-page[data-theme="light"] .drawer-theme-row {
  border-top-color: #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .drawer-theme-label {
  color: #64748b !important;
}

/* Blog Feed Page (Scoped Light Theme) */
body.blog-page[data-theme="light"] .blog-header h1 {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .blog-header p {
  color: #475569 !important;
}

body.blog-page[data-theme="light"] .blog-toolbar {
  border-bottom-color: #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .category-pill {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

body.blog-page[data-theme="light"] .category-pill:hover,
body.blog-page[data-theme="light"] .category-pill.active {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .blog-search-input {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.blog-page[data-theme="light"] .blog-search-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  background: #ffffff !important;
}

body.blog-page[data-theme="light"] .blog-search-btn {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .blog-search-btn:hover {
  color: var(--primary) !important;
  background: #eff6ff !important;
}

body.blog-page[data-theme="light"] .blog-search-result-info {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .blog-query-highlight {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .blog-feed-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

body.blog-page[data-theme="light"] .blog-feed-item:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

body.blog-page[data-theme="light"] .blog-feed-thumb {
  background: #f1f5f9 !important;
}

body.blog-page[data-theme="light"] .blog-feed-placeholder {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
}

body.blog-page[data-theme="light"] .blog-feed-meta {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .badge-cyan {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

body.blog-page[data-theme="light"] .blog-feed-title {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .blog-feed-item:hover .blog-feed-title {
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .blog-feed-desc {
  color: #475569 !important;
}

body.blog-page[data-theme="light"] .pagination-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

body.blog-page[data-theme="light"] .pagination-btn:hover {
  background: #f8fafc !important;
  border-color: #93c5fd !important;
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .pagination-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

body.blog-page[data-theme="light"] .public-empty-box {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

body.blog-page[data-theme="light"] .public-empty-title {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .public-empty-box p {
  color: #64748b !important;
}

/* Article Detail Page (Scoped Light Theme) */
body.blog-page[data-theme="light"] .article-header h1 {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .article-short-desc {
  color: #334155 !important;
}

body.blog-page[data-theme="light"] .article-meta-row {
  border-top-color: #e2e8f0 !important;
  border-bottom-color: #e2e8f0 !important;
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .article-meta-row strong {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .article-cover-media {
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
}

body.blog-page[data-theme="light"] .article-rich-body {
  color: #334155 !important;
}

body.blog-page[data-theme="light"] .article-rich-body p {
  color: #334155 !important;
}

body.blog-page[data-theme="light"] .article-rich-body h2 {
  color: #0f172a !important;
  border-bottom-color: #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .article-rich-body h3 {
  color: #1e293b !important;
}

body.blog-page[data-theme="light"] .article-rich-body li {
  color: #334155 !important;
}

body.blog-page[data-theme="light"] .article-rich-body a {
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .article-rich-body a:hover {
  color: var(--primary-hover) !important;
}

body.blog-page[data-theme="light"] .article-image-figure img {
  border-color: #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .article-image-figure figcaption {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .article-video-wrapper {
  border-color: #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .article-toc {
  background: #f8fafc !important;
  border-color: #bae6fd !important;
}

body.blog-page[data-theme="light"] .article-toc-title {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .article-toc-list a {
  color: #475569 !important;
}

body.blog-page[data-theme="light"] .article-toc-list a:hover {
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .article-footer-box {
  border-top-color: #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .btn-copy-link {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

body.blog-page[data-theme="light"] .btn-copy-link:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

body.blog-page[data-theme="light"] .article-footer-hint {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .article-section-title {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .article-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  text-decoration: none !important;
}

body.blog-page[data-theme="light"] .article-card:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

body.blog-page[data-theme="light"] .article-card-title {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .article-card-link {
  color: var(--primary) !important;
}

body.blog-page[data-theme="light"] .article-card:hover .article-card-link {
  color: var(--primary-hover) !important;
}

body.blog-page[data-theme="light"] .article-promo-card {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%) !important;
  border-color: #bae6fd !important;
}

body.blog-page[data-theme="light"] .promo-card-title {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .promo-card-desc {
  color: #475569 !important;
}

/* Footer (Scoped Light Theme) */
body.blog-page[data-theme="light"] .public-footer {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
}

body.blog-page[data-theme="light"] .footer-brand strong {
  color: #0f172a !important;
}

body.blog-page[data-theme="light"] .footer-brand p {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .footer-brand span {
  color: #94a3b8 !important;
}

body.blog-page[data-theme="light"] .footer-links a {
  color: #64748b !important;
}

body.blog-page[data-theme="light"] .footer-links a:hover {
  color: var(--primary) !important;
}

/* ==========================================================================
   ADMINKIT INSPIRED SAAS ADMIN DESIGN SYSTEM
   ========================================================================== */

.admin-body {
  background: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-sans);
  overflow-x: hidden;
}

.admin-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* 1. AdminKit Dark Navy Sidebar */
.admin-sidebar {
  width: var(--admin-sidebar-width, 260px);
  min-width: var(--admin-sidebar-width, 260px);
  max-width: var(--admin-sidebar-width, 260px);
  background: #1e293b;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 1000;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-right: 1px solid #334155;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

/* Thanh kéo thả độ rộng sidebar (chỉ desktop > 992px) */
.sidebar-resizer {
  flex: 0 0 5px;
  cursor: col-resize;
  background: transparent;
  position: relative;
  z-index: 1001;
  transition: background 0.15s ease;
}

.sidebar-resizer:hover,
.sidebar-resizer.is-dragging {
  background: rgba(37, 99, 235, 0.35);
}

body.is-resizing-sidebar {
  cursor: col-resize;
  user-select: none;
}

.sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.sidebar-brand-badge {
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.8rem;
  background: rgba(56, 189, 248, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.25rem;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 0;
}

.sidebar-header {
  padding: 0.85rem 1.5rem 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #64748b;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item {
  margin: 0.2rem 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-link:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-item.active .sidebar-link {
  color: #ffffff;
  background: #2563eb;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar-item.active .sidebar-link svg {
  stroke: #ffffff;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.4);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

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

.sidebar-user-email {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* 2. Topbar Header */
.admin-main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  background: #f8fafc;
}

.admin-topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-sidebar-toggle {
  display: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.45rem;
  cursor: pointer;
  color: #475569;
  transition: var(--transition);
}

.admin-sidebar-toggle:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: #cbd5e1;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.topbar-user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
}

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

.topbar-user-details {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.topbar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 3. Main Content Canvas & Headers */
.admin-content {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 100%;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

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

.page-title-group h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
}

.page-title-group p {
  font-size: 0.88rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.toolbar-form {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* 4. AdminKit Stat Cards */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.revenue-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.35rem 1.4rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.stat-widget-body {
  display: flex;
  flex-direction: column;
}

.stat-widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stat-widget-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-widget-value strong {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  font-family: var(--font-sans);
}

.stat-widget-footer {
  margin-top: 0.4rem;
}

.stat-widget-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.stat-widget-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-widget-total .stat-widget-icon {
  background: #eff6ff;
  color: #2563eb;
}

.stat-widget-active .stat-widget-icon {
  background: #ecfdf5;
  color: #10b981;
}

.stat-widget-expiring .stat-widget-icon {
  background: #fffbeb;
  color: #f59e0b;
}

.stat-widget-expired .stat-widget-icon {
  background: #fef2f2;
  color: #ef4444;
}

/* Dashboard Chart.js */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.chart-grid-single {
  grid-template-columns: 1fr;
}

.chart-canvas-wrap {
  position: relative;
  height: 280px;
}

.chart-canvas-wrap.chart-canvas-lg {
  height: 320px;
}

.chart-source-select {
  width: auto;
  height: 36px;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.chart-total {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
}

.chart-total strong {
  color: #0f172a;
  font-family: var(--font-mono);
}

/* License activation ticket (QR modal) */
.license-ticket {
  text-align: center;
}

.license-ticket-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-main);
}

.license-ticket-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.license-ticket-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.4rem 0 1rem;
}

.license-ticket-qr img {
  width: 200px;
  height: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.license-ticket-info {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1rem 0;
  text-align: left;
}

.license-key-block {
  margin: 0.25rem 0 1rem;
}

.license-key-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.license-key-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  word-break: break-all;
  margin-bottom: 0.6rem;
}

.license-ticket-info th,
.license-ticket-info td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.license-ticket-info th {
  width: 42%;
  color: var(--text-muted);
  font-weight: 600;
}

.license-ticket-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* 5. Customer & Tables Utilities */
.form-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 1.25rem;
  align-items: flex-end;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr auto;
  gap: 1.25rem;
  align-items: flex-end;
}

.form-grid-5 {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.4fr 1fr auto;
  gap: 1.25rem;
  align-items: flex-end;
}

.form-grid-6 {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr 1fr 0.8fr auto;
  gap: 1.25rem;
  align-items: flex-end;
}

/* ==========================================================================
   CUSTOMER & LICENSE MANAGEMENT (/admin/users)
   ========================================================================== */

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

.users-kpi-card {
  cursor: pointer;
  user-select: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.users-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.users-kpi-card.active {
  border-color: var(--primary);
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), var(--shadow-xs);
}

.users-kpi-card.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}

.users-kpi-card.stat-widget-active.active::before { background: var(--success); }
.users-kpi-card.stat-widget-active.active { border-color: var(--success); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12), var(--shadow-xs); }
.users-kpi-card.stat-widget-expiring.active::before { background: var(--warning); }
.users-kpi-card.stat-widget-expiring.active { border-color: var(--warning); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.12), var(--shadow-xs); }
.users-kpi-card.stat-widget-expired.active::before { background: var(--danger); }
.users-kpi-card.stat-widget-expired.active { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12), var(--shadow-xs); }

/* Create Customer License Card */
.create-user-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.create-user-card.is-collapsed {
  display: none;
}

.create-card-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.create-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.create-customer-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.create-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem 1.25rem;
  align-items: flex-start;
}

.create-form-grid .form-group-full {
  grid-column: span 2;
}

.create-form-grid .form-control {
  height: 40px;
}

.form-control-readonly {
  background: #f8fafc !important;
  color: #1e293b !important;
  font-family: var(--font-mono);
  font-weight: 700;
  border-color: #cbd5e1;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.35rem;
  display: block;
  line-height: 1.35;
}

.create-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-subtle);
}

.gift-switch-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.gift-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gift-switch-slider {
  width: 42px;
  height: 24px;
  background-color: #cbd5e1;
  border-radius: 24px;
  position: relative;
  transition: background-color 0.25s ease;
  flex-shrink: 0;
}

.gift-switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gift-switch-input:checked + .gift-switch-slider {
  background-color: #f59e0b;
}

.gift-switch-input:checked + .gift-switch-slider::before {
  transform: translateX(18px);
}

.gift-switch-label {
  display: flex;
  flex-direction: column;
}

.gift-switch-label strong {
  font-size: 0.88rem;
  color: var(--text-main);
}

.gift-switch-label small {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.btn-submit-license {
  height: 42px;
  padding: 0 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Customer List Card & Toolbar */
.customer-list-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.customer-list-header {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.customer-list-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.customer-list-controls .user-app-select {
  height: 38px;
  min-width: 170px;
  max-width: 210px;
  border-radius: var(--radius-md);
}

.customer-list-controls .user-days-input {
  height: 38px;
  width: 120px;
  border-radius: var(--radius-md);
}

.customer-list-controls .filter-pill-action {
  height: 38px;
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  background: #ffffff;
}

.users-filter-bar {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1.35rem;
}

.filter-pills-list {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-pill:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.filter-pill.active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

.filter-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.pill-count {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.35rem;
  flex-shrink: 0;
}

/* Table Enhancements */
.users-table-styled th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.users-table-styled td {
  padding: 0.95rem 1.15rem;
  vertical-align: middle;
}

.user-usage-value,
.user-last-recorded {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.user-last-recorded.is-empty {
  color: var(--text-muted);
  font-weight: 400;
}

.user-row-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-small {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  border: 1px solid #dbeafe;
}

.user-info-meta {
  display: flex;
  flex-direction: column;
}

.user-email-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.user-email-link {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-block;
}

.user-email-link:hover {
  color: #2563eb;
}

.btn-copy-email {
  background: transparent;
  border: none;
  padding: 2px 4px;
  color: var(--text-subtle);
  cursor: pointer;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: var(--transition);
}

.user-row-cell:hover .btn-copy-email {
  opacity: 1;
}

.btn-copy-email:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.btn-copy-email.is-copied {
  color: var(--success);
  opacity: 1;
}

.user-sub-date {
  font-size: 0.76rem;
  color: #64748b;
  display: block;
  margin-top: 0.15rem;
}

.search-clear-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.search-clear-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

/* Pulsing Status Dot */
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.dot-pulse {
  animation: statusPulse 2s infinite;
}

.badge-status-active {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-weight: 600;
}

.badge-source {
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.22rem 0.55rem;
}

.dot-nam { background: #f59e0b; }
.dot-system { background: #64748b; }

.badge-gift-tag {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  font-weight: 700;
}

.badge-price {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.badge-devices {
  font-size: 0.82rem;
  padding: 0.25rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 600;
}

.action-buttons-wrap {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-action-detail {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.btn-action-detail:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--primary);
}

.btn-action-delete {
  background: transparent;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.btn-action-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.dt-processing-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dt-empty-custom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  color: var(--text-subtle);
  text-align: center;
}

.dt-empty-custom svg {
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.dt-empty-custom p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.dt-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .users-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .customer-list-header {
    flex-direction: column;
    align-items: stretch;
  }
  .customer-list-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .customer-list-controls .search-input-wrap,
  .customer-list-controls .user-app-select,
  .customer-list-controls .user-days-input,
  .customer-list-controls .filter-pill-action {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .users-kpi-grid {
    grid-template-columns: 1fr;
  }
  .create-form-grid {
    grid-template-columns: 1fr;
  }
  .create-form-grid .form-group-full {
    grid-column: span 1;
  }
  .create-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .create-form-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  .create-form-buttons .btn {
    width: 100%;
  }
  .btn-submit-license {
    width: 100%;
  }
}

.expiry-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.expiry-date {
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #1e293b;
}

.device-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-input-wrap {
  position: relative;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.search-input {
  padding-left: 2.2rem !important;
  height: 38px;
}

.btn-toggle-badge {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
}

/* User Detail View (/admin/users/{id}) */
.user-detail-hero {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.user-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.user-profile-meta {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.user-avatar-large {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.45rem;
  border: 2px solid #bfdbfe;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.user-detail-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-subtle);
}

.user-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: var(--transition);
}

.user-stat-box:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.user-stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.user-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.license-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
}

.license-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (max-width: 900px) {
  .user-detail-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .user-detail-stats-strip {
    grid-template-columns: 1fr;
  }
  .user-profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .user-detail-actions {
    width: 100%;
    justify-content: stretch;
  }
  .user-detail-actions form {
    width: 100%;
  }
  .user-detail-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Modals */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.admin-modal-dialog {
  background: #ffffff;
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  animation: adminModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adminModalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.admin-modal-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.admin-modal-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.15s ease;
}

.admin-modal-close:hover {
  color: #0f172a;
}

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

.admin-modal-dialog-lg {
  max-width: 940px;
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
}

.create-user-modal .create-customer-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.create-user-modal .admin-modal-body {
  overflow-y: auto;
}

.create-user-modal .create-form-grid {
  grid-template-columns: repeat(2, 1fr);
}

.create-user-modal .create-form-grid .form-group-email {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .admin-modal-dialog-lg {
    max-height: calc(100vh - 1.5rem);
  }
  .create-user-modal .create-form-grid {
    grid-template-columns: 1fr;
  }
  .create-user-modal .create-form-grid .form-group-email {
    grid-column: span 1;
  }
  .create-user-modal .create-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* 6. Blog CMS & WYSIWYG Editor */
.editor-layout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  flex-wrap: wrap;
}

.editor-tool-btn {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  cursor: pointer;
  color: #334155;
  transition: var(--transition);
}

.editor-tool-btn:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #93c5fd;
}

.editor-contenteditable {
  min-height: 380px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 1.25rem;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #1e293b;
  outline: none;
  overflow-y: auto;
}

.editor-contenteditable:focus {
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.editor-contenteditable h2 { font-size: 1.4rem; margin: 1rem 0 0.5rem; color: #0f172a; font-weight: 800; }
.editor-contenteditable h3 { font-size: 1.2rem; margin: 0.85rem 0 0.4rem; color: #1e293b; font-weight: 700; }
.editor-contenteditable p { margin: 0.5rem 0; }
.editor-contenteditable ul, .editor-contenteditable ol { padding-left: 1.75rem; margin: 0.5rem 0; }
.editor-contenteditable a { color: #2563eb; text-decoration: underline; }
.editor-contenteditable img { max-width: 100%; border-radius: 6px; margin: 0.5rem 0; }
.editor-contenteditable figure { margin: 1rem 0; }
.editor-contenteditable figcaption { font-size: 0.82rem; color: #64748b; text-align: center; margin-top: 0.35rem; }
.editor-contenteditable blockquote { border-left: 3px solid #2563eb; padding-left: 1rem; color: #475569; margin: 0.75rem 0; font-style: italic; }
.editor-contenteditable .article-video-wrapper { max-width: 100%; margin: 1rem 0; }

.autosave-indicator {
  font-size: 0.8rem;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ecfdf5;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid #a7f3d0;
  font-weight: 500;
}

/* 7. AdminKit Responsive System */
@media (max-width: 992px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 1100;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-resizer {
    display: none;
  }

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

  .admin-sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-sidebar-toggle {
    display: inline-flex;
  }

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

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

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 1.25rem;
  }
}

@media (max-width: 640px) {
  .admin-topbar {
    padding: 0 1rem;
  }

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

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

  .form-grid-3, .form-grid-4, .form-grid-5, .form-grid-6 {
    grid-template-columns: 1fr;
  }

  .editor-layout-grid {
    grid-template-columns: 1fr;
  }

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

  .topbar-web-btn span, .topbar-logout-btn span {
    display: none;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .toolbar-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrap {
    min-width: 0;
    width: 100%;
  }

  .search-form {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   ADMIN LOGIN SCREEN
   ========================================================================== */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at top, #1e293b 0%, #090d16 100%);
  position: relative;
  overflow: hidden;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(13, 19, 32, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(37, 99, 235, 0.2);
  position: relative;
  z-index: 10;
}

.login-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.login-title {
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: #94a3b8;
  font-size: 0.86rem;
  margin-top: 0.45rem;
  line-height: 1.45;
}

.login-card .form-group {
  margin-bottom: 1.25rem;
}

.login-card .form-label {
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.login-card .form-control {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  transition: var(--transition);
}

.login-card .form-control:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.login-card .btn-primary {
  padding: 0.85rem 1.25rem;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45);
}

.login-card .btn-primary:hover {
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.5);
}

/* ==========================================================================
   USER DETAIL & LICENSE DISPLAY
   ========================================================================== */

.license-box {
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  border: 1px solid #3b82f6;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.license-box-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.license-box-code {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.user-profile-header {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.user-profile-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar-large {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
}

.user-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.image-preview-container {
  margin: 0.75rem 0;
  max-width: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ==========================================================================
   RESPONSIVE DESIGN (320px - 1440px)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .feature-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .articles-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .editor-layout-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-section {
    padding: 3rem 1.25rem 2.5rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .feature-strip-grid {
    grid-template-columns: 1fr;
  }
  .feature-strip-card {
    flex-direction: row;
    align-items: flex-start;
  }
  .articles-grid-3 {
    grid-template-columns: 1fr;
  }
  .blog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .blog-search-box {
    width: 100%;
    min-width: 0;
  }
  .blog-feed-item {
    grid-template-columns: 1fr;
  }
  .blog-feed-thumb {
    aspect-ratio: 16 / 9;
  }
  .contact-card {
    padding: 2.5rem 1.5rem;
  }
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  /* Floating Facebook on Mobile: round icon */
  .floating-fb-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.85rem;
    border-radius: 50%;
  }
  .floating-fb-btn span {
    display: none;
  }
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .revenue-stats {
    grid-template-columns: 1fr;
  }
  .table-responsive-cards thead {
    display: none;
  }
  .table-responsive-cards, 
  .table-responsive-cards tbody, 
  .table-responsive-cards tr, 
  .table-responsive-cards td {
    display: block;
    width: 100%;
  }
  .table-responsive-cards tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    padding: 0.5rem;
  }
  .table-responsive-cards td {
    text-align: left !important;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
  }
  .table-responsive-cards td:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .hero-brand-name {
    font-size: clamp(3rem, 13vw, 3.8rem);
  }
  .hero-brand-tagline {
    font-size: 1.25rem;
  }
  .hero-confirmed-badges {
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
  }
  .hero-confirmed-badge {
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .login-card {
    padding: 2.25rem 1.5rem;
  }
  .feature-strip-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PUBLIC INFO PAGES (Giới thiệu / Cập nhật / Điều khoản)
   ========================================================================== */
.info-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

.info-hero {
  padding: 4.5rem 1.5rem 2rem;
}

.info-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.info-hero-title {
  color: #ffffff;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 1.25rem 0 1rem;
}

.info-hero-desc {
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto 1.75rem;
}

.info-section {
  margin-bottom: 4rem;
}

.info-mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.info-card {
  background: linear-gradient(160deg, rgba(20, 31, 51, 0.9), rgba(10, 16, 28, 0.95));
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.4rem;
}

.info-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan-bright);
  margin-bottom: 1rem;
}

.info-card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan-bright);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  padding: 0 0.55rem;
}

.info-card h3 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
}

.info-card p {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.info-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

.info-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.info-gallery-item {
  margin: 0;
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.info-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border-dark);
}

.info-gallery-item figcaption {
  padding: 0.75rem 1rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.info-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.info-step {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.info-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan-bright);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.info-step b {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.info-step p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.info-tips-box {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
}

.info-tips-box h3 {
  color: #ffffff;
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.info-tips-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

.info-tips-box li {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0.45rem 0;
}

.info-tips-box p {
  color: #94a3b8;
  font-size: 0.95rem;
}

.info-safety-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  text-align: center;
}

.info-safety-box b {
  display: block;
  color: #34d399;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.info-safety-box p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 1.1rem;
}

.changelog-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.changelog-chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan-bright);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.changelog-group {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.changelog-group h3 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-dark);
}

.changelog-group ul {
  margin: 0;
  padding-left: 1.3rem;
}

.changelog-group li {
  color: #94a3b8;
  font-size: 0.93rem;
  line-height: 1.65;
  margin: 0.5rem 0;
}

.changelog-group code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: #7dd3fc;
}

.terms-danger-box {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.terms-danger-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.terms-danger-box b {
  display: block;
  color: #f87171;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.terms-danger-box p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.terms-warn-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.75rem;
}

.terms-warn-box b {
  display: block;
  color: #fbbf24;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.terms-warn-box ul {
  margin: 0;
  padding-left: 1.3rem;
}

.terms-warn-box li {
  color: #94a3b8;
  font-size: 0.93rem;
  line-height: 1.65;
  margin: 0.45rem 0;
}

.terms-article {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.25rem;
}

.terms-article h3 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.7rem;
}

.terms-article p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 640px) {
  .info-hero {
    padding-top: 3rem;
  }
  .terms-danger-box {
    flex-direction: column;
  }
}

/* ==========================================================================
   SUPPORTED CARS PAGE (Xe hỗ trợ)
   ========================================================================== */
.info-stat-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.info-stat {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.6rem;
  min-width: 170px;
  text-align: center;
}

.info-stat b {
  display: block;
  color: var(--cyan-bright);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
}

.info-stat span {
  display: block;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.cars-brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
  align-items: start;
}

.cars-brand-grid .changelog-group {
  margin-bottom: 0;
}

.cars-model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cars-model-chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.22);
}

/* ==========================================================================
   INTRO COMPATIBILITY CARD (1000+ dòng xe)
   ========================================================================== */
.info-compat-card {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(20, 31, 51, 0.95), rgba(8, 14, 26, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}

.info-compat-text {
  flex: 1;
  min-width: 260px;
}

.info-compat-text .section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 0.75rem;
}

.info-compat-desc {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1.4rem;
  max-width: 560px;
}

.info-compat-stats {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .info-compat-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .info-compat-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .info-compat-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .info-compat-stats .info-stat {
    min-width: 140px;
  }
}

/* ==========================================================================
   MAIL SETTINGS (/admin/settings/mail)
   ========================================================================== */

.mail-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1080px) {
  .mail-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Hero Status Banner */
.mail-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.mail-hero-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mail-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mail-hero-icon.active {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.mail-hero-icon.inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.mail-hero-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.mail-hero-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.mail-hero-badges {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Pulse Dot */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: mail-pulse 2s infinite;
}

@keyframes mail-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Modern Toggle Switch Card */
.mail-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.6) 0%, rgba(248, 250, 252, 0.8) 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.mail-toggle-card:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.mail-toggle-meta {
  display: flex;
  flex-direction: column;
}

.mail-toggle-meta strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mail-toggle-meta small {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.mail-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.mail-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.mail-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 26px;
}

.mail-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.mail-switch input:checked + .mail-slider {
  background-color: #10b981;
}

.mail-switch input:checked + .mail-slider::before {
  transform: translateX(22px);
}

/* Quick Presets Bar */
.mail-presets-wrap {
  margin-bottom: 1.35rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px dashed var(--border);
}

.mail-presets-header {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mail-presets-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mail-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.mail-preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.mail-preset-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.mail-preset-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  font-family: var(--font-mono);
}

.mail-preset-btn.active .mail-preset-badge {
  background: rgba(255, 255, 255, 0.25);
}

/* Form Sections */
.mail-section {
  margin-bottom: 1.35rem;
}

.mail-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.mail-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mail-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr;
  gap: 1rem;
}

@media (max-width: 680px) {
  .mail-grid-2,
  .mail-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Password Status Badge */
.mail-password-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  margin-top: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.mail-password-status.saved {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.mail-password-status.empty {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Sender Preview Pill */
.mail-sender-preview {
  margin-top: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-sender-preview code {
  color: var(--primary);
  font-weight: 600;
}

/* Sidebar Cards */
.mail-sidebar-card {
  margin-bottom: 1.5rem;
}

.mail-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
}

.mail-step-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.mail-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #bfdbfe;
  margin-top: 0.1rem;
}

.mail-step-content {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.45;
}

.mail-step-content strong {
  color: var(--text-main);
}

.mail-step-content code {
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
  border: 1px solid #e2e8f0;
}

.mail-security-note {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: #1e40af;
  font-size: 0.83rem;
  line-height: 1.45;
  margin-top: 1rem;
}

.mail-security-note svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Quản lý giao dịch: ẩn cột xóa, giữ lâu tiêu đề "Hóa đơn thanh toán" để hiện */
.tx-delete-hidden .tx-delete-col {
  display: none;
}

.tx-reveal-handle {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
