* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Be Vietnam Pro", sans-serif;
}

:root {
  --bg-dark: #07111f;
  --glass: rgba(26, 42, 68, 0.42);
  --border: rgba(255, 255, 255, 0.16);
  --text: #f3f7ff;
  --muted: #9fb0c9;
  --orange: #ff8c2a;
  --orange-2: #ff6a1a;
  --green: #28d17c;
  --red: #ff5d5d;
  --yellow: #ffbf36;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(10, 24, 46, 0.42), rgba(9, 20, 38, 0.56)),
    url("images/index-bg.jpg")
      center/cover no-repeat fixed;
  overflow-x: hidden;
}

html,
body {
  width: 100%;
  max-width: 100%;
}

.page {
  min-height: 100vh;
  padding: 22px 26px 30px;
  max-width: 100%;
  overflow: visible;
}

.container {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  overflow: visible;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* GLOBAL HEADER */
.global-header {
  position: sticky;
  top: 16px;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 14px 18px;
  border-radius: 24px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(10, 33, 67, 0.88), rgba(22, 63, 112, 0.78)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow:
    0 18px 38px rgba(24, 45, 86, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.global-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 320px;
}

.global-header-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #315caa, #1b3b77);
  font-size: 18px;
}

.global-header-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.global-header-subtitle {
  font-size: 12px;
  color: #b7c7df;
  margin-top: 2px;
  line-height: 1.2;
}

.global-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 1 auto;
}

.global-status-pill,
.global-header-btn {
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.global-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #9af0b7;
  background: rgba(48, 196, 110, 0.12);
  border: 1px solid rgba(98, 225, 146, 0.35);
}

.global-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2ee06f;
  box-shadow: 0 0 12px rgba(46, 224, 111, 0.55);
}

.global-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.25s;
}

.global-header-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.main-stack {
  min-width: 0;
}

/* HERO */
.hero {
  padding: 12px 4px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 26px;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.hero-left .badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #33e07f;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

.hero-left h2 {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-left h2 span {
  color: var(--orange);
}

.hero-left p {
  color: #c4d1e8;
  font-size: 18px;
  font-weight: 500;
}

.hero-right {
  text-align: right;
  min-width: 230px;
  padding-top: 22px;
}

.clock {
  font-size: clamp(30px, 2.5vw, 54px);
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.date {
  color: #c0cde1;
  font-size: 17px;
  font-weight: 500;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card {
  border-radius: 24px;
  padding: 26px 22px;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(255, 255, 255, 0.08),
    transparent 40%
  );
  pointer-events: none;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.stat-title {
  color: #b0bdd1;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-value {
  font-size: clamp(28px, 2.4vw, 48px);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-sub {
  color: #92a5c1;
  font-size: 15px;
}

.green {
  color: #33e286;
}

.orange {
  color: #ff9a36;
}

.yellow {
  color: #ffc53d;
}

.red {
  color: #ff6a6a;
}

/* COMMON SECTION */
section[id] {
  scroll-margin-top: 120px;
}

.content-section {
  border-radius: 28px;
  padding: 28px 24px;
  margin-bottom: 26px;
}

.content-section h3 {
  font-size: 28px;
  margin-bottom: 16px;
  color: #ff9a36;
  font-weight: 800;
}

.content-section p {
  font-size: 17px;
  color: #d6e1f2;
  line-height: 1.8;
}

/* PANEL */
.panel {
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 26px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.panel-title {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-sub {
  color: #c9d5e8;
  font-size: 16px;
  font-weight: 700;
}

.line-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.line-card {
  border-radius: 18px;
  padding: 18px 16px 16px;
  background: rgba(9, 19, 36, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 155px;
}

.line-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.line-code {
  font-size: 15px;
  font-weight: 800;
  color: #dce7f9;
}

.tag {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.tag.green {
  color: #9df5bb;
  background: rgba(40, 209, 124, 0.16);
  border: 1px solid rgba(40, 209, 124, 0.28);
}

.tag.red {
  color: #ffb0b0;
  background: rgba(255, 93, 93, 0.15);
  border: 1px solid rgba(255, 93, 93, 0.25);
}

.line-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
  line-height: 1.5;
  min-height: 54px;
  margin-bottom: 12px;
}

.line-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9db0cc;
  font-weight: 600;
  margin-bottom: 10px;
}

.progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9f44, #ff6d1b);
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-weight: 800;
}

.progress-row .percent {
  color: #ff9234;
}

.progress-row .inactive {
  color: var(--red);
}

/* SIMPLE CARDS */
.simple-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.simple-card {
  background: rgba(9, 19, 36, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px;
}

.simple-card h4 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #ffffff;
}

.simple-card p {
  font-size: 15px;
  color: #b6c5dc;
  margin-bottom: 8px;
  line-height: 1.7;
}

/* ACTIONS */
.actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.action-btn {
  min-width: 190px;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 32, 54, 0.72);
  color: white;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s;
  backdrop-filter: blur(10px);
}

.action-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(27, 40, 66, 0.92);
}

/* RESPONSIVE */
@media (max-width: 1280px) {
  .stats-grid,
  .line-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    flex-direction: column;
  }

  .hero-right {
    text-align: left;
    padding-top: 0;
  }

  .global-header {
    flex-direction: column;
    align-items: stretch;
    position: static;
    gap: 12px;
    margin-bottom: 14px;
  }

  .global-header-brand,
  .global-header-actions {
    min-width: unset;
  }

  .global-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-content: flex-start;
  }

  .global-status-pill,
  .global-header-btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .global-header-brand {
    min-width: 0;
    align-items: flex-start;
  }

  .global-header-brand > div:last-child {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .simple-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .page {
    padding: 16px;
  }

  .stats-grid,
  .line-grid {
    grid-template-columns: 1fr;
  }

  .hero-left p,
  .date,
  .content-section p {
    font-size: 15px;
  }

  .global-header {
    padding: 10px 12px;
    margin-bottom: 18px;
  }

  .global-header-brand {
    gap: 10px;
  }

  .global-header-logo {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .global-header-title {
    font-size: clamp(15px, 4.8vw, 18px);
  }

  .global-header-subtitle {
    font-size: 10px;
    line-height: 1.15;
  }

  .global-header-actions {
    gap: 8px;
  }

  .global-status-pill,
  .global-header-btn {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .hero {
    padding: 8px 0 18px;
  }

  .hero-left,
  .hero-right {
    width: 100%;
    min-width: 0;
  }

  .hero-right {
    text-align: left;
  }

  .hero-left h2 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .hero-left p {
    font-size: 16px;
  }

  .clock {
    font-size: clamp(28px, 10vw, 40px);
    letter-spacing: 1px;
  }

  .action-btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 8px;
  }

  .global-header {
    border-radius: 18px;
    padding: 8px;
    margin-bottom: 10px;
  }

  .global-header-brand {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }

  .global-header-logo {
    width: 34px;
    height: 34px;
  }

  .global-header-title {
    font-size: clamp(14px, 5vw, 17px);
    overflow-wrap: anywhere;
  }

  .global-header-subtitle {
    font-size: 9px;
  }

  .global-header-actions {
    grid-template-columns: 1fr 1fr;
  }

  .global-status-pill,
  .global-header-btn {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .hero {
    gap: 12px;
    margin-bottom: 14px;
  }

  .hero-left .badge {
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 10px;
  }

  .hero-left h2 {
    font-size: clamp(26px, 11vw, 42px);
    line-height: 1.02;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-left p {
    font-size: 14px;
    line-height: 1.45;
  }

  .clock {
    font-size: clamp(34px, 12vw, 48px);
  }

  .date {
    font-size: 14px;
  }

  .stats-grid {
    gap: 12px;
  }

  .stat-card,
  .panel,
  .content-section {
    border-radius: 18px;
    padding: 16px;
  }
}
.image-cell {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.image-cell:hover {
  transform: scale(1.06);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.image-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  background: #fff;
}

.image-modal-close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 42px;
  font-weight: bold;
  color: white;
  cursor: pointer;
}
.image-cell {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.image-cell:hover {
  transform: scale(1.06);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.image-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  background: #fff;
}

.image-modal-close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 42px;
  font-weight: bold;
  color: white;
  cursor: pointer;
}
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1550px;
  table-layout: fixed;
}

th,
td {
  border: 1px solid #dbe2ea;
  padding: 10px 8px;
  text-align: center;
  font-size: 14px;
  vertical-align: top;
}

th {
  background: #dbeafe;
  color: #0f172a;
  font-weight: 700;
}

td {
  background: #fff;
}

.col-id {
  width: 55px;
}
.col-wo {
  width: 90px;
}
.col-pct {
  width: 70px;
}
.col-kks {
  width: 75px;
}
.col-system {
  width: 110px;
}
.col-dept {
  width: 105px;
}
.col-content {
  width: 360px;
}
.col-status {
  width: 130px;
}
.col-date {
  width: 120px;
}
.col-image {
  width: 110px;
}
.col-note {
  width: 190px;
}
.col-action {
  width: 100px;
}

.noi-dung-cell {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.6;
  text-align: left;
}

.image-cell {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.image-cell:hover {
  transform: scale(1.06);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.image-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  background: #fff;
}

.image-modal-close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 42px;
  font-weight: bold;
  color: white;
  cursor: pointer;
}
