/* ==========================================================================
   Trung tam Truyen dan - Phat song : bang lich cong tac
   Mau sac tap trung o phan bien duoi day, sua o day la doi toan bo giao dien.
   ========================================================================== */

:root {
    /* Thuong hieu */
    --xanh-dam: #0b3b6f;
    --xanh-dam-2: #0e5a9c;
    --xanh-nhat: #6fc3e8;
    --xanh-ngoc: #00c2a8;
    --xanh-ngoc-dam: #00a892;
    --vien-bang: #ffffff;
    --vang-tieu-de: #ffe11a;

    /* Trang & chu */
    --nen-trang: #f4f7fa;
    --nen-the: #ffffff;
    --chu-chinh: #0b0b0b;
    --chu-phu: #52514e;
    --chu-mo: #898781;
    --duong-ke: #e1e0d9;

    /* Bieu do (mot chuoi du lieu duy nhat) */
    --cot-bieu-do: #2a78d6;
    --luoi-bieu-do: #e1e0d9;

    /* Trang thai */
    --ok: #0ca30c;
    --canh-bao: #fab219;
    --loi: #d03b3b;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--chu-chinh);
    background: var(--nen-trang);
}

a { color: var(--xanh-dam-2); }

/* ------------------------------ Header ---------------------------------- */

.site-header {
    background:
        radial-gradient(circle at 12% 30%, rgba(111, 195, 232, .28) 0, transparent 38%),
        radial-gradient(circle at 78% 70%, rgba(111, 195, 232, .22) 0, transparent 42%),
        linear-gradient(120deg, #072c55 0%, #0b3b6f 45%, #12518f 100%);
    color: #fff;
}

/* Khi Admin da tai anh nen banner: anh duoc dat lam background cua header */
.site-header.co-anh-nen {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* Khi anh banner da co san logo va chu: hien nguyen anh, khong chen gi len tren */
.banner-nguyen-anh { background: #06203f; }

.banner-nguyen-anh .banner-full {
    display: block;
    width: 100%;
    max-width: 1280px;
    height: auto;
    margin: 0 auto;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-box {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    height: 56px;
    padding: 0 10px;
    background: #fff;
    border-radius: 6px;
}

.logo-img { max-height: 48px; max-width: 160px; display: block; }

.logo-text {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--xanh-dam);
}

.site-title {
    margin: 0;
    font-size: clamp(20px, 3.4vw, 40px);
    font-weight: 800;
    color: var(--vang-tieu-de);
    text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
}

/* ------------------------------- Menu ----------------------------------- */

.site-nav {
    max-width: 1280px;
    margin: 12px auto 0;
    padding: 6px 10px;
    background: linear-gradient(180deg, #cfeaf8 0%, #a9d8ef 100%);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.site-nav a,
.nav-link-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    color: var(--xanh-dam);
    text-decoration: none;
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.site-nav a:hover,
.nav-link-btn:hover { background: rgba(255, 255, 255, .75); }

.site-nav a.active {
    background: #17263a;
    color: #fff;
}

.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-user { font-weight: 700; color: var(--xanh-dam); padding-left: 8px; }
.inline-form { display: inline; margin: 0; }

/* ------------------------------- Khung ---------------------------------- */

.site-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
}

.site-footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 16px 34px;
    color: var(--chu-phu);
    font-size: 13.5px;
}

.site-footer p { margin: 2px 0; }

p.tong-cong {
    margin: 4px 0 14px;
    font-size: 19px;
    font-weight: 700;
    color: #7a0f52;
    text-align: center;
}

p.tong-cong strong { font-size: 22px; }

h2.page-title {
    margin: 4px 0 14px;
    font-size: 22px;
    color: var(--xanh-dam);
}

.the {
    background: var(--nen-the);
    border: 1px solid var(--duong-ke);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.the > h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: var(--xanh-dam);
}

/* ------------------------- Bang lich cong tac ---------------------------- */

.bang-wrap { overflow-x: auto; }

.bang-lich {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    background: var(--xanh-ngoc);
}

.bang-lich th,
.bang-lich td {
    border: 1px solid var(--vien-bang);
    padding: 8px 10px;
    color: #fff;
    vertical-align: middle;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

.bang-lich thead th {
    background: var(--xanh-dam-2);
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.bang-lich tbody td { font-weight: 700; }

.bang-lich tbody tr:hover td { background: var(--xanh-ngoc-dam); }

.c-giua { text-align: center; white-space: nowrap; }
.c-thu { text-align: center; white-space: nowrap; width: 72px; }
.c-ngay { width: 96px; }
.c-thaotac { width: 118px; text-align: center; white-space: nowrap; }

/* Mau o cot THU theo ngay trong tuan: 0 = Chu nhat ... 6 = thu Bay (kieu neon tuoi sang) */
.bang-lich td.thu-0 { background: #ff1654; }
.bang-lich td.thu-1 { background: #ffb300; }
.bang-lich td.thu-2 { background: #00e676; }
.bang-lich td.thu-3 { background: #ff3d3d; }
.bang-lich td.thu-4 { background: #ff6d00; }
.bang-lich td.thu-5 { background: #2979ff; }
.bang-lich td.thu-6 { background: #e91ee0; }
.bang-lich tbody tr:hover td[class*="thu-"] { filter: brightness(1.12); }

/* Trang chu: to do ca dong neu la ngay hom nay, to vang neu la ngay mai (kieu neon) */
.bang-lich tbody tr.hang-hom-nay td {
    background: #ff1a3d;
    color: #fff;
}
.bang-lich tbody tr.hang-ngay-mai td {
    background: #fff200;
    color: #402c00;
    text-shadow: none;
}
.bang-lich tbody tr.hang-hom-nay:hover td { background: #e0002e; }
.bang-lich tbody tr.hang-ngay-mai:hover td { background: #e6d900; }

.trang-thai {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    background: rgba(255, 255, 255, .22);
}

.tt-DaThucHien { background: rgba(255, 255, 255, .38); }
.tt-Huy { background: rgba(0, 0, 0, .28); text-decoration: line-through; }

.bang-trong {
    padding: 22px;
    text-align: center;
    color: var(--chu-phu);
    background: var(--nen-the);
    border: 1px dashed var(--duong-ke);
    border-radius: 10px;
}

/* --------------------------- Bang thuong -------------------------------- */

.bang {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.bang th, .bang td {
    border: 1px solid var(--duong-ke);
    padding: 7px 10px;
    text-align: left;
}

.bang thead th {
    background: #eef3f8;
    color: var(--xanh-dam);
    font-size: 13.5px;
    text-transform: uppercase;
}

.bang td.so { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------ Form ------------------------------------ */

.loc-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: flex-end;
}

.o-nhap { display: flex; flex-direction: column; gap: 4px; }
.o-nhap.rong { flex: 1 1 260px; }

label, .nhan {
    font-size: 13px;
    font-weight: 700;
    color: var(--chu-phu);
}

input[type=text], input[type=date], input[type=time],
input[type=password], input[type=number], select, textarea {
    padding: 7px 9px;
    border: 1px solid #c3c8cf;
    border-radius: 6px;
    font: inherit;
    background: #fff;
    min-width: 0;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--xanh-nhat);
    outline-offset: 1px;
}

textarea { min-height: 70px; resize: vertical; }

.form-luoi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px 16px;
}

.form-luoi .rong-het { grid-column: 1 / -1; }

.nhom-chon {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px 10px;
    border: 1px solid var(--duong-ke);
    border-radius: 8px;
    background: #fafbfc;
}

.nhom-chon label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--chu-chinh);
}

.dong-duong-truyen {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 260px;
}

.dong-duong-truyen input[type=text] { flex: 1 1 auto; }

.hang-nut {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* ------------------------------- Nut ------------------------------------ */

.nut {
    display: inline-block;
    padding: 8px 16px;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: #e6ebf1;
    color: var(--xanh-dam);
}

.nut:hover { filter: brightness(.96); }
.nut-chinh { background: var(--xanh-dam-2); color: #fff; }
.nut-phu { background: #fff; border: 1px solid #c3c8cf; color: var(--chu-chinh); }
.nut-do { background: var(--loi); color: #fff; }
.nut-nho { padding: 3px 9px; font-size: 13px; border-radius: 5px; }

.bang-lich .nut-nho {
    background: rgba(255, 255, 255, .92);
    color: var(--xanh-dam);
}

.bang-lich .nut-nho.nut-do { background: #fff; color: var(--loi); }

/* --------------------------- Trang Cai dat ------------------------------- */

.xem-truoc {
    margin-top: 6px;
    padding: 10px;
    border: 1px solid var(--duong-ke);
    border-radius: 8px;
    background: #10335c;
}

.xem-truoc img {
    display: block;
    max-width: 100%;
    max-height: 150px;
    height: auto;
    margin: 0 auto;
}

.xem-truoc.nen-sang { background: #fff; }

.hop-bat-tat {
    padding: 12px 14px;
    border: 1px solid #b6d7ef;
    border-radius: 8px;
    background: #f0f7fd;
}

.hop-bat-tat label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--chu-chinh);
}

.hop-bat-tat input[type=checkbox] { margin-top: 3px; }

/* ------------------------------ Thong bao -------------------------------- */

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-weight: 600;
}

.alert-ok { background: #e6f6e6; border: 1px solid #b6e3b6; color: #14601a; }
.alert-err { background: #fdecec; border: 1px solid #f3bcbc; color: #8d1f1f; }

.loi-nhap { color: var(--loi); font-size: 13px; font-weight: 600; }
.text-danger { color: var(--loi); font-size: 13px; font-weight: 600; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

.ghi-chu { color: var(--chu-phu); font-size: 13px; }

/* ------------------------------ Thong ke -------------------------------- */

.the-so-luoi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.the-so {
    background: var(--nen-the);
    border: 1px solid var(--duong-ke);
    border-radius: 10px;
    padding: 14px 16px;
}

.the-so .nhan-so {
    font-size: 13px;
    font-weight: 700;
    color: var(--chu-phu);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.the-so .gia-tri {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--xanh-dam);
}

/* Bieu do cot don gian bang HTML, mot chuoi du lieu -> khong can chu giai */
.bd-cot {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 190px;
    padding: 6px 2px 0;
    border-bottom: 1px solid var(--luoi-bieu-do);
}

.bd-cot .cot {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    min-width: 22px;
    height: 100%;
}

.bd-cot .thanh {
    display: block;
    width: 68%;
    max-width: 44px;
    min-height: 2px;
    background: var(--cot-bieu-do);
    border-radius: 4px 4px 0 0;
}

.bd-cot .so {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--chu-phu);
    font-variant-numeric: tabular-nums;
}

.bd-truc {
    display: flex;
    gap: 8px;
    padding: 4px 2px 0;
}

.bd-truc span {
    flex: 1 1 0;
    min-width: 22px;
    text-align: center;
    font-size: 12px;
    color: var(--chu-mo);
}

/* Bieu do thanh ngang */
.bd-ngang { display: flex; flex-direction: column; gap: 8px; }

.bd-ngang .dong {
    display: grid;
    grid-template-columns: minmax(90px, 26%) 1fr 48px;
    align-items: center;
    gap: 10px;
}

.bd-ngang .ten {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--chu-chinh);
    overflow-wrap: anywhere;
}

.bd-ngang .ray { display: block; background: #eef1f4; border-radius: 4px; height: 16px; }

.bd-ngang .thanh {
    display: block;
    height: 16px;
    min-width: 2px;
    background: var(--cot-bieu-do);
    border-radius: 4px;
}

.bd-ngang .so {
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--chu-phu);
    font-variant-numeric: tabular-nums;
}

.cot-doi { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* ------------------------------ Trang chu -------------------------------- */

.khoi-gioi-thieu { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.khoi-gioi-thieu h3 { display: flex; align-items: center; gap: 8px; }
.khoi-gioi-thieu ul { margin: 0; padding-left: 20px; }
.khoi-gioi-thieu li { margin-bottom: 4px; }

.gioi-thieu-anh {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--duong-ke);
    display: block;
    margin-bottom: 14px;
}

.gioi-thieu-anh-trong {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    border: 1px dashed var(--duong-ke);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chu-phu);
    background: var(--nen-trang);
    margin-bottom: 14px;
    text-align: center;
    padding: 10px;
}

.the-gioi-thieu p { margin: 0 0 10px; }
.the-gioi-thieu p:last-child { margin-bottom: 0; }
.the-gioi-thieu h3 { margin-top: 0; }

.sua-anh-lk { display: inline-block; margin-bottom: 14px; font-size: 13px; }

/* ------------------------------ Dang nhap -------------------------------- */

.hop-dang-nhap {
    max-width: 380px;
    margin: 24px auto;
    background: var(--nen-the);
    border: 1px solid var(--duong-ke);
    border-radius: 12px;
    padding: 22px;
}

.hop-dang-nhap .o-nhap { margin-bottom: 12px; }
.hop-dang-nhap .o-nhap input { width: 100%; }

@media (max-width: 720px) {
    .header-inner { gap: 12px; }
    .logo-box { min-width: 76px; height: 44px; }
    .logo-text { font-size: 22px; }
    .site-nav { border-radius: 0; margin-top: 8px; }
}

@media print {
    .site-nav, .loc-form, .hang-nut, .c-thaotac { display: none !important; }
    body { background: #fff; }
    .bang-lich { min-width: 0; }
}
