/* ==========================================================================
   timgiayto.com.vn — public theme
   ========================================================================== */
:root {
  --tgt-primary: #0f6fb5;
  --tgt-primary-dark: #0b5589;
  --tgt-primary-soft: #e7f1fa;
  --tgt-lost: #d9480f;
  --tgt-lost-soft: #fff1ea;
  --tgt-found: #0f8a5f;
  --tgt-found-soft: #e6f6ef;
  --tgt-bg: #f4f6f9;
  --tgt-card: #ffffff;
  --tgt-text: #1f2937;
  --tgt-muted: #6b7280;
  --tgt-border: #e5e9f0;
  --tgt-radius: 14px;
  --tgt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --bs-primary: var(--tgt-primary);
  --bs-primary-rgb: 15, 111, 181;
  --bs-link-color: var(--tgt-primary);
  --bs-link-hover-color: var(--tgt-primary-dark);
  --bs-body-font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--tgt-text);
  --bs-body-bg: var(--tgt-bg);
  --bs-border-color: var(--tgt-border);
}
html { scroll-behavior: smooth; }
body { background: var(--tgt-bg); color: var(--tgt-text); font-size: 15px; min-height: 100vh; display: flex; flex-direction: column; }
main.site-main { flex: 1; padding: 24px 0 40px; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--tgt-primary); border-color: var(--tgt-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--tgt-primary-dark); border-color: var(--tgt-primary-dark); }
.btn-outline-primary { color: var(--tgt-primary); border-color: var(--tgt-primary); }
.btn-outline-primary:hover { background: var(--tgt-primary); border-color: var(--tgt-primary); }
.btn-lost { background: var(--tgt-lost); color: #fff; border: 0; }
.btn-lost:hover { background: #b93c0a; color: #fff; }
.btn-found { background: var(--tgt-found); color: #fff; border: 0; }
.btn-found:hover { background: #0b6f4c; color: #fff; }
.text-lost { color: var(--tgt-lost) !important; }
.text-found { color: var(--tgt-found) !important; }
.bg-lost-soft { background: var(--tgt-lost-soft); }
.bg-found-soft { background: var(--tgt-found-soft); }
.card { border: 1px solid var(--tgt-border); border-radius: var(--tgt-radius); box-shadow: var(--tgt-shadow); background: var(--tgt-card); }
.form-control, .form-select { border-radius: 10px; border-color: #d5dbe4; padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--tgt-primary); box-shadow: 0 0 0 .2rem rgba(15,111,181,.15); }
.form-label { font-weight: 600; font-size: .9rem; }
.badge { font-weight: 600; letter-spacing: .01em; }
.page-title { font-weight: 800; font-size: 1.5rem; margin-bottom: .25rem; }
.section-title { font-weight: 800; font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: .5rem; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--tgt-border); position: sticky; top: 0; z-index: 1030; }
.site-header .navbar { padding: .55rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.35rem; color: var(--tgt-text); }
.navbar-brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--tgt-primary), #1e9bd7); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(15,111,181,.3); }
.brand-text span { color: var(--tgt-primary); }
.brand-text small { font-size: .7rem; color: var(--tgt-muted); font-weight: 600; margin-left: 2px; }
.navbar-nav .nav-link { font-weight: 600; color: #374151; padding: .5rem .9rem !important; border-radius: 9px; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--tgt-primary); background: var(--tgt-primary-soft); }
.btn-post { background: linear-gradient(135deg, var(--tgt-lost), #f0762d); color: #fff; border: 0; box-shadow: 0 4px 12px rgba(217,72,15,.3); }
.btn-post:hover { color: #fff; filter: brightness(1.05); }
.btn-user { border-radius: 10px; font-weight: 600; background: #f1f4f8; border: 1px solid var(--tgt-border); }
.navbar-toggler { border: 1px solid var(--tgt-border); border-radius: 10px; }
.warning-bar { background: #fff8e6; color: #7a4b00; border-top: 1px solid #f5e3b3; font-size: .85rem; padding: .5rem 0; }
.warning-bar i { color: #e69b00; font-size: 1rem; margin-top: 1px; }
.btn-close-sm { font-size: .65rem; margin-top: 3px; }

/* ---------- Sidebar ---------- */
.sidebar-sticky { position: sticky; top: 84px; }
.card-cta { background: linear-gradient(160deg, #ffffff, #f2f7fc); }
.sidebar-banners { display: flex; flex-direction: column; gap: 12px; }
.banner-item { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--tgt-border); background: #fff; box-shadow: var(--tgt-shadow); transition: transform .15s; }
.banner-item:hover { transform: translateY(-2px); }
.banner-item img { width: 100%; display: block; }
.side-box { margin-top: 1rem; }
.side-box h6 { font-weight: 700; font-size: .95rem; margin-bottom: .6rem; }
.side-box .list-group-item { border-color: var(--tgt-border); font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, #0b5589 0%, #0f6fb5 55%, #1e9bd7 100%); color: #fff; border-radius: 18px; padding: 34px 28px 28px; position: relative; overflow: hidden; margin-bottom: 20px; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero::before { content: ""; position: absolute; left: 40%; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.06); }
.hero h1 { font-weight: 800; font-size: 1.85rem; line-height: 1.25; position: relative; }
.hero p { color: rgba(255,255,255,.85); position: relative; }
.hero .search-box { background: #fff; border-radius: 14px; padding: 10px; position: relative; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.hero .search-box .form-control, .hero .search-box .form-select { border: 0; background: #f4f6f9; }
.hero .search-box .form-control::placeholder { font-size: .9rem; }
.hero .search-box .form-control-lg, .hero .search-box .form-select-lg { font-size: 1rem; }
.hero .stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; position: relative; }
.hero .stat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 8px 14px; min-width: 120px; }
.hero .stat b { display: block; font-size: 1.3rem; }
.hero .stat span { font-size: .78rem; opacity: .85; }
.doc-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }
.doc-chip { background: #fff; border: 1px solid var(--tgt-border); border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 600; color: #374151; display: inline-flex; align-items: center; gap: 6px; }
.doc-chip:hover { border-color: var(--tgt-primary); color: var(--tgt-primary); text-decoration: none; }
.doc-chip i { color: var(--tgt-primary); }

/* ---------- Post cards ---------- */
.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-card { display: flex; gap: 14px; background: #fff; border: 1px solid var(--tgt-border); border-radius: var(--tgt-radius); padding: 12px; box-shadow: var(--tgt-shadow); transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: 0 8px 24px rgba(16,24,40,.1); transform: translateY(-1px); }
.post-card .thumb { width: 96px; height: 96px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: #eef2f6; display: flex; align-items: center; justify-content: center; color: #9aa5b5; font-size: 1.8rem; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { flex: 1; min-width: 0; }
.post-card .title { font-weight: 700; font-size: 1rem; line-height: 1.35; margin: 4px 0 4px; color: var(--tgt-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .title:hover { color: var(--tgt-primary); }
.post-card .excerpt { color: var(--tgt-muted); font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.post-card .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--tgt-muted); }
.post-card .meta i { margin-right: 3px; }
.type-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.type-badge.lost { background: var(--tgt-lost-soft); color: var(--tgt-lost); }
.type-badge.found { background: var(--tgt-found-soft); color: var(--tgt-found); }
.status-badge { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.post-card.resolved { opacity: .75; }
.post-card.pinned { border-color: #f5c542; background: #fffdf5; }
.nav-pills .nav-link { border-radius: 10px; font-weight: 600; color: #374151; }
.nav-pills .nav-link.active { background: var(--tgt-primary); }
.filter-bar { background: #fff; border: 1px solid var(--tgt-border); border-radius: var(--tgt-radius); padding: 12px; margin-bottom: 14px; }
.pagination .page-link { border-radius: 8px; margin: 0 2px; border-color: var(--tgt-border); color: var(--tgt-text); font-weight: 600; }
.pagination .page-item.active .page-link { background: var(--tgt-primary); border-color: var(--tgt-primary); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--tgt-muted); }
.empty-state i { font-size: 3rem; opacity: .4; }

/* ---------- Post detail ---------- */
.post-detail .card-body { padding: 22px; }
.post-detail h1 { font-size: 1.45rem; font-weight: 800; line-height: 1.3; }
.post-detail .content { white-space: pre-line; line-height: 1.7; font-size: 1rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 16px 0; }
.info-item { background: #f7f9fc; border: 1px solid var(--tgt-border); border-radius: 10px; padding: 10px 12px; }
.info-item small { display: block; color: var(--tgt-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.info-item b { font-weight: 600; }
.contact-box { border: 2px dashed var(--tgt-primary); background: var(--tgt-primary-soft); border-radius: 12px; padding: 16px; }
.contact-box .phone { font-size: 1.4rem; font-weight: 800; color: var(--tgt-primary); letter-spacing: .03em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: #eef2f6; border: 1px solid var(--tgt-border); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery a:hover img { transform: scale(1.04); }
.share-btns .btn { border-radius: 8px; font-size: .85rem; }
.breadcrumb { font-size: .85rem; }

/* ---------- Forms (post create) ---------- */
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-switch label { border: 2px solid var(--tgt-border); border-radius: 12px; padding: 14px; cursor: pointer; text-align: center; font-weight: 700; transition: all .15s; background: #fff; }
.type-switch label i { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.type-switch input { display: none; }
.type-switch input:checked + label.lost { border-color: var(--tgt-lost); background: var(--tgt-lost-soft); color: var(--tgt-lost); }
.type-switch input:checked + label.found { border-color: var(--tgt-found); background: var(--tgt-found-soft); color: var(--tgt-found); }
.form-section { border-top: 1px solid var(--tgt-border); padding-top: 18px; margin-top: 18px; }
.form-section h5 { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.form-section .hint { color: var(--tgt-muted); font-size: .85rem; margin-bottom: 14px; }
.upload-zone { border: 2px dashed #c9d3e0; border-radius: 12px; padding: 22px; text-align: center; color: var(--tgt-muted); cursor: pointer; background: #fafbfd; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--tgt-primary); background: var(--tgt-primary-soft); }
.upload-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.upload-previews img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--tgt-border); }
.auth-card { max-width: 440px; margin: 20px auto; }
.auth-card .card-body { padding: 28px; }

/* ---------- Static content ---------- */
.static-content { line-height: 1.75; }
.static-content h5 { font-weight: 800; margin-top: 1.2rem; }
.static-content ul, .static-content ol { padding-left: 1.3rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 36px 0 18px; margin-top: auto; }
.site-footer a { color: #e2e8f0; }
.site-footer .text-secondary { color: #94a3b8 !important; }
.footer-title { color: #fff; font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; font-size: .9rem; }
.social-btn { width: 38px; height: 38px; border-radius: 10px; background: #1e293b; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.social-btn:hover { background: var(--tgt-primary); color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 24px; padding-top: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .82rem; color: #94a3b8; }
.fab-post { position: fixed; right: 16px; bottom: 16px; width: 54px; height: 54px; border-radius: 50%; background: var(--tgt-lost); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 8px 20px rgba(217,72,15,.4); z-index: 1020; }
.fab-post:hover { color: #fff; text-decoration: none; }

@media (max-width: 991px) {
  .sidebar-sticky { position: static; }
  .hero { padding: 24px 18px; }
  .hero h1 { font-size: 1.45rem; }
  .post-card .thumb { width: 78px; height: 78px; }
}
@media (max-width: 575px) {
  body { font-size: 14.5px; }
  main.site-main { padding-top: 14px; }
  .post-detail .card-body { padding: 16px; }
  .type-switch { grid-template-columns: 1fr; }
}
/* ---------- Mobile header ---------- */
@media (max-width: 991px) {
  .site-header .navbar > .container { flex-wrap: wrap; }
  .site-header .navbar-brand { min-width: 0; margin-right: auto; }
  .site-header .navbar-collapse { flex-basis: 100%; order: 3; border-top: 1px solid var(--tgt-border); margin-top: .5rem; padding: .35rem 0 .5rem; }
  .site-header .navbar-nav .nav-link { padding: .65rem .75rem !important; border-radius: 8px; }
  .brand-text small { display: none; }
}
@media (max-width: 575px) {
  .site-header .navbar { padding: .4rem 0; }
  .navbar-brand { font-size: 1.15rem; gap: .4rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 1rem; }
  .btn-user { padding: .35rem .6rem; }
  .btn-user::after { display: none; }              /* hide dropdown caret to save space */
  .navbar-toggler { padding: .3rem .55rem; }
  .navbar-toggler-icon { width: 1.25em; height: 1.25em; }
  .warning-bar { font-size: .78rem; }
}
@media (max-width: 340px) {
  .brand-text { display: none; }                   /* very narrow phones: logo mark only */
}
