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

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

:root {
  --blue-primary: #1565C0;
  --blue-dark: #0D47A1;
  --blue-light: #1E88E5;
  --blue-accent: #42A5F5;
  --blue-bg: #E3F2FD;
  --white: #ffffff;
  --text-dark: #0D1B2A;
  --text-gray: #546E7A;
  --yellow: #FFD600;
  --shadow: 0 4px 20px rgba(21,101,192,0.15);
  --radius: 10px;
}

body { font-family: 'Be Vietnam Pro', sans-serif; background: #f0f7ff; color: var(--text-dark); }

/* ===== HEADER ===== */
header { background: var(--white); box-shadow: 0 2px 12px rgba(21,101,192,0.12); position: sticky; top: 0; z-index: 1000; }

.header-top { display: flex; align-items: center; gap: 20px; padding: 12px 40px; max-width: 1280px; margin: 0 auto; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon { background: var(--blue-primary); color: white; font-weight: 800; font-size: 18px; padding: 8px 14px; border-radius: 8px; letter-spacing: 1px; }

.search-wrap { flex: 1; display: flex; align-items: center; background: var(--blue-bg); border: 2px solid var(--blue-accent); border-radius: 30px; overflow: hidden; transition: all .3s; }
.search-wrap:focus-within { border-color: var(--blue-primary); box-shadow: 0 0 0 3px rgba(21,101,192,0.15); }
.search-wrap input { flex: 1; padding: 10px 18px; border: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--text-dark); outline: none; }
.search-wrap input::placeholder { color: var(--text-gray); }
.btn-search { background: var(--blue-primary); color: white; border: none; padding: 10px 24px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 14px; transition: background .3s; }
.btn-search:hover { background: var(--blue-dark); }

.header-actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.header-actions a { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-dark); font-size: 14px; font-weight: 500; transition: color .3s; }
.header-actions a:hover { color: var(--blue-primary); }
.header-actions .icon { font-size: 20px; }
.cart-badge { position: relative; }
.badge { position: absolute; top: -8px; right: -8px; background: var(--blue-primary); color: white; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* ===== NAV ===== */
nav { background: var(--blue-primary); }
.nav-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; padding: 0 40px; }

.nav-dropdown { position: relative; }
.nav-dropdown > button { display: flex; align-items: center; gap: 8px; background: var(--blue-dark); color: white; border: none; padding: 13px 20px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 14px; transition: background .3s; }
.nav-dropdown > button:hover { background: rgba(0,0,0,0.2); }

.nav-links { display: flex; list-style: none; }
.nav-links li a { display: block; color: white; text-decoration: none; padding: 13px 18px; font-size: 14px; font-weight: 500; transition: background .3s; white-space: nowrap; }
.nav-links li a:hover, .nav-links li a.active { background: rgba(255,255,255,0.18); border-radius: 4px; }

/* Dropdown menu */
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: white; border-radius: 0 0 12px 12px; box-shadow: var(--shadow); min-width: 220px; z-index: 999; border-top: 3px solid var(--blue-primary); }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: var(--text-dark); text-decoration: none; font-size: 14px; transition: background .2s; }
.dropdown-menu a:hover { background: var(--blue-bg); color: var(--blue-primary); }
.nav-dropdown:hover .dropdown-menu { display: block; }

/* ===== MAIN ===== */
main { max-width: 1280px; margin: 0 auto; padding: 24px 40px; }

/* ===== SLIDER ===== */
.slider-section { border-radius: 16px; overflow: hidden; position: relative; margin-bottom: 28px; box-shadow: var(--shadow); }
.slides { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.slide { min-width: 100%; position: relative; background: var(--blue-bg); }
.slide img { width: 100%; height: 420px; object-fit: contain; display: block; }

/* Slider controls */
.slider-prev, .slider-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.9); border: none; width: 42px; height: 42px; border-radius: 50%; font-size: 18px; cursor: pointer; transition: all .3s; z-index: 10; box-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
.slider-prev:hover, .slider-next:hover { background: var(--blue-primary); color: white; }

.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); border: none; cursor: pointer; transition: all .3s; }
.dot.active { background: white; transform: scale(1.3); }

/* ===== FEATURE CARDS ===== */
.feature-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.feature-card { background: var(--blue-primary); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: all .3s; color: white; text-decoration: none; box-shadow: var(--shadow); }
.feature-card:hover { background: var(--blue-dark); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(21,101,192,0.3); }
.feature-card .card-icon { font-size: 36px; flex-shrink: 0; }
.feature-card .card-info .label { font-size: 11px; opacity: 0.85; text-transform: uppercase; letter-spacing: 1px; }
.feature-card .card-info strong { display: block; font-size: 15px; font-weight: 700; }

/* ===== SECTION TITLE ===== */
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-title h2 { font-size: 22px; font-weight: 800; color: var(--blue-dark); }
.section-title .line { flex: 1; height: 2px; background: linear-gradient(to right, var(--blue-accent), transparent); }
.section-title a { color: var(--blue-primary); text-decoration: none; font-size: 13px; font-weight: 600; }
.section-title a:hover { text-decoration: underline; }

/* ===== PRODUCT GRID ===== */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; }

.product-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 12px rgba(21,101,192,0.08); transition: all .3s; border: 1px solid rgba(21,101,192,0.08); cursor: pointer; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(21,101,192,0.2); border-color: var(--blue-accent); }

.product-img { position: relative; background: var(--blue-bg); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-img img { width: 80%; height: 80%; object-fit: contain; transition: transform .4s; }
.product-card:hover .product-img img { transform: scale(1.08); }
.product-badge { position: absolute; top: 10px; left: 10px; background: var(--blue-primary); color: white; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.badge-sale { background: #E53935; }
.badge-new { background: #00897B; }

.product-info { padding: 14px; }
.product-info h3 { font-size: 14px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-info .stars { color: #FFA726; font-size: 13px; margin-bottom: 6px; }
.product-info .price-row { display: flex; align-items: center; gap: 8px; }
.product-info .price { font-size: 18px; font-weight: 800; color: var(--blue-primary); }
.product-info .price-old { font-size: 13px; color: var(--text-gray); text-decoration: line-through; }
.product-info .discount { background: #FFEBEE; color: #E53935; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }

.btn-add { width: 100%; margin-top: 10px; background: var(--blue-bg); color: var(--blue-primary); border: 1.5px solid var(--blue-accent); padding: 9px; border-radius: 8px; font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer; transition: all .3s; }
.btn-add:hover { background: var(--blue-primary); color: white; }

/* ===== BANNER MID ===== */
.banner-mid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 36px; }
.banner-card { border-radius: var(--radius); overflow: hidden; position: relative; height: 180px; cursor: pointer; box-shadow: var(--shadow); }
.banner-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.banner-card:hover img { transform: scale(1.04); }
.banner-card .overlay { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(13,71,161,0.8) 0%, transparent 70%); display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.banner-card .overlay h3 { color: white; font-size: 20px; font-weight: 800; }
.banner-card .overlay p { color: rgba(255,255,255,0.85); font-size: 13px; margin-top: 4px; }
.banner-card .overlay .tag { background: var(--yellow); color: #333; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; display: inline-block; margin-top: 10px; }

/* ===== FOOTER ===== */
footer { background: var(--blue-dark); color: rgba(255,255,255,0.85); padding: 48px 40px 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; max-width: 1280px; margin: 0 auto 36px; }
.footer-col h4 { color: white; font-size: 15px; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--blue-accent); display: inline-block; }
.footer-col p, .footer-col li { font-size: 13.5px; line-height: 1.8; list-style: none; }
.footer-col a { color: rgba(255,255,255,0.75); text-decoration: none; transition: color .3s; }
.footer-col a:hover { color: var(--blue-accent); }
.footer-col .logo-text { font-size: 22px; font-weight: 800; color: white; background: rgba(255,255,255,0.15); padding: 10px 18px; border-radius: 8px; display: inline-block; margin-bottom: 14px; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-btn { width: 38px; height: 38px; background: rgba(255,255,255,0.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; font-size: 16px; transition: all .3s; }
.social-btn:hover { background: var(--blue-accent); transform: translateY(-3px); }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; font-size: 13px; max-width: 1280px; margin: 0 auto; color: rgba(255,255,255,0.5); }

/* ===== NAV HAMBURGER (mobile only) ===== */
.nav-hamburger { display: none; }
.nav-close-btn  { display: none; } /* cu, giu de khong loi */

/* ===== RESPONSIVE – TABLET (<=1024px) ===== */
@media(max-width: 1024px) {
  main { padding: 20px 24px; }
  .header-top { padding: 12px 24px; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-inner { padding: 0 24px; }
}

/* ===== RESPONSIVE – MOBILE (<=768px) ===== */
@media(max-width: 768px) {

  /* --- HEADER stack 3 hang --- */
  .header-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }
  .logo { justify-content: center; }
  .search-wrap { width: 100%; }
  .header-actions {
    display: flex;
    justify-content: center;
    gap: 32px;
  }

  /* --- NAV --- */
  nav { position: relative; }
  .nav-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-wrap: wrap;
  }

  /* Nav links: an mac dinh, hien khi .open */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--text-dark);
    list-style: none;
    order: 3;  /* xuat hien ben duoi thanh nav */
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid rgba(255,255,255,0.07); }
  .nav-links li a {
    display: block;
    padding: 14px 24px;
    text-align: center;
    font-size: 15px;
    color: white;
    font-weight: 500;
  }
  .nav-links li a:hover,
  .nav-links li a.active { background: rgba(255,255,255,0.12); border-radius: 0; }

  /* --- HAMBURGER nut 3 gach, ben phai nav --- */
  .nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    padding: 6px 4px;
    line-height: 1;
    transition: opacity .2s;
    order: 2;
  }
  .nav-hamburger:hover { opacity: 0.75; }

  /* nav-dropdown nam ben trai */
  .nav-dropdown { order: 1; }
  .nav-dropdown > button { font-size: 14px; padding: 13px 16px; }

  /* Dropdown danh muc: mo rong toan bo chieu ngang */
  .dropdown-menu { min-width: 220px; }

  /* --- MAIN --- */
  main { padding: 16px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-mid { grid-template-columns: 1fr; }
  .slide img { height: 220px; }
  .feature-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature-card { padding: 14px 12px; gap: 10px; }
  .feature-card .card-icon { font-size: 28px; }

  /* --- FOOTER --- */
  footer { padding: 32px 16px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ===== RESPONSIVE – SMALL MOBILE (<=480px) ===== */
@media(max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature-cards { grid-template-columns: 1fr; }
  .slide img { height: 180px; }
}

/* ========================================
   CONTACT PAGE (lienhe.html)
======================================== */
.contact-wrapper { max-width: 900px; margin: 48px auto; padding: 0 24px 64px; }

.contact-title { text-align: center; font-size: 32px; font-weight: 800; letter-spacing: 3px; color: var(--text-dark); margin-bottom: 36px; position: relative; }
.contact-title::after { content: ''; display: block; width: 64px; height: 3px; background: var(--blue-primary); margin: 12px auto 0; border-radius: 2px; }

.contact-box { background: var(--white); border: 1px solid rgba(21,101,192,0.12); border-radius: 16px; padding: 40px 48px 48px; box-shadow: 0 4px 24px rgba(21,101,192,0.10); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 0; }
.form-group { display: flex; align-items: center; border: 1px solid #d0ddf5; padding: 0; background: var(--white); }
.form-row .form-group:first-child { border-right: none; }
.form-row + .form-row .form-group { border-top: none; }
.form-full { border: 1px solid #d0ddf5; border-top: none; background: var(--white); display: flex; flex-direction: column; }

.form-group label, .form-full label { font-size: 14px; font-weight: 600; color: var(--text-dark); white-space: nowrap; padding: 14px 14px 14px 20px; min-width: 110px; }
.form-full label { padding-bottom: 0; }

.form-group input { flex: 1; border: none; outline: none; padding: 14px 16px; font-family: inherit; font-size: 14px; color: var(--text-dark); background: transparent; }
.form-group input::placeholder { color: #aab4c8; }
.form-group input:focus { background: #f0f7ff; }

.form-full textarea { border: none; outline: none; resize: vertical; min-height: 160px; padding: 12px 20px 16px; font-family: inherit; font-size: 14px; color: var(--text-dark); background: transparent; line-height: 1.6; }
.form-full textarea::placeholder { color: #aab4c8; }
.form-full textarea:focus { background: #f0f7ff; }

.form-submit { text-align: center; margin-top: 32px; }
.btn-submit { background: var(--blue-primary); color: white; border: none; padding: 13px 44px; border-radius: 8px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: 0.5px; transition: all .3s; box-shadow: 0 4px 16px rgba(21,101,192,0.25); }
.btn-submit:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13,71,161,0.35); }
.btn-submit:active { transform: translateY(0); }

.msg-success { display: none; background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; border-radius: 10px; padding: 16px 24px; text-align: center; font-size: 15px; font-weight: 600; margin-top: 24px; }
.form-group.error input, .form-full.error textarea { background: #fff5f5; }
.form-group.error label, .form-full.error label { color: #e53935; }

.contact-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.info-card { background: var(--white); border: 1px solid rgba(21,101,192,0.12); border-radius: 12px; padding: 24px 20px; text-align: center; box-shadow: 0 2px 10px rgba(21,101,192,0.07); transition: all .3s; }
.info-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(21,101,192,0.15); border-color: var(--blue-accent); }
.info-card .ic-icon { font-size: 32px; margin-bottom: 10px; }
.info-card h4 { font-size: 15px; font-weight: 700; color: var(--blue-primary); margin-bottom: 6px; }
.info-card p { font-size: 13.5px; color: var(--text-gray); line-height: 1.6; }

@media(max-width: 640px) {
  .contact-box { padding: 24px 16px 32px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row .form-group:first-child { border-right: 1px solid #d0ddf5; border-bottom: none; }
  .contact-info { grid-template-columns: 1fr; }
}

/* ========================================
   BLOG PAGE (blog.html)
======================================== */
.blog-wrapper { max-width: 1280px; margin: 36px auto; padding: 0 40px 64px; display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }

.blog-main h2, .blog-sidebar h2 { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--blue-accent); }

.posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.post-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(21,101,192,0.08); border: 1px solid rgba(21,101,192,0.08); cursor: pointer; transition: all .3s; text-decoration: none; color: inherit; display: block; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(21,101,192,0.18); border-color: var(--blue-accent); }

.post-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--blue-bg); }

.post-body { padding: 16px; }
.post-body h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; line-height: 1.4; text-transform: uppercase; }
.post-body p { font-size: 13px; color: var(--text-gray); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-body p a { color: var(--blue-primary); text-decoration: none; }
.post-meta { margin-top: 10px; font-size: 12px; color: #aab4c8; display: flex; align-items: center; gap: 8px; }
.post-meta span { font-style: italic; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.page-btn { width: 36px; height: 36px; border: 1.5px solid var(--blue-accent); border-radius: 8px; background: white; color: var(--blue-primary); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .25s; display: flex; align-items: center; justify-content: center; }
.page-btn:hover, .page-btn.active { background: var(--blue-primary); color: white; border-color: var(--blue-primary); }

.blog-sidebar { position: sticky; top: 80px; }
.sidebar-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #e8f0fe; cursor: pointer; text-decoration: none; color: inherit; transition: all .25s; }
.sidebar-card:last-child { border-bottom: none; }
.sidebar-card:hover .sc-title { color: var(--blue-primary); }
.sc-thumb { width: 72px; height: 52px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--blue-bg); }
.sc-info { flex: 1; }
.sc-title { font-size: 13px; font-weight: 600; color: var(--text-dark); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .25s; }
.sc-date { font-size: 11px; color: #aab4c8; margin-top: 4px; }
.sc-date::before { content: '• '; }

.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-tag { background: var(--blue-bg); color: var(--blue-primary); border: 1.5px solid var(--blue-accent); padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .25s; font-family: inherit; }
.filter-tag:hover, .filter-tag.active { background: var(--blue-primary); color: white; border-color: var(--blue-primary); }

.post-card.hidden { display: none; }

@media(max-width: 1024px) {
  .blog-wrapper { grid-template-columns: 1fr; padding: 0 24px 48px; }
  .blog-sidebar { position: static; }
}
@media(max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
}


/* ========================================
   LAB PAGE (lab.html)
======================================== */
.lab-wrapper { max-width: 1280px; margin: 36px auto; padding: 0 40px 64px; }
.lab-header { text-align: center; margin-bottom: 32px; }
.lab-header h1 { font-size: 28px; font-weight: 800; color: var(--blue-dark); margin-bottom: 8px; }
.lab-header p { font-size: 15px; color: var(--text-gray); }

.lab-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.lab-card { background: var(--white); border: 1px solid #dde7f7; border-radius: 10px; padding: 20px 20px 16px; box-shadow: 0 2px 10px rgba(21,101,192,0.07); display: flex; flex-direction: column; transition: all .3s; }
.lab-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(21,101,192,0.15); border-color: var(--blue-accent); }
.lab-card-title { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 14px; line-height: 1.4; }

.lab-files { list-style: none; flex: 1; margin-bottom: 16px; }
.lab-files li { margin-bottom: 6px; }
.lab-files a { font-size: 13.5px; color: var(--blue-primary); text-decoration: none; transition: color .2s; }
.lab-files a:hover { color: var(--blue-dark); text-decoration: underline; }

.btn-lab-detail { display: block; width: 100%; background: var(--blue-primary); color: white; border: none; padding: 10px; border-radius: 6px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none; transition: all .25s; margin-top: auto; }
.btn-lab-detail:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(13,71,161,0.3); }

.lab-modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; }
.lab-modal-bg.open { display: flex; }
.lab-modal { background: white; border-radius: 16px; padding: 36px 40px; max-width: 540px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); position: relative; animation: modalIn .25s ease; }
@keyframes modalIn { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
.lab-modal h3 { font-size: 20px; font-weight: 800; color: var(--blue-dark); margin-bottom: 16px; }
.lab-modal ul { list-style: none; margin-bottom: 24px; }
.lab-modal ul li { padding: 10px 0; border-bottom: 1px solid #e8f0fe; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.lab-modal ul li:last-child { border-bottom: none; }
.lab-modal ul li a { color: var(--blue-primary); text-decoration: none; font-weight: 600; }
.lab-modal ul li a:hover { text-decoration: underline; }
.lab-modal-close { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-gray); transition: color .2s; }
.lab-modal-close:hover { color: var(--text-dark); }
.lab-modal-footer { display: flex; justify-content: flex-end; }
.btn-modal-close { background: var(--blue-bg); color: var(--blue-primary); border: 1.5px solid var(--blue-accent); padding: 9px 24px; border-radius: 8px; font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: all .25s; }
.btn-modal-close:hover { background: var(--blue-primary); color: white; }

@media(max-width: 1024px) { .lab-wrapper { padding: 0 24px 48px; } .lab-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 540px) { .lab-grid { grid-template-columns: 1fr; } }

/* ========================================
   LOGIN PAGE (dangnhap.html)
======================================== */
.login-wrapper {
  max-width: 540px;
  margin: 56px auto 80px;
  padding: 0 20px;
}

.login-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-dark);
  margin-bottom: 28px;
  position: relative;
}
.login-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--blue-primary);
  margin: 10px auto 0;
  border-radius: 2px;
}

.login-box {
  background: var(--white);
  border: 1px solid #dde7f7;
  border-radius: 14px;
  padding: 36px 40px 32px;
  box-shadow: 0 4px 24px rgba(21,101,192,0.10);
}

/* Each field row: label | input */
.login-field {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  border: 1px solid #dde7f7;
  margin-bottom: -1px; /* collapse borders */
  background: var(--white);
}
.login-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 13px 12px 13px 16px;
  white-space: nowrap;
}
.login-field input {
  border: none;
  outline: none;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-dark);
  background: transparent;
  width: 100%;
}
.login-field input::placeholder { color: #aab4c8; }
.login-field input:focus { background: #f0f7ff; }
.login-field.error { border-color: #e53935; }
.login-field.error label { color: #e53935; }
.login-field.error input { background: #fff5f5; }

/* Password wrapper with toggle button */
.pass-wrap {
  display: flex;
  align-items: center;
  position: relative;
}
.pass-wrap input { flex: 1; padding-right: 40px; }
.toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-gray);
  padding: 0;
  line-height: 1;
  transition: color .2s;
}
.toggle-pass:hover { color: var(--blue-primary); }

/* Quên mật khẩu */
.login-forgot {
  text-align: right;
  margin: 14px 0 18px;
}
.login-forgot a {
  font-size: 13.5px;
  color: var(--blue-primary);
  text-decoration: none;
}
.login-forgot a:hover { text-decoration: underline; }

/* Submit button */
.login-submit { text-align: center; }
.btn-login {
  background: var(--blue-dark);
  color: white;
  border: none;
  padding: 12px 48px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all .3s;
  box-shadow: 0 4px 14px rgba(13,71,161,0.25);
}
.btn-login:hover { background: var(--blue-primary); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(21,101,192,0.3); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Error message */
.login-error {
  color: #e53935;
  font-size: 13px;
  text-align: center;
  min-height: 20px;
  margin-top: 12px;
}

/* Đăng ký link */
.login-register {
  text-align: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-gray);
}
.login-register a {
  color: var(--blue-primary);
  text-decoration: none;
  font-weight: 600;
}
.login-register a:hover { text-decoration: underline; }

@media(max-width: 480px) {
  .login-box { padding: 24px 16px 20px; }
  .login-field { grid-template-columns: 80px 1fr; }
}
