/* Nhà Đóm — giao diện điều hành. Một file CSS, không khung sườn ngoài. */

:root {
  --lua: #d94f1e;
  --lua-nhat: #fff1ea;
  --than: #1c1a19;
  --xam-dam: #4a4442;
  --xam: #8a817c;
  --vien: #e5e0dc;
  --nen: #faf8f6;
  --trang: #ffffff;
  --xanh: #1e7a4f;
  --xanh-nhat: #e8f5ee;
  --vang: #b8860b;
  --vang-nhat: #fdf6e3;
  --do: #b3261e;
  --do-nhat: #fdecea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--nen);
  color: var(--than);
  line-height: 1.6;
}

a { color: var(--lua); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Thanh bên --- */
.khung { display: flex; min-height: 100vh; }

.ben {
  width: 230px;
  flex-shrink: 0;
  background: var(--than);
  color: #e8e3df;
  padding: 20px 0;
}
.ben .hieu {
  font-size: 20px; font-weight: 700; padding: 0 20px 18px;
  border-bottom: 1px solid #332f2d; margin-bottom: 14px;
}
.ben .hieu small { display: block; font-size: 11px; color: var(--xam); font-weight: 400; }
.ben a {
  display: block; padding: 10px 20px; color: #cfc8c3; font-size: 14px;
  border-left: 3px solid transparent;
}
.ben a:hover { background: #2a2624; color: #fff; text-decoration: none; }
.ben a.dang { background: #2a2624; color: #fff; border-left-color: var(--lua); font-weight: 600; }

.chinh { flex: 1; padding: 26px 32px; max-width: 1200px; }

h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 26px 0 10px; }
.phu { color: var(--xam); font-size: 13px; margin: 0 0 20px; }

/* --- Thẻ --- */
.the {
  background: var(--trang); border: 1px solid var(--vien);
  border-radius: 10px; padding: 16px 18px; margin-bottom: 16px;
}
/* 135px cho vua 4 the mot hang khi cua so hep. De 165px thi no gay
   thanh 3+1, the "That bai" dung tro troi mot minh, nhin rat ky. */
.hang-the { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 12px; }
.so { font-size: 26px; font-weight: 700; line-height: 1.2; }
.nhan { font-size: 12px; color: var(--xam); text-transform: uppercase; letter-spacing: .4px; }

/* --- Bảng --- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; padding: 9px 10px; border-bottom: 2px solid var(--vien);
  font-size: 12px; color: var(--xam); text-transform: uppercase; letter-spacing: .4px;
}
td { padding: 10px; border-bottom: 1px solid var(--vien); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.cuon-ngang { overflow-x: auto; }

/* --- Nhãn trạng thái --- */
.tt {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tt-xong, .tt-dat { background: var(--xanh-nhat); color: var(--xanh); }
.tt-chay, .tt-dang_chay, .tt-dang_lap_ke_hoach, .tt-dang_tong_hop, .tt-dang_kiem_dinh
  { background: var(--lua-nhat); color: var(--lua); }
.tt-cho, .tt-cho_duyet, .tt-cho_kiem_dinh, .tt-can_sua, .tt-moi
  { background: var(--vang-nhat); color: var(--vang); }
.tt-that_bai, .tt-huy { background: var(--do-nhat); color: var(--do); }

/* --- Nút --- */
.nut {
  display: inline-block; padding: 9px 17px; border-radius: 7px;
  background: var(--lua); color: #fff; border: none; font-size: 14px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}
.nut:hover { background: #bf4318; text-decoration: none; }
.nut-phu { background: var(--trang); color: var(--xam-dam); border: 1px solid var(--vien); }
.nut-phu:hover { background: var(--nen); }
.nut-do { background: var(--do); }
.nut-do:hover { background: #8f1e17; }

/* --- Biểu mẫu --- */
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px; }
input[type=text], input[type=number], input[type=password], textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--vien);
  border-radius: 7px; font-size: 14px; font-family: inherit; background: var(--trang);
}
textarea { min-height: 110px; resize: vertical; }
.goi-y { font-size: 12px; color: var(--xam); margin-top: 4px; }

/* --- Lời nhắc --- */
.nhac { padding: 12px 15px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.nhac-vang { background: var(--vang-nhat); border-left: 4px solid var(--vang); }
.nhac-xanh { background: var(--xanh-nhat); border-left: 4px solid var(--xanh); }
.nhac-do { background: var(--do-nhat); border-left: 4px solid var(--do); }

/* --- Kết quả --- */
.ket-qua {
  background: var(--trang); border: 1px solid var(--vien); border-radius: 8px;
  padding: 16px 18px; white-space: pre-wrap; font-size: 14px;
  font-family: "Consolas", "Courier New", monospace; overflow-x: auto;
}

/* --- Dòng thời gian --- */
.dong { display: flex; gap: 11px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--vien); }
.dong:last-child { border-bottom: none; }
.dong .luc { color: var(--xam); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dong .ai { color: var(--xam-dam); font-weight: 600; white-space: nowrap; min-width: 110px; }
.dong.loi { color: var(--do); }
.dong.canh_bao { color: var(--vang); }

/* --- Cánh cửa: trang đăng nhập / đặt mật khẩu ---
   Khong dung khung.html nen khong co thanh ben. Co y: nguoi chua dang nhap
   thi khong duoc nhin thay ten cac man hinh ben trong. */
.cua-nen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; background: var(--than);
}
.cua {
  background: var(--trang); border-radius: 12px; padding: 30px 32px;
  width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.cua .hieu { font-size: 22px; font-weight: 700; margin-bottom: 2px; }
.cua .hieu small { display: block; font-size: 12px; color: var(--xam); font-weight: 400; }
.cua label:first-of-type { margin-top: 20px; }
.cua .nut { width: 100%; margin-top: 20px; padding: 11px; font-size: 15px; }
.cua .chan { margin-top: 18px; font-size: 12px; color: var(--xam); line-height: 1.5; }

/* --- Thanh duoi cung cua thanh ben --- */
.ben .day { margin-top: 18px; padding-top: 14px; border-top: 1px solid #332f2d; }
.ben .day button {
  display: block; width: 100%; text-align: left; padding: 10px 20px;
  background: none; border: none; border-left: 3px solid transparent;
  color: #cfc8c3; font-size: 14px; font-family: inherit; cursor: pointer;
}
.ben .day button:hover { background: #2a2624; color: #fff; }

/* --- Tiêu chí kiểm định --- */
.tc { font-size: 13px; padding: 4px 0; }
.tc .dau { font-weight: 700; margin-right: 6px; }
.tc.ok .dau { color: var(--xanh); }
.tc.truot .dau { color: var(--do); }
