/* ======================================================
   🎨 Tino Unified Theme (v1.0)
   Áp dụng cho: /home, /dev, /shop
   ====================================================== */

/* =============== 🌈 Base Tokens & Reset =============== */
:root {
  --bg: #0b1020;
  --bg-grad-a: #15204b;
  --card: #0f1530; /* đồng bộ với HOME */
  --card-2: #0f1530; /* dùng cho dev/shop & card-sleek */
  --text: #eaf1ff;
  --muted: #95a3c6;
  --brand: #6ea8fe;
  --accent: #a16eff;
  --success: #4dd4ac;
  --warning: #ffd16e;
  --danger: #ff6b7b;
  --border: #1c2444;
  --glow: 0 0 24px rgba(110, 168, 254, 0.35);
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
/* =============== 📌 Sticky Footer – Global =============== */
html,
body {
  height: 100%;
}
/* =============== 📌 Sticky Footer + base layout =============== */
body.tino-theme {
  background: none;

  /* Giao diện tổng thể */
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Sticky footer & an toàn */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative; /* cần cho ::before nằm dưới nội dung */
}
/* =============== 🌌 Fixed background layer (no-repeat, no-jitter) =============== */
body.tino-theme::before {
  content: "";
  position: fixed; /* phủ toàn viewport, không phụ thuộc chiều cao nội dung */
  inset: 0;
  z-index: -1; /* luôn nằm dưới mọi content */
  pointer-events: none;

  background: radial-gradient(
      80vw 80vh at 10% -10%,
      var(--bg-grad-a) 0%,
      var(--bg) 55%,
      var(--bg) 100%
    ),
    var(--bg);
  background-repeat: no-repeat;
  background-size: cover; /* phủ kín */
  /* KHÔNG dùng background-attachment ở đây để tránh bug iOS/Safari */
}

/* main nội dung trang */
.site-main {
  flex: 1 0 auto;
  display: block;
}
/* footer luôn ở đáy kể cả khi không có <main> */
.site-footer {
  flex: 0 0 auto;
  margin-top: auto;
}

/* an toàn: tránh tràn ngang các container bootstrap */
.container,
.container-fluid {
  overflow-x: hidden;
}

.tino-theme a,
.tino-theme a:hover {
  text-decoration: none;
}

/* =============== 📦 Layout & Typography =============== */
.section {
  margin-top: 32px;
}
.sec-title {
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #eaf1ff;
}
.sec-desc {
  color: var(--muted);
}
.text-brand {
  color: #6f9aff;
}
ul.list-unstyled li {
  color: #fff;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

/* =============== 🧠 Hero / Intro =============== */
.hero,
.dev-hero,
.tino-hero {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  overflow: hidden;
  box-shadow: var(--glow);
  background: linear-gradient(
    180deg,
    rgba(161, 110, 255, 0.1),
    rgba(110, 168, 254, 0.08) 60%,
    rgba(15, 21, 48, 0.65)
  );
  animation: heroFloat 12s ease-in-out infinite both;
}
@keyframes heroFloat {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
.dev-hero .grid,
.tino-hero .grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 992px) {
  .dev-hero .grid,
  .tino-hero .grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

/* =============== 🧍 Profile & Mini-info =============== */
.dev-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 2px solid rgba(223, 231, 255, 0.25);
  object-fit: cover;
  box-shadow: 0 10px 40px rgba(161, 110, 255, 0.22);
}
.dev-name {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.dev-role {
  color: var(--muted);
  font-size: 0.98rem;
}
.avatar-glow img {
  box-shadow: 0 0 10px rgba(111, 154, 255, 0.4);
  transition: box-shadow 0.4s ease;
}
.avatar-glow img:hover {
  box-shadow: 0 0 20px rgba(111, 154, 255, 0.8);
}

/* Mini info strip (đầy đủ 2 phiên bản + verified) */
.mini-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.mini-info > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  color: var(--muted);
}
.mini-info > span + span {
  position: relative;
  padding-left: 14px;
}
.mini-info > span + span::before {
  content: "·";
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1;
  opacity: 0.55;
  color: var(--muted);
}
.mini-info i {
  opacity: 0.9;
}
.mini-info .verified {
  color: #cfe1ff;
}
.mini-info .verified i {
  color: var(--brand);
}

/* Bản tăng độ rõ chữ & icon */
.mini-info > span {
  color: rgba(234, 241, 255, 0.92);
  font-weight: 500;
  line-height: 1.25;
}
.mini-info > span + span::before {
  opacity: 0.6;
  color: rgba(234, 241, 255, 0.6);
}
.mini-info > span i {
  color: var(--brand);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(110, 168, 254, 0.25));
  font-size: 0.95em;
}
.mini-info .verified {
  color: #e6f0ff;
}
.mini-info .verified i {
  color: var(--brand);
  filter: drop-shadow(0 0 8px rgba(110, 168, 254, 0.35));
}

/* =============== 🪄 Buttons =============== */
.btn-brand {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border: none;
  color: #081224;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.btn-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(110, 168, 254, 0.24);
}
.btn-ghost {
  border: 1px solid var(--border);
  background: rgba(223, 231, 255, 0.06);
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-ghost:hover {
  background: rgba(223, 231, 255, 0.1);
  border-color: #2a3a75;
}

/* =============== 💎 Cards =============== */
.card-sleek {
  background: var(
    --card-2
  ); /* đồng bộ dev/shop; HOME vẫn dùng --card cho block khác */
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  position: relative;
  isolation: isolate;
  backdrop-filter: saturate(1.1);
}
.card-sleek:hover {
  transform: translateY(-3px);
  border-color: #2a3a75;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.card-sleek:after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(110, 168, 254, 0.25),
    rgba(161, 110, 255, 0.18),
    rgba(110, 168, 254, 0.12)
  );
  opacity: 0.35;
  transition: opacity 0.25s ease;
}
.card-sleek:hover:after {
  opacity: 0.65;
}
.iconbox {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  background: rgba(223, 231, 255, 0.06);
}
.imgfit {
  width: 100%;
  object-fit: cover;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  aspect-ratio: 16/9;
}
/* Ảnh & media không vượt viewport; bỏ khoảng trắng dưới ảnh inline */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* .imgfit nên là block để bỏ khoảng trắng base-line */
.imgfit {
  display: block;
}

/* =============== ⚙️ Progress / Stack =============== */
.progress-tech {
  height: 8px;
  background: #0e1430;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.progress-tech > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.stack-badge {
  border: 1px solid var(--border);
  color: #cfe2ff;
  background: rgba(223, 231, 255, 0.05);
}
.stack-badge i {
  opacity: 0.9;
}

/* =============== 🧭 Reveal on scroll & animations =============== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-up.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}
.reveal-stagger > * {
  --i: 0;
  transition-delay: calc(var(--i) * 80ms);
}

.bio-item {
  color: #fff;
  font-weight: 500;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fade-in {
  animation: fadeIn 1.2s ease forwards;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
.slide-up {
  opacity: 0;
  transform: translateY(15px);
  animation: slideUp 0.8s ease forwards;
}
.slide-up:nth-child(1) {
  animation-delay: 0.15s;
}
.slide-up:nth-child(2) {
  animation-delay: 0.25s;
}
.slide-up:nth-child(3) {
  animation-delay: 0.35s;
}
.slide-up:nth-child(4) {
  animation-delay: 0.45s;
}
@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============== 🎛️ Digital Scroller (Home) =============== */
.meta-fade-right {
  position: relative;
}
.meta-fade-right:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 100%;
  background: linear-gradient(
    to left,
    rgba(11, 16, 32, 1),
    rgba(11, 16, 32, 0)
  );
  pointer-events: none;
}
.meta-scroller {
  --gap: 16px;
  --cols: 3;
  display: grid;
  grid-auto-flow: column;
  gap: var(--gap);
  grid-template-rows: repeat(2, minmax(0, 1fr)); /* 2 hàng hiển thị */
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  grid-auto-columns: calc(
    (100% - (var(--gap) * (var(--cols) - 1))) / var(--cols)
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 18px,
    #000 calc(100% - 30px),
    transparent 100%
  );
}
.meta-scroller::-webkit-scrollbar {
  display: none;
}
.meta-scroller .meta-item {
  scroll-snap-align: start;
  display: block;
  height: 100%;
}
.meta-card {
  height: 100%;
}
.meta-card .imgfit {
  aspect-ratio: 16/9;
}
@media (max-width: 992px) {
  .meta-scroller {
    --cols: 2;
    grid-auto-columns: calc((100% - var(--gap)) / 2);
  }
}
@media (max-width: 576px) {
  .meta-scroller {
    --cols: 1;
    grid-auto-columns: 100%;
  }
}

/* =============== ✨ Tilt + Shine + Sweep =============== */
.fx-tilt {
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.22s ease;
  will-change: transform;
}
.fx-tilt:hover {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}
.fx-tilt .fx-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.18),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}
.fx-tilt:hover .fx-shine {
  opacity: 0.85;
}

.fx-sweep {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
}
.fx-sweep:after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 18%;
  left: -25%;
  transform: skewX(-22deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  opacity: 0;
  transition: opacity 0.25s ease, left 0.55s ease;
}
.fx-sweep:hover:after {
  opacity: 1;
  left: 120%;
}

/* =============== 🌬️ Hero ambient breathing =============== */
.hero.fx-ambient {
  position: relative;
}
.hero.fx-ambient::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  pointer-events: none;
  background: conic-gradient(
    from var(--spin, 0deg),
    rgba(110, 168, 254, 0.25),
    rgba(161, 110, 255, 0.22),
    rgba(110, 168, 254, 0.25)
  );
  -webkit-mask: linear-gradient(#000, #000) content-box,
    linear-gradient(#000, #000);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding: 1px;
  opacity: 0.35;
  animation: spinBorder 12s linear infinite;
}
@keyframes spinBorder {
  to {
    --spin: 360deg;
  }
}

/* =============== ⌨️ Typing caret & sequence reveal =============== */
.typer {
  position: relative;
  white-space: nowrap;
}
.typer::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  background: var(--brand);
  opacity: 0.9;
  transform: translateY(2px);
  animation: caretBlink 1s steps(1, end) infinite;
}
@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}
.typer-done::after {
  opacity: 0;
}
.fx-seq-hide {
  opacity: 0;
  transform: translateY(10px);
}
.fx-seq-show {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* Cho phần summary cần xuống dòng */
#typer-summary.typer {
  white-space: normal;
  display: inline;
  word-break: break-word;
}
/* ======================================================
   👨‍💻 DEV PAGE INTEGRATION + MOBILE FIXES
   Thêm vào cuối tino-theme.css
   ====================================================== */

/* 1) Hero & Grid đã có, nhưng bổ sung padding nhỏ hơn trên mobile */
@media (max-width: 575.98px) {
  .dev-hero,
  .hero,
  .tino-hero {
    padding: 18px;
    border-radius: 16px;
  }
}

/* 2) Ảnh & media không vượt viewport; bỏ khoảng trắng dưới ảnh inline */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.container,
.container-fluid {
  overflow-x: hidden;
}

/* 4) Terminal block: chống vỡ layout với chuỗi dài / code dài */
.term pre {
  overflow-wrap: anywhere; /* cưỡng bức xuống dòng khi cần */
  word-break: break-word; /* fallback cho 1 số trình duyệt */
  white-space: pre-wrap; /* đã có, giữ lại */
}

/* 5) Badges/Buttons: cho phép xuống dòng khi text dài */
.badge-chip,
.stack-badge {
  white-space: normal;
}
.btn-ghost,
.btn-brand {
  white-space: normal;
}

/* 6) Card & hình trong card: đảm bảo không tràn góc */
.card-sleek img {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  display: block;
}

/* 7) Flex containers phổ biến trên /dev: chắc chắn tự wrap ở màn nhỏ */
@media (max-width: 575.98px) {
  .d-flex.flex-wrap,
  .d-flex.gap-2,
  .d-flex.gap-3 {
    flex-wrap: wrap !important;
  }
}

/* 8) Timeline: thu nhỏ padding để tránh lấn mép */
@media (max-width: 575.98px) {
  .timeline .step {
    padding-left: 30px;
  }
  .timeline .step:before {
    left: 10px;
  }
  .timeline .dot {
    left: 4px;
  }
}

/* 9) Avatar & typographic tweaks nhỏ trên mobile */
@media (max-width: 575.98px) {
  .dev-name {
    font-size: 1.25rem;
  }
  .dev-role {
    font-size: 0.95rem;
  }
  .dev-avatar {
    width: 96px;
    height: 96px;
  }
}

/* 10) Utility: ẩn scrollbar ngang tuỳ chọn (nếu có container cuộn) */
.no-scrollbar {
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* 11) Guard thêm cho các grid 2-cột nhạy cảm (nếu dùng class .grid chung) */
@media (max-width: 575.98px) {
  .grid {
    grid-template-columns: 1fr !important;
  }
}

.term {
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  background: radial-gradient(
      60% 120% at 0% 0%,
      rgba(78, 115, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      80% 120% at 100% 100%,
      rgba(161, 110, 255, 0.2),
      transparent 60%
    ),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #cde;
}
.term .title {
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, rgba(223, 231, 255, 0.06), transparent);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red {
  background: #ff5f56;
}
.dot.yellow {
  background: #ffbd2e;
}
.dot.green {
  background: #27c93f;
}
.term pre {
  margin: 0;
  padding: 1rem 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}
/* ======================================================
   🛍️ SHOP PAGE STYLES (đồng bộ với /dev & /home)
   ====================================================== */

/* Giá & giá gạch */
.price {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.price del {
  color: #7f8bb0;
  font-weight: 500;
  margin-left: 0.35rem;
}

/* Filter pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-pills .pill {
  border: 1px solid var(--border);
  color: #cfe2ff;
  background: rgba(223, 231, 255, 0.05);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter-pills .pill:hover {
  background: rgba(223, 231, 255, 0.1);
  border-color: #2a3a75;
}
.filter-pills .pill.active {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #081224;
  border-color: transparent;
}

/* Icon lợi ích /benefit */
.benefit i {
  opacity: 0.95;
  color: var(--brand);
  margin-right: 4px;
}

/* Tag phím */
.kbd {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 8px;
  background: rgba(223, 231, 255, 0.04);
  font-family: "Fira Code", monospace;
  color: var(--text);
}

/* Huy hiệu thanh toán */
.pay-badge {
  border: 1px dashed #2c386b;
  background: #0e1430;
  color: #cfe2ff;
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}
.pay-badge i {
  color: var(--success);
  opacity: 0.9;
}

/* FAQ */
.faq .item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-2);
  padding: 14px 16px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.faq .item:hover {
  background: rgba(223, 231, 255, 0.04);
  border-color: #2a3a75;
}
.faq .item h6 {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.faq .item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Responsive tinh chỉnh nhỏ */
@media (max-width: 575.98px) {
  .filter-pills {
    gap: 6px;
  }
  .filter-pills .pill {
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
  }
}

/* ======================================================
   📨 CONTACT PAGE STYLES
   ====================================================== */
.contact-form input,
.contact-form textarea,
.form-control.card-sleek {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}
.form-control:focus {
  background: var(--card-2);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.2);
  color: var(--text);
}
textarea.form-control {
  resize: vertical;
}
/* ======================================================
   📰 BLOG PAGE STYLES
   ====================================================== */
/* ==== Blog top header: ngăn nội bộ tạo scrollbar, canh giữa gọn ==== */
.blog-top {
  max-width: 760px;
  margin: 0 auto 2rem;
  overflow: visible; /* tránh tự sinh scroll dọc */
}
.section,
.section .container,
.section .text-center {
  overflow: visible; /* đảm bảo không có scroll nội bộ kỳ lạ */
}

/* Card bài viết & meta */
.post-card .post-title {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}
.post-card .post-title:hover {
  color: var(--brand);
}
.post-card .post-meta {
  color: var(--muted);
  font-size: 0.85rem;
}
.badge-cat {
  border: 1px solid var(--border);
  background: rgba(223, 231, 255, 0.05);
  color: #cfe2ff;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.blog-card img {
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}
.blog-card h5 {
  color: var(--text);
  transition: color 0.2s;
}
.blog-card:hover h5 {
  color: var(--brand);
}
.blog-card p {
  color: var(--muted);
}
.blog-card .btn {
  margin-top: 0.4rem;
}

/* Responsive */
@media (max-width: 575.98px) {
  .blog-card h5 {
    font-size: 1.05rem;
  }
  .sec-title {
    font-size: 1.4rem;
  }
}
/* ======================================================
   Share Code – page specific
   ====================================================== */

/* Badge chuyên mục (dùng lại tông của theme) */
.badge-cat {
  border: 1px solid var(--border);
  background: rgba(223, 231, 255, 0.05);
  color: #cfe2ff;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Card hover tinh tế hơn 1 chút */
.project-card:hover {
  transform: translateY(-3px);
}

/* Nếu dùng .ratio ngoài Bootstrap => đảm bảo ảnh không méo */
.project-card .imgfit {
  aspect-ratio: 16/9;
  object-fit: cover;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

/* Bộ lọc pills (nếu chưa có trong theme) – fallback */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-pills .pill {
  border: 1px solid var(--border);
  color: #cfe2ff;
  background: rgba(223, 231, 255, 0.05);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter-pills .pill:hover {
  background: rgba(223, 231, 255, 0.1);
  border-color: #2a3a75;
}
.filter-pills .pill.active {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #081224;
  border-color: transparent;
}

/* Responsive tweaks */
@media (max-width: 575.98px) {
  .filter-pills {
    gap: 6px;
  }
  .filter-pills .pill {
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
  }
}
/* ======================================================
   👤 PROFILE PAGE STYLES — Unified with Tino Theme
   ====================================================== */

/* Wrapper */
.profile-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 16px 70px;
  color: var(--text);
}

/* Cover + Header */
.cover {
  background: radial-gradient(
      1200px 240px at 10% -40%,
      color-mix(in oklab, var(--brand) 22%, transparent) 0%,
      transparent 60%
    ),
    radial-gradient(
      1200px 240px at 90% -40%,
      color-mix(in oklab, var(--accent) 20%, transparent) 0%,
      transparent 60%
    ),
    linear-gradient(0deg, var(--card-2), var(--card-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
}
.header {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Avatar + nút upload (kiểu FB) */
.avatar-box {
  position: relative;
  width: 108px;
  height: 108px;
  flex: 0 0 108px;
}
.avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand);
  box-shadow: 0 0 20px color-mix(in oklab, var(--brand) 42%, transparent);
  display: block;
}
.btn-camera {
  position: absolute;
  right: 2px;
  bottom: 2px;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 14px color-mix(in oklab, var(--accent) 40%, transparent);
}
.btn-camera:hover {
  opacity: 0.92;
}
#avatarInput {
  display: none;
}

/* Tên + badges + số dư */
.profile-info-box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}
.profile-info-box .name-line h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.15rem;
}
.profile-info-box .tier-line .badge-role,
.profile-info-box .tier-line .badge-tier {
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  font-weight: 750;
}
/* Số dư: mặc định ẩn trên desktop, hiện mobile */
.wallet-line {
  font-weight: 700;
  color: var(--success);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
}
@media (min-width: 768px) {
  .wallet-line {
    display: none;
  }
}

/* Badges */
.badge-role,
.badge-tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  border: 1px solid color-mix(in oklab, #000 20%, transparent);
}
.badge-role.admin {
  background: color-mix(in oklab, var(--danger) 92%, var(--card-2) 8%);
}
.badge-role.user {
  background: color-mix(in oklab, var(--brand) 90%, var(--card-2) 10%);
}

.badge-tier.free {
  background: color-mix(in oklab, var(--border) 82%, var(--card-2) 18%);
  color: color-mix(in oklab, var(--text) 88%, #fff 12%);
}
.badge-tier.vip {
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--warning) 85%, #ffb100 15%),
    color-mix(in oklab, var(--warning) 65%, #ffe36b 35%)
  );
  color: #1b1b1b;
}
.badge-tier.premium {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #fff;
}

/* Upload inline (icon-only ở PC) */
.upload-inline {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-upload.icon-only {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #081224;
  border: none;
  box-shadow: 0 8px 20px rgba(110, 168, 254, 0.25);
  transition: transform 0.12s, box-shadow 0.2s;
}
.btn-upload.icon-only i {
  font-size: 1.15rem;
  line-height: 1;
}
.btn-upload.icon-only:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(110, 168, 254, 0.3);
}

/* Tabs (đỡ dính nhau ở mobile) */
.profile-tabs {
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
.profile-tabs .nav-link,
.nav-pills .nav-link {
  color: color-mix(in oklab, var(--text) 72%, transparent);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 4px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.profile-tabs .nav-link.active,
.nav-pills .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border: none;
  box-shadow: 0 0 12px color-mix(in oklab, var(--brand) 50%, transparent);
}

/* Cards & Forms */
.card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  margin-bottom: 1rem;
}
.card .card-body {
  padding: 20px;
}
.card .card-footer {
  background: transparent;
  border-top: 1px dashed color-mix(in oklab, var(--border) 60%, transparent);
}
.form-label {
  color: color-mix(in oklab, var(--text) 92%, #fff 8%);
  font-weight: 600;
}
.form-control {
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  color: var(--text);
}
.form-control:focus {
  background: var(--card-2);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 28%, transparent);
  color: var(--text);
}
.form-control:disabled {
  color: color-mix(in oklab, var(--text) 82%, #fff 18%);
  background: color-mix(in oklab, var(--card) 62%, var(--border) 38%);
}
.form-check-label {
  color: var(--muted);
}
.btn-primary {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border: none;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in oklab, var(--accent) 22%, transparent);
}
.btn-warning {
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--warning) 88%, #ff9900 12%),
    color-mix(in oklab, var(--warning) 70%, #ff5e00 30%)
  );
  border: none;
  color: #fff;
  font-weight: 800;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 12px;
}
.alert-success {
  background: color-mix(in oklab, var(--success) 16%, transparent);
  color: color-mix(in oklab, var(--success) 85%, #eafff5 15%);
}
.alert-danger {
  background: color-mix(in oklab, var(--danger) 16%, transparent);
  color: color-mix(in oklab, var(--danger) 90%, #fff 10%);
}

/* Tables & lists */
.list-slim .list-group-item {
  background: transparent;
  border-color: color-mix(in oklab, var(--border) 60%, transparent);
  color: color-mix(in oklab, var(--text) 86%, #fff 14%);
}
.tbl-slim {
  width: 100%;
}
.tbl-slim th,
.tbl-slim td {
  padding: 10px 12px;
  border-bottom: 1px dashed color-mix(in oklab, var(--border) 60%, transparent);
}
.tbl-slim th {
  color: color-mix(in oklab, var(--text) 75%, transparent);
  font-weight: 700;
}
.badge-muted {
  background: color-mix(in oklab, var(--border) 70%, var(--card) 30%);
  color: color-mix(in oklab, var(--text) 85%, #c7d4ef 15%);
}
.text-muted {
  color: var(--muted) !important;
}

/* Danger zone */
.card.danger-zone {
  background: color-mix(in oklab, var(--danger) 8%, var(--card-2) 92%);
  border: 1px solid color-mix(in oklab, var(--danger) 25%, var(--border) 75%);
}
.card.danger-zone .text-muted {
  color: color-mix(in oklab, var(--text) 70%, #ffb4b4 30%) !important;
}
.btn-outline-danger {
  border: 1px solid color-mix(in oklab, var(--danger) 85%, var(--border) 15%);
  color: color-mix(in oklab, var(--danger) 88%, var(--text) 12%);
}
.btn-outline-danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 0 12px color-mix(in oklab, var(--danger) 60%, transparent);
}

/* Tier card benefits */
.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed color-mix(in oklab, var(--border) 70%, transparent);
  background: color-mix(in oklab, var(--card) 85%, transparent);
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: var(--text);
}
.benefit-item i {
  color: var(--success);
  filter: drop-shadow(
    0 0 6px color-mix(in oklab, var(--success) 40%, transparent)
  );
}

/* Linked accounts */
.link-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 576px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card-2);
}
.link-card .left {
  display: flex;
  flex-direction: column;
}
.link-card .brand {
  font-weight: 750;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.link-card .sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}
.link-card .right {
  display: flex;
  align-items: center;
}
.link-card.google .brand i {
  color: #ff6b6b;
}
.link-card.facebook .brand i {
  color: #3b5998;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  background: color-mix(in oklab, var(--border) 70%, var(--card) 30%);
  color: color-mix(in oklab, var(--text) 90%, #fff 10%);
  border: 1px solid var(--border);
}
.chip-ok {
  background: color-mix(in oklab, var(--success) 20%, transparent);
  border-color: color-mix(in oklab, var(--success) 45%, var(--border) 55%);
  color: color-mix(in oklab, var(--success) 85%, #eafff5 15%);
}

/* Mobile header layout (tên nằm bên phải avatar; icon upload ẩn chữ) */
@media (max-width: 968px) {
  .header {
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
  }
  .navbar-collapse {
    display: grid;
    justify-content: center;
  }
  .avatar-box {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
  }
  .avatar {
    width: 80px;
    height: 80px;
  }
  .upload-inline {
    display: none;
  } /* PC có icon-only; mobile dùng nút camera trên avatar */
  .title-row h4 {
    font-size: 1.28rem;
  }
}
.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}
.g-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}
/* ======================================================
   📱 BOTTOM NAVIGATION (MOBILE)
   ====================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: linear-gradient(90deg, var(--card-2), var(--card));
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-item {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.25s ease;
}

.bottom-nav .nav-item i {
  font-size: 1.25rem;
  line-height: 1;
}

.bottom-nav .nav-item.active {
  color: var(--brand);
}

.bottom-nav .nav-item.active i {
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(110, 168, 254, 0.45));
}

.bottom-nav .nav-item:hover {
  color: var(--brand);
}

/* Bo góc nhẹ trên mobile */
@supports (backdrop-filter: blur(10px)) {
  .bottom-nav {
    background: color-mix(in oklab, var(--card) 90%, rgba(255, 255, 255, 0.02));
  }
}

/* Safe-area (tai thỏ / iPhone X) */
@supports (padding: max(0px)) {
  .bottom-nav {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}
