:root {
  /* Bảng màu lấy theo logo CIT: navy đậm - xanh dương - xám thép */
  --primary: #1c3e73;
  --primary-dark: #122a52;
  --accent: #2f7fd1;
  --steel: #7a8ba0;
  --bg: #f4f7fb;
  --text: #1d2b40;
  --muted: #64748f;
  --border: #d9e2ee;
  --white: #ffffff;
  --danger: #c0392b;
  --success: #27ae60;
}

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

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-size: 1.35rem; font-weight: 700; color: var(--primary); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.logo img { height: 42px; width: 42px; object-fit: contain; }
.logo span { color: var(--accent); }
.logo small.brand-sub { display: block; font-size: .62rem; font-weight: 500; color: var(--steel); line-height: 1.1; }
.nav-links a {
  margin-left: 24px; text-decoration: none; color: var(--text); font-weight: 500;
}
.nav-links a:hover { color: var(--primary); }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(ellipse 60% 75% at 50% 45%, rgba(8, 18, 40, .5) 0%, rgba(8, 18, 40, 0) 100%),
    url('/img/bridge-bg.svg') bottom center / cover no-repeat,
    linear-gradient(150deg, #2a5798 0%, var(--primary) 45%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 80px 0 110px;
  text-align: center;
}
.hero .hero-logo {
  height: 195px; width: 195px; object-fit: contain;
  background: var(--white); border-radius: 50%; padding: 10px;
  box-shadow: 0 0 0 6px rgba(255,255,255,.18), 0 10px 36px rgba(0,0,0,.45);
  margin-bottom: 26px;
}
.hero h1 {
  font-size: 3rem; font-weight: 800; margin-bottom: 10px; letter-spacing: .5px;
  text-shadow: 0 3px 14px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.5);
}
.hero .hero-sub {
  font-size: 1.35rem; font-weight: 700; color: #e3efff;
  margin-bottom: 18px; letter-spacing: .6px;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.hero p {
  font-size: 1.14rem; max-width: 680px; margin: 0 auto 28px;
  text-shadow: 0 1px 6px rgba(0,0,0,.45);
}
.btn {
  display: inline-block; padding: 12px 28px; border-radius: 6px;
  font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
  border: none; transition: background .15s;
}
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.25); }
.btn-accent:hover { background: #256bb5; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; padding: 6px 14px; font-size: .85rem; }
.btn-small { padding: 6px 14px; font-size: .85rem; }
.btn-outline {
  background: var(--white); color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: #e8f0fa; }
/* Nút kích thước cố định, dùng khi cần các nút dài và cao bằng nhau */
.btn-eq {
  display: inline-flex; align-items: center; justify-content: center;
  width: 104px; height: 34px; padding: 0; font-size: .85rem;
}

/* ===== Sections ===== */
section { padding: 56px 0; }
.section-title { text-align: center; font-size: 1.8rem; color: var(--primary); margin-bottom: 36px; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px;
}
.feature-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 28px; text-align: center;
}
.feature-card .icon { font-size: 2.2rem; margin-bottom: 12px; }
.feature-card h3 { color: var(--primary); margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: var(--muted); font-size: .95rem; }

/* ===== Table ===== */
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--primary); color: var(--white); font-weight: 600; }
tr:hover td { background: #f0f5fa; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.empty-note { color: var(--muted); text-align: center; padding: 24px; }

/* ===== Video hướng dẫn ===== */
.section-video { background: var(--white); border-top: 1px solid var(--border); }
.video-wrap {
  position: relative; max-width: 860px; margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(18, 42, 82, .22);
  background: #000;
}
.video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* Băng chuyền thumbnail video — tràn hết chiều ngang màn hình,
   số video hiển thị tự tăng theo độ rộng màn hình */
.video-carousel {
  display: flex; align-items: center; gap: 14px;
  margin: 10px calc(50% - 50vw) 0;
  padding: 0 26px;
}
.video-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-behavior: smooth;
  padding: 8px 2px 14px; flex: 1;
  scrollbar-width: thin;
}
.video-thumb {
  flex: 0 0 305px; cursor: pointer; border-radius: 12px; overflow: hidden;
  background: var(--white); border: 2px solid var(--border);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.video-thumb:hover {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(47,127,209,.3);
}
.vt-img { position: relative; }
.vt-img img { width: 100%; height: 172px; object-fit: cover; display: block; }
.vt-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(18, 42, 82, .8); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; padding-left: 4px;
  transition: background .15s, transform .15s;
}
.video-thumb:hover .vt-play { background: var(--accent); transform: translate(-50%, -50%) scale(1.12); }
.vt-title {
  font-size: .92rem; font-weight: 600; line-height: 1.4; padding: 11px 14px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 3.3em;
}
.carousel-arrow {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  border: none; background: var(--primary); color: var(--white);
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  box-shadow: 0 3px 10px rgba(18,42,82,.3);
}
.carousel-arrow:hover { background: var(--accent); }

/* Nền khu vực tải về: hình cầu đường mờ trên nền sáng */
.section-download {
  background:
    url('/img/bridge-bg-light.svg') bottom center / cover no-repeat,
    linear-gradient(180deg, #eaf1f9 0%, #dfe9f5 100%);
}

/* ===== Footer ===== */
footer {
  background: var(--primary-dark); color: rgba(255,255,255,.85);
  text-align: center; padding: 22px 0; margin-top: 40px; font-size: .9rem;
}
footer a { color: #9cc4ef; }

/* ===== Admin ===== */
.login-box {
  max-width: 380px; margin: 90px auto; background: var(--white);
  border: 1px solid var(--border); border-radius: 10px; padding: 34px;
}
.login-box h2 { color: var(--primary); margin-bottom: 20px; text-align: center; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .92rem; }
input[type=text], input[type=password], input[type=date], textarea, select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: .95rem; font-family: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }

.msg { padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-size: .92rem; display: none; }
.msg.error { background: #fdecea; color: var(--danger); display: block; }
.msg.success { background: #eafaf1; color: var(--success); display: block; }

.tabs { display: flex; gap: 8px; margin: 24px 0 20px; }
.tab-btn {
  padding: 10px 22px; border: 1px solid var(--border); background: var(--white);
  border-radius: 6px; cursor: pointer; font-weight: 600; font-size: .95rem;
}
.tab-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.panel {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 26px; margin-bottom: 24px;
}
.panel h3 { color: var(--primary); margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.hidden { display: none; }

/* ===== Cửa sổ nổi (modal) ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 22, 44, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--white); border-radius: 12px;
  width: 100%; max-width: 620px; max-height: 82vh; overflow-y: auto;
  padding: 26px 30px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.info-body {
  white-space: pre-wrap; line-height: 1.65; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 18px; margin-bottom: 18px; font-size: .96rem;
}

/* ===== Trang quản trị: khung rộng hết màn hình, bảng không xuống dòng ===== */
#admin-screen .container { max-width: 1600px; }
#admin-screen th, #admin-screen td { white-space: nowrap; }
/* Các nút thao tác trong bảng: cùng kích thước, thẳng hàng */
#admin-screen td .btn {
  width: 118px; height: 34px; padding: 0; margin: 0 2px 0 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem;
}
