/* Tuan02 - Giao dien gon, phu hop bai thuc hanh MVC.
   Muon doi mau: sua --primary va cac mau --*-soft ben duoi. */
:root {
  --primary: #3563d9;
  --primary-hover: #254db1;
  --blue-soft: #eaf0ff;
  --mint-soft: #e8f7f1;
  --purple-soft: #f1edff;
  --text: #25334a;
  --muted: #6c7890;
  --border: #e0e7f0;
  --background: #f6f8fc;
  --white: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; color: var(--text); background: var(--background); font-family: 'Segoe UI', Tahoma, Arial, sans-serif; font-size: 15px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button, input, textarea { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #8eaaff; outline-offset: 2px; }
.app-container { max-width: 1160px; }
.site-main { min-height: calc(100vh - 165px); }

/* Menu */
.site-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--border); }
.main-nav { padding: 11px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 750; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-symbol { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 9px; background: var(--primary); color: white; font-size: 15px; font-weight: 800; }
.brand-text { letter-spacing: -.4px; }
.nav-items { gap: 9px; }
.nav-items .nav-link { padding: 8px 13px !important; color: #58657b; font-size: 14px; font-weight: 600; border-radius: 7px; }
.nav-items .nav-link.is-active { color: var(--primary); background: var(--blue-soft); }
.nav-items .nav-link:hover { color: var(--primary); background: #f0f4fb; }
.nav-cta { display: inline-flex; gap: 8px; align-items: center; justify-content: center; margin-left: 6px; padding: 8px 16px; background: var(--primary); color: white; font-weight: 650; font-size: 14px; border-radius: 8px; transition: background .2s; }
.nav-cta span { font-size: 19px; line-height: 1; }
.nav-cta:hover { background: var(--primary-hover); color: white; }
.custom-toggler { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }

/* Buttons */
.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 650; transition: background .18s, border-color .18s, transform .18s; }
.button-primary { background: var(--primary); color: white; }
.button-primary:hover { background: var(--primary-hover); color: white; transform: translateY(-1px); }
.button-secondary { background: white; border-color: #cad5e5; color: #37527c; }
.button-secondary:hover { background: #f3f7ff; color: var(--primary); border-color: #b5c7ee; }
.page-enter { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from {opacity: 0} to {opacity: 1} }

/* Trang chu */
.home-intro { padding-top: 60px; padding-bottom: 35px; }
.home-intro-content { max-width: 100%; padding: 43px 46px; background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--primary); border-radius: 11px; }
.home-intro h1 { margin: 0 0 13px; font-size: clamp(31px, 4vw, 43px); font-weight: 750; line-height: 1.25; letter-spacing: -.8px; }
.home-intro p { margin: 0; color: var(--muted); max-width: 690px; font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.features-section { padding-bottom: 85px; }
.features-section > h2 { margin: 8px 0 21px; font-size: 25px; font-weight: 730; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.feature-card { display: flex; flex-direction: column; min-height: 225px; padding: 25px; background: white; border: 1px solid var(--border); border-radius: 11px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.feature-card:hover { color: var(--text); transform: translateY(-3px); border-color: #bbc9ed; box-shadow: 0 7px 20px rgba(38,64,119,.07); }
.feature-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 9px; margin-bottom: 19px; font-size: 26px; font-weight: 600; line-height: 1; }
.feature-blue .feature-icon { background: var(--blue-soft); color: #3c61c1; }
.feature-purple .feature-icon { background: var(--purple-soft); color: #8064c9; }
.feature-mint .feature-icon { background: var(--mint-soft); color: #219777; }
.feature-card h3 { font-size: 19px; font-weight: 700; margin: 0 0 7px; }
.feature-card p { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.feature-link { color: var(--primary); font-weight: 650; font-size: 13px; margin-top: auto; }

/* Trang san pham */
.inner-page { padding-top: 48px; padding-bottom: 84px; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-intro h1, .simple-page-heading h1 { margin: 0 0 8px; font-size: clamp(29px,3.8vw,38px); font-weight: 750; letter-spacing: -.6px; }
.page-intro p, .simple-page-heading > p { margin: 0; color: var(--muted); }
.page-stat { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border: 1px solid var(--border); background: white; border-radius: 9px; white-space: nowrap; }
.page-stat strong { color: var(--primary); font-size: 26px; font-weight: 750; }
.page-stat span { color: var(--muted); font-size: 13px; }
.search-bar-panel { display: flex; align-items: center; gap: 25px; margin-bottom: 22px; padding: 20px 24px; background: #fff; border: 1px solid var(--border); border-radius: 11px; }
.search-bar-panel h2 { flex: 0 0 auto; margin: 0; font-size: 17px; font-weight: 700; }
.search-form { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; }
.search-form input { flex: 1; min-width: 0; height: 43px; padding: 9px 13px; border: 1px solid #cdd7e6; border-radius: 7px; background: white; color: var(--text); }
.search-form input:focus { border-color: #8eaaff; outline: 0; box-shadow: 0 0 0 3px #e5edff; }
.search-form button { flex: 0 0 auto; border: 0; border-radius: 7px; padding: 10px 18px; min-height: 43px; background: var(--primary); color: white; font-weight: 650; }
.search-form button:hover { background: var(--primary-hover); }
.product-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(220px,.75fr); gap: 20px; align-items: start; }
.form-card, .guide-card, .about-main, .about-side { background: white; border: 1px solid var(--border); border-radius: 11px; padding: 28px; }
.form-card h2 { margin: 0; font-size: 23px; font-weight: 720; }
.product-form { margin-top: 23px; }
.product-form .form-label { margin-bottom: 7px; color: #34435b; font-weight: 650; font-size: 14px; }
.product-form .form-label span { color: #cc4866; }
.product-form .form-control { min-height: 44px; border: 1px solid #cdd7e6; border-radius: 7px; padding: 10px 12px; font-size: 14px; }
.product-form textarea.form-control { min-height: 100px; resize: vertical; }
.product-form .form-control:focus { border-color: #8eaaff; box-shadow: 0 0 0 3px #e5edff; }
.form-submit { min-width: 170px; }
.guide-card { background: #f0f6ff; border-color: #d5e1f6; }
.guide-card h3 { font-size: 19px; font-weight: 710; margin: 0 0 12px; }
.guide-card ul { margin: 0; padding-left: 20px; color: #566984; font-size: 14px; }
.guide-card li { margin-bottom: 10px; }
.guide-card li:last-child { margin-bottom: 0; }

/* Bang du lieu */
.list-section { margin-top: 38px; }
.list-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.list-title-row h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 720; }
.count-bubble { display: inline-grid; place-items: center; min-width: 27px; height: 27px; padding: 2px 8px; background: var(--blue-soft); color: var(--primary); border-radius: 6px; font-size: 13px; font-weight: 700; }
.table-frame, .search-result-panel { overflow: hidden; background: white; border: 1px solid var(--border); border-radius: 11px; }
.product-table { width: 100%; min-width: 540px; margin: 0; font-size: 14px; vertical-align: middle; }
.product-table thead th { background: #edf3fc; color: #394b65; font-weight: 700; padding: 14px 17px; white-space: nowrap; border-bottom: 1px solid #dce4ef; }
.product-table tbody td { padding: 15px 17px; color: #4e5e74; border-bottom: 1px solid #eaf0f5; }
.product-table tbody tr:last-child td { border-bottom: 0; }
.product-table tbody tr:hover td { background: #f8faff; }
.code-chip { font-weight: 700; color: #3c5eb5; }
.product-table tbody .product-name { color: #273951; font-weight: 650; }
.product-description { max-width: 430px; overflow-wrap: anywhere; }
.empty-state { text-align: center; border: 1px dashed #c4d1e4; border-radius: 11px; padding: 35px 20px; background: white; }
.empty-state h3 { margin: 0 0 8px; font-weight: 700; font-size: 19px; }
.empty-state p { margin: 0 0 15px; color: var(--muted); }
.empty-state a { color: var(--primary); font-weight: 650; }

/* Tim kiem */
.simple-page-heading { margin-bottom: 23px; }
.back-link { display: inline-block; color: var(--primary); font-size: 14px; font-weight: 650; margin-bottom: 18px; }
.search-result-panel { padding: 24px; }
.search-form-large { margin-bottom: 25px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.results-heading h2 { margin: 0; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.result-pill { display: inline-block; flex: 0 0 auto; background: var(--mint-soft); color: #18795e; padding: 5px 11px; border-radius: 6px; font-size: 13px; font-weight: 650; }
.compact-empty { border: 0; padding-top: 25px; padding-bottom: 25px; }

/* Them thanh cong */
.success-hero { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 26px; background: #f0faf5; border: 1px solid #c8e8d5; border-radius: 11px; }
.success-icon { display: grid; place-items: center; flex: 0 0 auto; width: 49px; height: 49px; background: #d8f2e5; color: #188558; font-size: 27px; font-weight: 700; border-radius: 50%; }
.success-hero h1 { font-size: 23px; font-weight: 730; margin: 0 0 5px; }
.success-hero p { color: #597663; margin: 0; }
.success-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.result-list { margin-top: 32px; }

/* Gioi thieu */
.about-grid { display: grid; grid-template-columns: 1.55fr .85fr; gap: 20px; }
.about-main h2 { font-size: 22px; margin: 0 0 17px; font-weight: 720; }
.about-main p { color: var(--muted); margin-bottom: 16px; }
.about-main .button-primary { margin-top: 7px; }
.about-side { background: #edf3ff; }
.about-side h3 { font-size: 19px; font-weight: 700; margin: 0 0 16px; }
.about-side ul { padding-left: 20px; margin: 0 0 18px; }
.about-side li { margin-bottom: 6px; }
.about-side p { color: #55657a; font-size: 13px; margin: 0; }

/* Footer */
.site-footer { background: white; border-top: 1px solid var(--border); }
.footer-inner { min-height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #647288; font-size: 13px; }
.footer-muted { color: #8792a5; }

@media (max-width: 991px) {
  .nav-items { padding-top: 12px; align-items: stretch !important; }
  .nav-cta { margin: 8px 0 5px; }
  .product-layout { grid-template-columns: 1fr; }
  .search-bar-panel { display: block; }
  .search-bar-panel h2 { margin-bottom: 14px; }
  .success-actions { margin-left: 0; }
}
@media (max-width: 767px) {
  .app-container { padding-left: 18px; padding-right: 18px; }
  .home-intro { padding-top: 33px; padding-bottom: 29px; }
  .home-intro-content { padding: 29px 24px; }
  .home-intro p { font-size: 14px; }
  .feature-grid { grid-template-columns: 1fr; gap: 13px; }
  .feature-card { min-height: auto; padding: 20px; }
  .feature-icon { margin-bottom: 14px; }
  .features-section { padding-bottom: 45px; }
  .features-section > h2 { font-size: 22px; }
  .inner-page { padding-top: 30px; padding-bottom: 50px; }
  .page-intro { align-items: start; }
  .page-stat { padding: 8px 12px; }
  .form-card, .guide-card, .about-main, .about-side, .search-result-panel { padding: 21px; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
  .results-heading h2 { font-size: 18px; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .page-intro { display: block; }
  .page-stat { display: inline-flex; margin-top: 15px; }
  .search-form { flex-direction: column; align-items: stretch; }
  .search-form input, .search-form button { width: 100%; }
  .success-hero { align-items: flex-start; }
  .success-actions { width: 100%; }
  .success-actions a { flex: 1 0 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
