/* กองคลัง มรภ.เชียงราย — site theme (loaded after styles.css) */
:root {
  --gf-navy: #163a5f;
  --gf-navy-dark: #0f2a45;
  --gf-navy-soft: #e8eef5;
  --gf-gold: #b8964f;
  --gf-gold-soft: #f5efe2;
  --gf-ink: #1f2d3d;
  --gf-muted: #5f6f80;
  --gf-line: #dfe5ec;
  --gf-bg: #f3f6f9;
  --gf-gutter: clamp(16px, 3vw, 48px);
  --gf-surface: #ffffff;
  --gf-radius: 10px;
  --gf-shadow: 0 1px 2px rgba(15, 42, 69, .06), 0 4px 14px rgba(15, 42, 69, .06);
  --gf-shadow-hover: 0 2px 4px rgba(15, 42, 69, .08), 0 10px 24px rgba(15, 42, 69, .10);
}

html { scroll-padding-top: 76px; scroll-behavior: smooth; }
body {
  font-family: "Sarabun", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--gf-ink);
  background: var(--gf-surface);
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5 { font-family: inherit; font-weight: 600; color: var(--gf-navy-dark); }
a { color: var(--gf-navy); text-underline-offset: .2em; }
a:hover { color: var(--gf-gold); }
img, iframe { max-width: 100%; }
.container { max-width: none; padding-left: var(--gf-gutter); padding-right: var(--gf-gutter); }
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 3px solid var(--gf-gold); outline-offset: 2px; box-shadow: none; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: 8px 14px; background: var(--gf-navy-dark); color: #fff; border-radius: 6px; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--gf-surface); border-top: 4px solid var(--gf-gold); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.site-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.site-brand:hover { color: inherit; }
.site-brand img { width: 36px; height: auto; }
.site-brand > span { display: flex; flex-direction: column; line-height: 1.35; }
.site-brand-name { font-size: 24px; font-weight: 700; color: var(--gf-navy-dark); }
.site-brand-name small { font-size: 16px; font-weight: 500; color: var(--gf-navy); margin-left: 4px; }
.site-brand-sub { font-size: 14px; color: var(--gf-muted); }
.site-contact { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; font-size: 14px; color: var(--gf-muted); }
.site-contact i { color: var(--gf-gold); margin-right: 4px; }
.site-contact .staff-login { display: inline-block; padding: 2px 12px; border: 1px solid var(--gf-line); border-radius: 6px; color: var(--gf-navy); text-decoration: none; font-weight: 500; }
.site-contact .staff-login:hover { border-color: var(--gf-navy); background: var(--gf-navy-soft); color: var(--gf-navy-dark); }

/* ---------- Navigation ---------- */
#mainNav.site-nav {
  position: sticky; top: 0; z-index: 1030;
  padding: 0; background: var(--gf-navy);
  box-shadow: 0 2px 8px rgba(15, 42, 69, .18);
  transform: none; border: 0; border-radius: 0; width: 100%; left: 0;
}
#mainNav .navbar-nav { gap: 2px; }
#mainNav .nav-link {
  font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none;
  color: rgba(255, 255, 255, .88); padding: 14px 14px !important; line-height: 1.5;
  border-bottom: 3px solid transparent; transform: none;
}
#mainNav .nav-link:hover, #mainNav .nav-link:focus, #mainNav .nav-link.show { color: #fff; background: rgba(255, 255, 255, .08); }
#mainNav .nav-link.active { color: #fff; border-bottom-color: var(--gf-gold); }
#mainNav .nav-link .fa-home { margin-right: 4px; }
#mainNav .dropdown-menu { margin-top: 0; border: 0; border-radius: 0 0 8px 8px; padding: 6px 0; min-width: 240px; box-shadow: 0 10px 28px rgba(15, 42, 69, .18); }
#mainNav .dropdown-item { font-size: 15px; padding: 8px 18px; color: var(--gf-ink); }
#mainNav .dropdown-item:hover, #mainNav .dropdown-item:focus { background: var(--gf-navy-soft); color: var(--gf-navy-dark); }
#mainNav .dropdown-item.active { background: var(--gf-navy); color: #fff; }
#mainNav .nav-cta { background: var(--gf-gold); color: #fff; font-size: 14px; font-weight: 600; padding: 7px 16px; border-radius: 6px; white-space: nowrap; }
#mainNav .nav-cta:hover { background: #a3823f; color: #fff; }
#mainNav .navbar-toggler { border: 1px solid rgba(255, 255, 255, .4); color: #fff; font-family: inherit; font-size: 15px; font-weight: 500; padding: 6px 14px; margin: 8px 0; text-transform: none; }

/* ---------- Shared blocks ---------- */
.section-head { text-align: center; margin-bottom: 28px; }
.section-head-left { text-align: left; margin-bottom: 18px; }
.section-kicker { display: block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gf-gold); }
.section-title { font-size: 28px; margin: 0; }

.panel { height: 100%; background: var(--gf-surface); border: 1px solid var(--gf-line); border-radius: var(--gf-radius); box-shadow: var(--gf-shadow); padding: 22px 24px; display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 2px solid var(--gf-navy-soft); }
.panel-title { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 10px; }
.panel-title i { color: var(--gf-gold); font-size: .9em; }
.panel-link { font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.panel-link i { font-size: 12px; margin-left: 2px; }
.panel-subtitle { font-size: 15px; color: var(--gf-muted); font-weight: 600; margin: 18px 0 4px; }

.btn { font-family: inherit; font-weight: 500; border-radius: 6px; letter-spacing: 0; }
.btn-primary { background: var(--gf-navy); border-color: var(--gf-navy); }
.btn-primary:hover, .btn-primary:focus { background: var(--gf-navy-dark); border-color: var(--gf-navy-dark); }
.btn-outline-primary { color: var(--gf-navy); border-color: var(--gf-navy); }
.btn-outline-primary:hover { background: var(--gf-navy); border-color: var(--gf-navy); color: #fff; }

/* ---------- Home: hero ---------- */
.home-hero { background: var(--gf-bg); padding: 28px 0; border-bottom: 1px solid var(--gf-line); }
.home-carousel { height: 100%; border-radius: var(--gf-radius); overflow: hidden; background: #fff; box-shadow: var(--gf-shadow); }
.home-carousel .carousel-inner, .home-carousel .carousel-item { height: 100%; }
.home-carousel .carousel-item { aspect-ratio: 5 / 2; max-height: 560px; background: #fff; }
.home-carousel .carousel-item a { display: block; height: 100%; }
.home-carousel .carousel-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
.home-carousel .carousel-control-prev, .home-carousel .carousel-control-next { width: 40px; height: 40px; top: 50%; transform: translateY(-50%); margin: 0 10px; border-radius: 50%; background: rgba(15, 42, 69, .55); opacity: 0; transition: opacity .2s; }
.home-carousel:hover .carousel-control-prev, .home-carousel:hover .carousel-control-next,
.home-carousel .carousel-control-prev:focus-visible, .home-carousel .carousel-control-next:focus-visible { opacity: 1; }
.home-carousel .carousel-control-prev-icon, .home-carousel .carousel-control-next-icon { width: 18px; height: 18px; }
.home-carousel .carousel-indicators { margin-bottom: 8px; }
.home-carousel .carousel-indicators [data-bs-target] { width: 8px; height: 8px; border-radius: 50%; border: 0; margin: 0 4px; background: var(--gf-navy); opacity: .3; }
.home-carousel .carousel-indicators .active { width: 22px; border-radius: 4px; opacity: 1; background: var(--gf-gold); }

.quick-panel .panel-title { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px solid var(--gf-navy-soft); }
.quick-grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; text-align: center; text-decoration: none; color: var(--gf-ink); background: var(--gf-bg); border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 1.4; transition: background .15s, border-color .15s, color .15s; }
.quick-item i { font-size: 22px; color: var(--gf-navy); }
.quick-item:hover { background: var(--gf-navy); color: #fff; }
.quick-item:hover i { color: var(--gf-gold); }

/* ---------- Home: sections ---------- */
.home-section { padding: 48px 0; }
.home-section-alt { background: var(--gf-bg); border-top: 1px solid var(--gf-line); border-bottom: 1px solid var(--gf-line); }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: baseline; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--gf-line); }
.news-list li:last-child { border-bottom: 0; }
.news-date { font-size: 13px; color: var(--gf-muted); white-space: nowrap; }
.news-list a { color: var(--gf-ink); text-decoration: none; font-weight: 500; }
.news-list a:hover { color: var(--gf-navy); text-decoration: underline; }
.news-meta { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.news-views { font-size: 13px; color: var(--gf-muted); }
.badge-new { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 4px; background: #fde8e8; color: #b42323; }

.bidding-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: 8px; background: var(--gf-gold-soft); border: 1px solid #e6d8b6; color: #5d4a1f; text-decoration: none; font-weight: 600; line-height: 1.45; }
.bidding-link small { font-weight: 400; color: #7b6a42; }
.bidding-link:hover { background: var(--gf-gold); border-color: var(--gf-gold); color: #fff; }
.bidding-link:hover small { color: #fff; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { position: relative; padding: 9px 0 9px 20px; border-bottom: 1px dashed var(--gf-line); font-size: 15px; text-align: left !important; }
.link-list li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--gf-gold); }
.link-list li img { display: none; }
.link-list a { text-decoration: none; color: var(--gf-ink); }
.link-list a:hover { color: var(--gf-navy); text-decoration: underline; }

.side-stack { display: flex; flex-direction: column; gap: 24px; }
.side-stack > .panel { height: auto; }
.side-stack > .contact-panel { flex: 1; }
.contact-list { list-style: none; margin: 8px 0 0; padding: 0; }
.contact-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--gf-line); font-size: 15px; }
.contact-list span { color: var(--gf-muted); }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-note { margin: 12px 0 0; font-size: 14px; color: var(--gf-muted); line-height: 1.6; }

.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.doc-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--gf-surface); border: 1px solid var(--gf-line); border-radius: var(--gf-radius); box-shadow: var(--gf-shadow); text-decoration: none; color: var(--gf-ink); transition: box-shadow .15s, border-color .15s; }
.doc-card > i { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; background: var(--gf-navy-soft); color: var(--gf-navy); font-size: 22px; transition: background .15s, color .15s; }
.doc-card span { display: flex; flex-direction: column; line-height: 1.45; }
.doc-card strong { font-size: 17px; font-weight: 600; color: var(--gf-navy-dark); }
.doc-card small { font-size: 14px; color: var(--gf-muted); }
.doc-card:hover { border-color: var(--gf-gold); box-shadow: var(--gf-shadow-hover); color: var(--gf-ink); }
.doc-card:hover > i { background: var(--gf-navy); color: var(--gf-gold); }

.vision-card { height: 100%; padding: 32px 28px; border-radius: var(--gf-radius); background: var(--gf-navy); color: #fff; position: relative; overflow: hidden; }
.vision-card::after { content: "\201C"; position: absolute; right: 18px; bottom: -40px; font-size: 180px; line-height: 1; color: rgba(255, 255, 255, .08); font-family: Georgia, serif; }
.vision-card h2 { color: #fff; font-size: 28px; margin: 2px 0 14px; }
.vision-card p { font-size: 18px; line-height: 1.85; margin: 0; color: rgba(255, 255, 255, .92); }
.mission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mission-item { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--gf-line); border-radius: var(--gf-radius); background: var(--gf-surface); }
.mission-item > i { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--gf-gold-soft); color: var(--gf-gold); font-size: 18px; }
.mission-item h3 { font-size: 17px; margin: 0 0 4px; }
.mission-item p { font-size: 15px; color: var(--gf-muted); margin: 0; line-height: 1.65; }

.org-chart { display: block; margin: 12px 0 20px; text-align: center; }
.org-chart img { max-height: 560px; width: auto; }
.system-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.system-list a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--gf-line); border-radius: 8px; text-decoration: none; color: var(--gf-ink); transition: border-color .15s, background .15s; }
.system-list a > i { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--gf-navy-soft); color: var(--gf-navy); }
.system-list span { display: flex; flex-direction: column; line-height: 1.4; }
.system-list strong { font-weight: 600; font-size: 15px; }
.system-list small { color: var(--gf-muted); font-size: 13px; }
.system-list a:hover { border-color: var(--gf-navy); background: var(--gf-navy-soft); }

.survey-toast { position: fixed; right: 20px; bottom: 20px; z-index: 1040; width: min(360px, calc(100% - 32px)); display: flex; gap: 14px; padding: 18px 20px; background: #fff; border: 1px solid var(--gf-line); border-left: 4px solid var(--gf-gold); border-radius: var(--gf-radius); box-shadow: 0 12px 32px rgba(15, 42, 69, .2); }
.survey-toast[hidden] { display: none; }
.survey-icon { font-size: 24px; color: var(--gf-gold); margin-top: 4px; }
.survey-toast strong { color: var(--gf-navy-dark); }
.survey-toast p { font-size: 14px; color: var(--gf-muted); margin: 2px 0 6px; line-height: 1.55; }
.survey-toast a { font-size: 14px; font-weight: 600; text-decoration: none; }
.survey-close { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--gf-muted); font-size: 22px; line-height: 1; }
.survey-close:hover { background: var(--gf-bg); }

/* ---------- Unit links & footer ---------- */
.unit-links { padding: 44px 0; background: var(--gf-bg); border-top: 1px solid var(--gf-line); }
.unit-links .section-title { font-size: 22px; margin-bottom: 20px; }
.unit-links h3 { font-size: 16px; color: var(--gf-navy); padding-bottom: 8px; margin-bottom: 8px; border-bottom: 2px solid var(--gf-gold); display: inline-block; }
.unit-links ul { list-style: none; margin: 0; padding: 0; }
.unit-links li { font-size: 14px; padding: 4px 0; line-height: 1.5; color: var(--gf-muted); }
.unit-links a { color: var(--gf-ink); text-decoration: none; }
.unit-links a:hover { color: var(--gf-navy); text-decoration: underline; }
.unit-links .unit-home { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 14px 16px; background: #fff; border: 1px solid var(--gf-line); border-left: 4px solid var(--gf-gold); border-radius: 8px; }
.unit-links .unit-home:hover { text-decoration: none; border-color: var(--gf-navy); border-left-color: var(--gf-gold); }
.unit-links .unit-home span { flex: 1; line-height: 1.4; }
.unit-links .unit-home strong { display: block; color: var(--gf-navy); font-size: 15px; }
.unit-links .unit-home small { color: var(--gf-muted); font-size: 13px; }
.unit-links .unit-home i { color: var(--gf-navy); }

.site-footer { background: var(--gf-navy-dark); color: rgba(255, 255, 255, .78); padding: 40px 0 0; font-size: 15px; border-top: 4px solid var(--gf-gold); }
.site-footer h2 { font-size: 17px; color: #fff; margin-bottom: 14px; }
.site-footer a { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 12px; line-height: 1.5; }
.footer-brand img { filter: brightness(1.1); }
.footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-contact li { padding: 3px 0; }
.footer-contact span { display: inline-block; min-width: 108px; color: rgba(255, 255, 255, .55); }
.footer-facebook { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; max-width: 360px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(135deg, #2d8cff 0%, #1877f2 45%, #0b4fb3 100%); box-shadow: 0 8px 24px rgba(8, 40, 90, .45), inset 0 1px 0 rgba(255, 255, 255, .25); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.footer-facebook:hover, .footer-facebook:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(8, 40, 90, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.footer-facebook::before { content: ""; position: absolute; top: -40px; left: -30px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 70%); pointer-events: none; }
.footer-facebook-bg { position: absolute; right: -18px; bottom: -34px; width: 130px; height: 130px; fill: rgba(255, 255, 255, .09); transform: rotate(-12deg); pointer-events: none; }
.footer-facebook-logo { position: relative; flex: 0 0 56px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.footer-facebook-logo svg { width: 30px; height: 30px; fill: #1877f2; }
.footer-facebook-like { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #ffd56a, #f0a91c); border: 2px solid #1877f2; color: #fff; font-size: 11px; }
.footer-facebook-text { position: relative; flex: 1; display: flex; flex-direction: column; gap: 4px; line-height: 1.3; }
.footer-facebook-text strong { color: #fff; font-size: 17px; font-weight: 700; }
.footer-facebook-handle { color: rgba(255, 255, 255, .85); font-size: 13px; line-height: 1.45; }
.footer-facebook-arrow { position: relative; flex: 0 0 32px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 13px; transition: background .2s, transform .2s; }
.footer-facebook:hover .footer-facebook-arrow { background: #fff; color: #1877f2; transform: translateX(3px); }
@media (min-width: 992px) and (max-width: 1199.98px) {
  .footer-facebook { gap: 12px; padding: 16px; }
  .footer-facebook-text strong { font-size: 15px; }
  .footer-facebook-arrow { display: none; }
}
.footer-map { border-radius: 8px; overflow: hidden; height: 180px; }
.footer-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.footer-bottom { margin-top: 32px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: rgba(255, 255, 255, .55); text-align: center; }

.scroll-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 1035; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--gf-navy); color: #fff; box-shadow: var(--gf-shadow-hover); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scroll-to-top.is-visible { opacity: 1; pointer-events: auto; }
.scroll-to-top:hover { color: var(--gf-gold); background: var(--gf-navy-dark); }
body:has(.survey-toast:not([hidden])) .scroll-to-top { opacity: 0; pointer-events: none; }

/* ---------- Inner pages (content rendered into the template) ---------- */
#main-content > .content-section { padding: 36px 0 48px; background: var(--gf-bg); }
#main-content > .content-section[style] { padding-left: var(--gf-gutter) !important; padding-right: var(--gf-gutter) !important; }
#main-content .card { border: 1px solid var(--gf-line); border-radius: var(--gf-radius); box-shadow: var(--gf-shadow); overflow: hidden; }
#main-content .card-header { background: #fff !important; border-bottom: 2px solid var(--gf-navy-soft); padding: 16px 20px; }
#main-content .card-header .card-title { font-size: 20px; margin: 0; color: var(--gf-navy-dark); }
#main-content .card-body { padding: 20px; }
#main-content .table { margin-bottom: 0; }
#main-content .table thead th, #main-content .table thead td { background: var(--gf-navy-soft) !important; color: var(--gf-navy-dark); font-weight: 600; border-color: var(--gf-line); }
#main-content .table td { border-color: var(--gf-line); vertical-align: middle; }
#main-content .table-hover > tbody > tr:hover > * { background: #f6f9fc; }
#main-content .form-control { border-color: var(--gf-line); border-radius: 6px; }
#main-content .pagination .page-link { color: var(--gf-navy); }
#main-content .pagination .active .page-link, #main-content .pagination .page-item.active .page-link { background: var(--gf-navy); border-color: var(--gf-navy); color: #fff; }

/* ---------- Staff: manage content ---------- */
.manage-page { background: var(--gf-bg); padding-top: 32px; }
.manage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.manage-user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--gf-muted); }
.manage-user i { color: var(--gf-navy); }
.manage-back { display: inline-block; font-size: 14px; text-decoration: none; margin-bottom: 4px; }
.manage-sections { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.manage-sections a { padding: 10px 18px; border-radius: 8px; background: #fff; border: 1px solid var(--gf-line); color: var(--gf-ink); text-decoration: none; font-weight: 600; }
.manage-sections a i { color: var(--gf-gold); margin-right: 4px; }
.manage-sections a.active { background: var(--gf-navy); border-color: var(--gf-navy); color: #fff; }
.manage-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 2px solid var(--gf-navy-soft); }
.manage-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.manage-tabs a { padding: 6px 14px; border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--gf-muted); background: var(--gf-bg); }
.manage-tabs a:hover { color: var(--gf-navy); }
.manage-tabs a.active { background: var(--gf-navy-soft); color: var(--gf-navy-dark); font-weight: 600; }
.manage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.manage-search { display: flex; gap: 6px; }
.manage-search .form-control { min-width: 220px; }
.manage-count { margin: 12px 0 6px; font-size: 14px; color: var(--gf-muted); }
.manage-table th { font-size: 14px; font-weight: 600; color: var(--gf-navy-dark); background: var(--gf-navy-soft); border-bottom: 0; }
.manage-table td { vertical-align: middle; font-size: 15px; border-color: var(--gf-line); }
.manage-table td a:not(.btn) { color: var(--gf-ink); text-decoration: none; }
.manage-table td a:not(.btn):hover { color: var(--gf-navy); text-decoration: underline; }
.manage-table tr.is-hidden td { opacity: .55; }
.manage-table tr.is-hidden td:last-child { opacity: 1; }
.type-badge { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 4px; background: var(--gf-gold-soft); color: #6b5524; white-space: nowrap; }
.status-on, .status-off { font-size: 13px; font-weight: 600; }
.status-on { color: #1e7a46; }
.status-off { color: var(--gf-muted); }
.cover-thumb { width: 90px; height: 36px; object-fit: cover; border-radius: 4px; border: 1px solid var(--gf-line); }
.manage-form { max-width: 860px; }
.manage-form .form-label { font-weight: 600; color: var(--gf-navy-dark); }
.manage-form .form-control, .manage-form .form-select { border-color: #cfd8e2; }
.manage-file { padding: 16px 18px; border: 1px dashed #c6d1dd; border-radius: 8px; background: #fafcfe; }
.manage-file legend { float: none; width: auto; font-size: 16px; margin-bottom: 8px; }
.current-file { font-size: 14px; margin-bottom: 10px; }
.current-cover { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.current-cover img { width: 240px; aspect-ratio: 5 / 2; object-fit: contain; background: #fff; border: 1px solid var(--gf-line); border-radius: 6px; }
.source-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.source-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1px solid var(--gf-line); border-radius: 8px; background: #fff; cursor: pointer; }
.source-option input { margin-top: 6px; }
.source-option span { display: flex; flex-direction: column; line-height: 1.45; }
.source-option small { color: var(--gf-muted); font-size: 13px; }
.source-option:has(input:checked) { border-color: var(--gf-navy); background: var(--gf-navy-soft); }
.source-panel[hidden] { display: none; }
.manage-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--gf-muted); font-size: 13px; }
.manage-or::before, .manage-or::after { content: ""; flex: 1; border-top: 1px solid var(--gf-line); }
.history-subject { margin: 4px 0 0; color: var(--gf-muted); font-size: 16px; }
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.history-item { background: #fff; border: 1px solid var(--gf-line); border-left: 4px solid var(--gf-navy); border-radius: var(--gf-radius); padding: 16px 20px; box-shadow: var(--gf-shadow); }
.history-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--gf-muted); margin-bottom: 8px; }
.history-head i { color: var(--gf-gold); margin-right: 3px; }
.history-who { color: var(--gf-ink); font-weight: 600; }
.history-who small { font-weight: 400; color: var(--gf-muted); }
.history-action { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 4px; background: var(--gf-navy-soft); color: var(--gf-navy-dark); }
.history-action.action-create { background: #e3f4ea; color: #1e7a46; }
.history-action.action-hide { background: #eef0f2; color: #55606c; }
.history-action.action-restore { background: #fdecec; color: #a12a2a; }
.history-record { font-weight: 600; margin-bottom: 6px; }
.history-remark { font-size: 14px; color: var(--gf-ink); margin-bottom: 6px; }
.history-remark i { color: var(--gf-gold); margin-right: 4px; }
.history-diff { margin: 8px 0 10px; font-size: 14px; }
.history-diff thead th { background: var(--gf-navy-soft); color: var(--gf-navy-dark); font-weight: 600; border-bottom: 0; }
.history-diff tbody th { font-weight: 600; color: var(--gf-muted); background: #fafbfd; }
.history-diff td, .history-diff th { border-color: var(--gf-line); vertical-align: top; }
.history-diff .diff-before { background: #fff6f6; }
.history-diff .diff-after { background: #f3fbf6; }
.history-diff tr.is-changed th { color: var(--gf-navy-dark); }
.history-url { font-size: 12px; color: var(--gf-muted); word-break: break-all; }
.history-cover { width: 160px; aspect-ratio: 5 / 2; object-fit: contain; border: 1px solid var(--gf-line); border-radius: 4px; background: #fff; }
.history-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.history-meta { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; margin: 0; font-size: 15px; }
.history-meta dt { color: var(--gf-muted); font-weight: 500; }
.history-meta dd { margin: 0; }
.restore-form { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--gf-line); }
@media (max-width: 767.98px) { .history-meta { grid-template-columns: 1fr; } .history-meta dd { margin-bottom: 8px; } }
.staff-manage-btn { float: right; }

/* ---------- Responsive ---------- */
@media (min-width: 1600px) {
  .doc-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .doc-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 1199.98px) {
  #mainNav .nav-link { padding: 14px 10px !important; font-size: 14px; }
}
@media (max-width: 991.98px) {
  .site-contact li:not(:last-child) { display: none; }
  .site-contact .staff-login { font-size: 13px; padding: 4px 10px; white-space: nowrap; }
  #mainNav .navbar-collapse { padding: 6px 0 14px; max-height: calc(100vh - 60px); overflow-y: auto; }
  #mainNav .nav-link { padding: 10px 6px !important; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 15px; }
  #mainNav .nav-link.active { border-bottom-color: var(--gf-gold); }
  #mainNav .dropdown-menu { background: rgba(255, 255, 255, .06); box-shadow: none; border-radius: 6px; margin: 4px 0; }
  #mainNav .dropdown-item { color: rgba(255, 255, 255, .85); }
  #mainNav .dropdown-item:hover, #mainNav .dropdown-item:focus { background: rgba(255, 255, 255, .1); color: #fff; }
  #mainNav .nav-cta { display: block; margin-top: 12px; text-align: center; }
  .home-carousel .carousel-control-prev, .home-carousel .carousel-control-next { opacity: 1; }
  .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vision-card { padding: 26px 24px; }
}
@media (max-width: 767.98px) {
  body { font-size: 15px; }
  .site-header-inner { padding-top: 10px; padding-bottom: 10px; }
  .site-brand img { width: 30px; }
  .site-brand-name { font-size: 20px; }
  .site-brand-name small { font-size: 14px; }
  .site-brand-sub { font-size: 12px; }
  .site-contact .staff-login { padding: 6px 10px; }
  .site-contact .staff-login i { margin: 0; font-size: 16px; }
  .site-contact .staff-login span { display: none; }
  .home-hero { padding: 16px 0; }
  .home-section { padding: 32px 0; }
  .panel { padding: 18px 16px; }
  .section-title { font-size: 24px; }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .quick-item { font-size: 13px; padding: 10px 4px; }
  .news-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .news-list li .news-date { order: -1; }
  .news-meta { white-space: normal; }
  .doc-grid, .mission-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .doc-card { padding: 16px; }
  .vision-card p { font-size: 16px; }
  .unit-links { padding: 32px 0; }
  .footer-contact span { min-width: 96px; }
  .survey-toast { right: 16px; bottom: 16px; }
}
@media (max-width: 420px) {
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
