:root {
  --ink: #101828;
  --muted: #667085;
  --line: #d9e2f2;
  --soft: #f5f8ff;
  --white: #ffffff;
  --blue: #0b3a82;
  --blue-2: #155eef;
  --red: #d71920;
  --red-dark: #a81018;
  --navy: #071f49;
  --gold: #f5b301;
  --shadow: 0 22px 60px rgba(7, 31, 73, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--site-font, "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif);
  font-size: var(--site-font-size, 16px);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(11, 58, 130, 0.12);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 230px; }
.brand-logo { width: 154px; height: 48px; object-fit: contain; }
.brand-mark {
  display: grid; width: 46px; height: 46px; place-items: center;
  color: var(--white); background: linear-gradient(135deg, var(--blue), var(--red));
  border-radius: 10px; font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand strong { color: var(--blue); font-weight: 900; letter-spacing: 0; }
.brand small { color: var(--muted); font-size: 12px; }

.main-nav { display: flex; align-items: center; gap: 18px; color: #344054; font-size: 15px; font-weight: 700; }
.main-nav a:hover { color: var(--red); }
.nav-cta, .btn, .tracking-form button, .admin button, .admin .button, .contact-form button {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center;
  padding: 10px 18px; border: 0; border-radius: 8px; cursor: pointer; font-weight: 800;
}
.nav-cta, .btn.primary, .tracking-form button, .admin button, .admin .button, .contact-form button {
  color: var(--white); background: linear-gradient(135deg, var(--red), var(--blue)); box-shadow: 0 12px 28px rgba(215, 25, 32, 0.22);
}
.btn.secondary { color: var(--blue); background: var(--white); border: 1px solid rgba(255,255,255,0.72); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; }

.hero { position: relative; min-height: 680px; display: grid; align-items: end; overflow: hidden; color: var(--white); }
.hero-media { position: absolute; inset: 0; background-position: center; background-size: cover; transform: scale(1.02); animation: heroDrift 18s ease-in-out infinite alternate; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(7,31,73,0.95) 0%, rgba(11,58,130,0.78) 44%, rgba(215,25,32,0.48) 100%);
}
.hero-content { position: relative; width: min(900px, 100%); padding: 130px clamp(20px, 6vw, 88px) 92px; }
.hero h1, .page-hero h1, .tracking-panel h1, .article h1 { margin: 0; font-size: clamp(42px, 7vw, 88px); line-height: 1.05; font-weight: 900; }
.hero p { max-width: 720px; font-size: 20px; color: rgba(255,255,255,0.9); }
.eyebrow { margin: 0 0 10px; color: var(--red); font-size: 13px; font-weight: 900; text-transform: uppercase; }
.hero .eyebrow { color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.section { padding: 78px clamp(20px, 6vw, 88px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-heading h2, .split h2, .intro-band h2 { margin: 0; color: var(--navy); font-size: clamp(28px, 4vw, 48px); line-height: 1.18; font-weight: 900; }
.section-heading a, .news-card a { color: var(--red); font-weight: 900; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding-top: 0; padding-bottom: 0; background: var(--line); }
.metrics div { padding: 30px; background: var(--white); }
.metrics strong { display: block; color: var(--blue); font-size: 34px; font-weight: 900; }
.metrics span { color: var(--muted); font-weight: 700; }

.intro-band { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 30px; color: var(--white); background: linear-gradient(135deg, var(--navy), var(--blue)); }
.intro-band h2, .intro-band .eyebrow { color: var(--white); }
.intro-band p { margin: 0; color: rgba(255,255,255,0.86); font-size: 18px; }

.service-grid, .news-grid, .quick-actions, .branch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card, .news-card, .video-card, .admin-card, .quick-actions a, .contact-form, .branch-card, .ad-card, .related-news {
  border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 12px 34px rgba(7,31,73,0.08);
}
.service-card { position: relative; overflow: hidden; padding: 28px; }
.service-card.has-image { padding: 0; }
.service-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--soft); }
.service-card.has-image div { padding: 24px; }
.service-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--red), var(--blue)); }
.service-card span { display: inline-grid; width: 48px; height: 48px; place-items: center; margin-bottom: 20px; color: var(--white); background: var(--blue); border-radius: 8px; font-weight: 900; }
.service-card h3, .news-card h3, .video-card h3, .branch-card h3 { margin: 0 0 8px; color: var(--navy); font-weight: 900; }
.service-card p, .news-card p, .split p, .page-hero p, .tracking-panel p, .lead, .branch-card p { color: var(--muted); }
.service-card, .news-card, .branch-card, .quick-actions a { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.service-card:hover, .news-card:hover, .branch-card:hover, .quick-actions a:hover { transform: translateY(-4px); border-color: rgba(215,25,32,.28); box-shadow: 0 20px 48px rgba(7,31,73,0.14); }

.quick-actions { padding-top: 0; }
.quick-actions a { display: grid; gap: 6px; padding: 24px; border-left: 5px solid var(--red); }
.quick-actions strong { color: var(--blue); font-size: 21px; font-weight: 900; }
.quick-actions span { color: var(--muted); }

.branches { background: var(--soft); }
.branch-card { padding: 24px; }
.branch-card img { width: calc(100% + 48px); max-width: none; margin: -24px -24px 18px; aspect-ratio: 16/9; object-fit: cover; background: var(--soft); border-bottom: 1px solid var(--line); }
.branch-card ul { margin: 16px 0; padding-left: 20px; color: var(--muted); }
.branch-card a { color: var(--red); font-weight: 900; }

.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 34px; background: var(--soft); }
.video-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.video-card { overflow: hidden; }
.video-card video { width: 100%; aspect-ratio: 16/9; background: #000; object-fit: cover; }
.video-card h3 { padding: 16px; }
.news-card { overflow: hidden; }
.news-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--soft); }
.news-card div { padding: 21px; }
.news-card time { color: var(--blue); font-size: 13px; font-weight: 900; }

.page-hero, .tracking-panel { display: grid; min-height: 360px; align-items: end; padding: 88px clamp(20px, 6vw, 88px); background: linear-gradient(135deg, #eef4ff 0%, #fff 56%, #fff1f2 100%); }
.page-hero div, .tracking-panel div { max-width: 840px; }
.page-hero-media {
  position: relative;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(125deg, rgba(7,31,73,.97) 0%, rgba(11,58,130,.9) 48%, rgba(215,25,32,.74) 100%),
    radial-gradient(circle at 82% 18%, rgba(245,179,1,.36), transparent 28%);
}
.page-hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.7), transparent 80%);
}
.page-hero-copy { position: relative; z-index: 1; max-width: 880px; }
.page-hero-copy .eyebrow, .page-hero-media .eyebrow { color: var(--gold); }
.page-hero-copy p { max-width: 760px; color: rgba(255,255,255,.86); font-size: 20px; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn.secondary.light { color: var(--white); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(12px); }
.page-hero-card {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 32px 80px rgba(0,0,0,.28);
}
.page-hero-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.page-hero-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(7,31,73,.88));
}
.page-hero-card figcaption {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 20px;
  display: grid;
  gap: 3px;
}
.page-hero-card span { color: var(--gold); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.page-hero-card strong { color: var(--white); font-size: 24px; line-height: 1.15; font-weight: 900; }
.page-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 28px;
  align-items: start;
  background: linear-gradient(180deg, #fff 0%, #f6f9ff 100%);
}
.page-content-panel {
  min-width: 0;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(7,31,73,.08);
}
.prose { max-width: 900px; margin-inline: auto; }
.page-content-panel.prose { max-width: none; margin: 0; }
.prose h1, .prose h2, .prose h3 { color: var(--navy); line-height: 1.2; }
.prose h2 {
  position: relative;
  margin-top: 1.35em;
  padding-left: 18px;
}
.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .18em;
  bottom: .16em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red), var(--blue));
}
.prose p { color: #344054; }
.prose ul, .prose ol { display: grid; gap: 8px; padding-left: 24px; color: #344054; }
.prose li::marker { color: var(--red); font-weight: 900; }
.page-side-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}
.side-block {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 46px rgba(7,31,73,.08);
}
.side-block h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.2;
}
.side-link-list { display: grid; gap: 10px; }
.side-link-list a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dce7fb;
  border-radius: 8px;
  background: #f7faff;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.side-link-list a:hover { transform: translateY(-2px); border-color: rgba(215,25,32,.36); background: #fff; }
.side-link-list span {
  grid-row: span 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--white);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 13px;
  font-weight: 900;
}
.side-link-list strong { color: var(--blue); line-height: 1.2; }
.side-link-list small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.route-block {
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-color: rgba(255,255,255,.18);
}
.route-block h2, .route-block .eyebrow { color: var(--white); }
.route-mini-grid { display: grid; gap: 10px; }
.route-mini-grid span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.84);
  font-weight: 800;
}
.route-mini-grid strong {
  display: inline-grid;
  min-width: 44px;
  height: 30px;
  place-items: center;
  color: var(--navy);
  border-radius: 6px;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding: 72px clamp(20px, 6vw, 88px); background: var(--soft); }
.article { min-width: 0; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.article-image { width: 100%; max-height: 480px; margin-bottom: 28px; border-radius: 8px; object-fit: cover; }
.lead { font-size: 20px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.share-row a, .share-row button { min-height: 42px; padding: 9px 16px; border: 0; border-radius: 8px; font: inherit; font-weight: 900; cursor: pointer; }
.share-facebook { color: var(--white); background: #1877f2; }
.share-row button { color: var(--blue); background: #eaf1ff; }
.article-sidebar { display: grid; align-content: start; gap: 18px; }
.ad-card { display: grid; overflow: hidden; }
.ad-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ad-card strong, .ad-card span, .ad-card em { margin: 0 18px; }
.ad-card strong { margin-top: 16px; color: var(--navy); font-size: 20px; font-weight: 900; }
.ad-card span { color: var(--muted); }
.ad-card em { margin-bottom: 18px; color: var(--red); font-style: normal; font-weight: 900; }
.related-news { padding: 20px; }
.related-news h2 { margin: 0 0 14px; color: var(--navy); font-size: 22px; }
.related-news a { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.related-news span { color: var(--muted); font-size: 13px; }
.related-news strong { color: var(--blue); }

.tracking-panel { grid-template-columns: 1fr 0.85fr; gap: 34px; align-items: center; }
.tracking-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.tracking-options { display: grid; gap: 12px; }
.tracking-options .tracking-form { grid-template-columns: 180px minmax(0, 1fr) auto; }
.partner-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.partner-links a { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 14px; color: var(--blue); background: #eaf1ff; border: 1px solid #c8d8fa; border-radius: 8px; font-weight: 900; }
.partner-links a:hover { color: var(--white); background: linear-gradient(135deg, var(--red), var(--blue)); }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; background: var(--white); }
textarea { min-height: 130px; resize: vertical; }
.tracking-result[hidden] { display: none; }
.timeline { display: grid; gap: 14px; max-width: 780px; }
.timeline article { position: relative; display: grid; gap: 4px; padding: 18px 18px 18px 50px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.timeline article::before { content: ""; position: absolute; top: 22px; left: 18px; width: 16px; height: 16px; border: 3px solid var(--line); border-radius: 50%; background: var(--white); }
.timeline article.is-done::before, .timeline article.is-active::before { border-color: var(--red); background: var(--red); }
.timeline article.is-active { border-color: var(--red); box-shadow: var(--shadow); }
.timeline span { color: var(--muted); }

.contact-section { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 24px; background: var(--soft); }
.contact-info h2 { margin-top: 0; color: var(--navy); font-size: clamp(28px, 4vw, 44px); line-height: 1.15; }
.contact-form { display: grid; gap: 14px; padding: 26px; }
.form-note { margin: 0; color: var(--blue); font-weight: 800; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 40px clamp(20px, 6vw, 88px); color: var(--white); background: linear-gradient(135deg, var(--navy), #071936); }
.site-footer p { margin: 8px 0 0; color: #c9d7f2; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }

.admin { background: var(--soft); }
.admin-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin .button.subtle { color: var(--ink); background: var(--white); border: 1px solid var(--line); box-shadow: none; }
.admin-tabs { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; padding: 12px; background: rgba(245,248,255,0.92); backdrop-filter: blur(16px); }
.admin-tabs a, .row-actions a { display: inline-flex; min-height: 36px; align-items: center; padding: 7px 12px; color: var(--blue); background: #eaf1ff; border-radius: 8px; font-weight: 800; }
.admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.admin-card { padding: 22px; }
.admin-card.full { grid-column: 1 / -1; }
.admin-form { display: grid; gap: 12px; }
.admin-list { display: grid; gap: 10px; margin-top: 16px; }
.admin-list article { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.notice { padding: 12px 16px; margin-bottom: 16px; color: var(--blue); background: #eaf1ff; border: 1px solid #c8d8fa; border-radius: 8px; }
.login-card { max-width: 560px; }
.media-library { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.media-library article { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.media-library img, .media-library video { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #000; }
.media-library div { display: grid; gap: 8px; padding: 12px; }
.media-library input { font-size: 13px; }

@media (max-width: 1000px) {
  .article-layout, .page-detail-layout { grid-template-columns: 1fr; }
  .page-side-panel { position: static; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .main-nav { position: absolute; top: 76px; right: 16px; left: 16px; display: none; flex-direction: column; align-items: stretch; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .metrics, .service-grid, .news-grid, .quick-actions, .branch-grid, .intro-band, .split, .video-list, .tracking-panel, .contact-section, .admin-grid, .media-library, .page-hero-media { grid-template-columns: 1fr; }
  .hero { min-height: 590px; }
  .site-footer, .section-heading, .admin-topbar { align-items: flex-start; flex-direction: column; }
  .page-hero-media { min-height: auto; padding-top: 72px; }
  .page-hero-card img { aspect-ratio: 16/10; }
}
@media (max-width: 560px) {
  .brand-logo { width: 128px; }
  .brand-text { display: none; }
  .tracking-form { grid-template-columns: 1fr; }
  .tracking-options .tracking-form { grid-template-columns: 1fr; }
  .hero h1, .page-hero h1, .tracking-panel h1, .article h1 { font-size: 38px; }
  .article, .article-layout { padding: 20px; }
  .page-content-panel, .side-block { padding: 18px; }
  .side-link-list a { grid-template-columns: 42px minmax(0, 1fr); }
  .side-link-list span { width: 42px; height: 42px; }
}

.hero-tracking-card {
  position: absolute;
  right: clamp(20px, 6vw, 88px);
  bottom: 42px;
  z-index: 3;
  width: min(520px, calc(100% - 40px));
  grid-template-columns: 1fr 1.1fr auto;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: 0 28px 70px rgba(7,31,73,0.28);
}
.hero-tracking-card strong { display: block; color: var(--blue); font-weight: 900; }
.hero-tracking-card span { color: var(--muted); font-size: 13px; }
.hero-tracking-card input { min-width: 0; }
.hero-tracking-card button, .tracking-form button, .contact-form button, .btn.primary, .nav-cta {
  background: linear-gradient(135deg, #e31b23 0%, #0b3a82 100%);
  box-shadow: 0 14px 34px rgba(215, 25, 32, 0.32);
}
.hero-tracking-card button:hover, .tracking-form button:hover, .btn.primary:hover, .nav-cta:hover {
  transform: translateY(-1px);
  filter: saturate(1.1);
}
.home-slider { overflow: hidden; background: #fff; }
.home-slider .section-heading > span { color: var(--muted); font-weight: 700; }
.slide-grid {
  --slide-index: 0;
  display: flex;
  gap: 18px;
  transform: translateX(calc(var(--slide-index) * -50%));
  transition: transform .65s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.slide-card {
  position: relative;
  flex: 0 0 calc(50% - 9px);
  min-height: 340px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: .7;
  transition: opacity .35s ease, transform .35s ease, outline-color .35s ease;
  outline: 3px solid transparent;
  outline-offset: -3px;
}
.slide-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,31,73,0.05), rgba(7,31,73,0.88));
}
.slide-card div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 26px;
}
.slide-card strong { font-size: clamp(24px, 3vw, 34px); line-height: 1.18; font-weight: 900; }
.slide-card span { color: rgba(255,255,255,0.86); }
.slide-card.is-active { opacity: 1; transform: scale(1.01); outline-color: rgba(245,179,1,.82); }
.slide-dots { display: flex; gap: 8px; margin-top: 18px; }
.slide-dots button {
  width: 34px;
  height: 6px;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: #cad8f2;
  cursor: pointer;
}
.slide-dots button.is-active { background: linear-gradient(90deg, var(--red), var(--blue)); }
.reveal-ready { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal-ready.is-visible { opacity: 1; transform: translateY(0); }
@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0,0,0); }
  to { transform: scale(1.08) translate3d(1.4%, -1%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media, .slide-grid, .reveal-ready, .service-card, .news-card, .branch-card, .quick-actions a { animation: none; transition: none; }
}
@media (min-width: 1100px) {
  .news-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .hero-tracking-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin: -52px 20px 36px;
    width: auto;
    grid-template-columns: 1fr;
  }
  .slide-grid { grid-template-columns: 1fr; }
  .slide-grid { transform: translateX(calc(var(--slide-index) * -100%)); }
  .slide-card { flex-basis: 100%; }
}
.db-status-card { border-left: 5px solid var(--blue); }
.db-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.db-pills span { display: inline-flex; min-height: 34px; align-items: center; padding: 6px 12px; color: var(--blue); background: #eaf1ff; border-radius: 999px; font-weight: 800; }
.dashboard-card {
  position: relative;
  overflow: hidden;
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.96)),
    linear-gradient(135deg, rgba(215,25,32,.08), rgba(11,58,130,.1));
}
.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--red), var(--blue));
}
.dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7,31,73,.96), rgba(11,58,130,.88)),
    radial-gradient(circle at 85% 20%, rgba(245,179,1,.28), transparent 32%);
  color: var(--white);
}
.dashboard-hero h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; font-weight: 900; }
.dashboard-hero p { margin: 8px 0 0; color: rgba(255,255,255,.82); }
.dashboard-hero .eyebrow { color: var(--gold); }
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 132px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(7,31,73,.07);
}
.metric-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -26px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(215,25,32,.14), rgba(11,58,130,.16));
}
.metric-card.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--blue));
  border-color: transparent;
}
.metric-card span { color: var(--blue); font-size: 14px; font-weight: 900; }
.metric-card strong { color: var(--navy); font-size: 34px; line-height: 1; font-weight: 900; }
.metric-card small { color: var(--muted); font-weight: 700; }
.metric-card.primary span, .metric-card.primary strong, .metric-card.primary small { color: var(--white); }
.dashboard-panels {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
  margin-top: 16px;
}
.dashboard-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(7,31,73,.07);
}
.dashboard-panel:first-child { grid-row: span 2; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-head h3 { margin: 0; color: var(--navy); font-size: 20px; line-height: 1.25; font-weight: 900; }
.panel-head span { color: var(--red); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.analytics-list { display: grid; gap: 10px; }
.analytics-list a, .analytics-list.compact div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1e9f8;
  border-radius: 8px;
  background: #f8fbff;
}
.analytics-list a:hover { border-color: rgba(215,25,32,.28); background: #fff; }
.analytics-list strong { min-width: 0; color: var(--blue); font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytics-list small { min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytics-list span {
  grid-row: span 2;
  display: inline-grid;
  min-width: 42px;
  min-height: 34px;
  place-items: center;
  padding: 4px 10px;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-weight: 900;
}
.analytics-list.compact div { grid-template-columns: minmax(0, 1fr) auto; }
.analytics-list.compact span { grid-row: auto; }
.analytics-list.recent a { grid-template-columns: minmax(0, 1fr); }
.empty-state {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  border: 1px dashed #c8d8fa;
  border-radius: 8px;
  background: #f8fbff;
  font-weight: 700;
}

.admin-modern { width: min(1320px, calc(100% - 32px)); }
.admin-subtitle { margin: 6px 0 0; color: var(--muted); font-weight: 700; }
.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 14px 38px rgba(7,31,73,0.08);
}
.admin-jump {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}
.admin-menu { display: grid; gap: 8px; }
.admin-menu a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 9px 12px;
  color: var(--blue);
  background: #eef4ff;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  font-weight: 900;
}
.admin-menu a:hover { color: var(--white); background: linear-gradient(135deg, var(--red), var(--blue)); }
.admin-content { display: grid; gap: 18px; min-width: 0; }
.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-card-head h2 { margin-bottom: 4px; }
.admin-card-head p, .help-text { margin: 0; color: var(--muted); }
.status-dot {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}
.status-dot.is-ok { color: #067647; background: #dcfae6; }
.status-dot.is-warn { color: #b42318; background: #fee4e2; }
.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.admin-summary article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.admin-summary strong { display: block; color: var(--red); font-size: 32px; line-height: 1; font-weight: 900; }
.admin-summary span { color: var(--blue); font-weight: 900; }
.admin-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-two-cols.compact { gap: 10px; }
.admin-two-cols .wide, .form-actions.wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tall { min-height: 240px; }
.editable-table { display: grid; gap: 8px; }
.table-head, .table-row.two {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}
.table-head {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}
.admin-fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: #fbfdff;
}
.admin-fieldset legend {
  padding: 0 8px;
  color: var(--red);
  font-weight: 900;
}
.quick-select { min-width: min(360px, 100%); }
.cards-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cards-compact article p { word-break: break-word; }
.bulk-news {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed var(--blue);
  border-radius: 8px;
  background: #f7faff;
}
.bulk-news summary {
  color: var(--blue);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}
.bulk-news form { margin-top: 16px; }
.admin-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.inline-upload {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.inline-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.inline-upload button {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}
.inline-upload small {
  color: var(--blue);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-menu { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-panels { grid-template-columns: 1fr; }
  .dashboard-panel:first-child { grid-row: auto; }
}
@media (max-width: 700px) {
  .admin-summary, .admin-two-cols, .table-head, .table-row.two, .cards-compact, .admin-upload, .analytics-grid { grid-template-columns: 1fr; }
  .admin-card-head { flex-direction: column; }
  .dashboard-hero { flex-direction: column; }
  .admin-menu { grid-template-columns: 1fr; }
}
