/* ==========================================================================
   SALARY SBD — eLNPTHAO | Cổng tra cứu phiếu lương
   Khóa luận tốt nghiệp — 05 Lê Ngọc Phương Thảo — FDS [K.KHDL] — UFM — 2026
   Chỉ phục vụ học tập. Mượn tên thương hiệu "SBD" để minh họa giao diện.

   V9 — bản tương thích Design view của Visual Studio (Web Forms Designer
   dùng engine cũ, KHÔNG hiểu flexbox/grid/biến CSS). Toàn bộ layout ở đây
   viết lại bằng float + inline-block + table-cell (CSS cổ điển, trình
   duyệt nào cũng chạy được, kể cả tab Design trong VS). Giữ NGUYÊN tên
   class đang dùng trong Default.aspx / Login.aspx / elnpthao.Master.
   ========================================================================== */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: #eef3fa;
    color: #16233a;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.6;
}

/* Sticky footer: mọi nội dung (header/main/footer) nằm trong <form
   id="form1"> của Master Page, không phải con trực tiếp của <body>.
   Nên flex-column + min-height:100vh phải đặt trên chính form đó —
   main giãn ra chiếm hết khoảng trống còn lại, footer luôn dính đáy
   màn hình dù nội dung ngắn hay dài, không lơ lửng giữa trang. */
body > form {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}
/* Tự xóa float bên trong .wrap (clearfix kiểu cũ, Designer hiểu được) */
.wrap:after { content: ""; display: table; clear: both; }

a { color: #1556a0; }

h1, h2, h3 { color: #0b1f3a; font-weight: 700; margin: 0; }
h2 { font-size: 22px; margin-bottom: 16px; }

.muted, .hint { color: #52637a; }
.hint { font-size: 13px; margin-top: 20px; }

.eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #19a7c9;
}
.eyebrow.blue, .blue { color: #1556a0; }

/* ---------------------------------------------------------------------- *
 * Header / thanh điều hướng — 2 cột nổi bằng float, không dùng flexbox
 * ---------------------------------------------------------------------- */
header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f1;
    flex-shrink: 0;
}
.nav { min-height: 78px; padding: 14px 0; }
.nav:after { content: ""; display: table; clear: both; }

.brand {
    float: left;
    color: #112a4e;
    text-decoration: none;
    font-size: 19px;
    font-weight: 700;
}
.brand:hover { text-decoration: none; }
.brand-logo { width: 110px; height: auto; vertical-align: middle; border: 0; }
.brand-title {
    display: inline-block;
    vertical-align: middle;
    border-left: 1px solid #e2e8f1;
    padding-left: 16px;
    margin-left: 16px;
    line-height: 1.3;
}
.brand b { color: #1556a0; }
.brand small {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: #8694a8;
    font-weight: 700;
    margin-top: 2px;
}

.tag, .status {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 999px;
    padding: 7px 13px;
    background: #e8f1fc;
    color: #1556a0;
    white-space: nowrap;
}
.status { background: #e6f6ee; color: #1a7a4c; }

.user {
    float: right;
    padding-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #112a4e;
}
.user .secondary { margin-left: 12px; }

/* ---------------------------------------------------------------------- *
 * Khung nội dung chính
 * ---------------------------------------------------------------------- */
main.wrap {
    min-height: 420px;
    padding-top: 20px;
    padding-bottom: 48px;
    flex: 1 0 auto;
    width: 100%;
}

.panel {
    background: #ffffff;
    border: 1px solid #e2e8f1;
    border-radius: 16px;
    padding: 30px 32px;
    margin-bottom: 24px;
}

/* ---------------------------------------------------------------------- *
 * Khối giới thiệu đầu trang tra cứu — thẻ chào mừng có avatar, không để trống
 * Dùng chung padding 30px 32px với .panel — Consistency: 2 khối thẻ phải
 * cùng nhịp đệm, không được cái cao cái thấp.
 * ---------------------------------------------------------------------- */
.intro.panel { margin-bottom: 24px; }
.intro:after { content: ""; display: table; clear: both; }
.intro > .status { float: right; margin-top: 18px; }

.intro-main { display: inline-block; vertical-align: middle; }

.avatar {
    display: inline-block;
    vertical-align: middle;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    text-align: center;
    line-height: 56px;
    margin-right: 18px;
    background-color: #1556a0; /* nền dự phòng nếu không hỗ trợ gradient */
    background-image: linear-gradient(135deg, #1556a0, #19a7c9);
}
.avatar svg { vertical-align: middle; }

.intro-text { display: inline-block; vertical-align: middle; }
.intro h1 { font-size: 26px; margin: 0 0 6px; }
.intro .muted { margin: 0; }
.intro .muted strong { color: #112a4e; }

/* ---------------------------------------------------------------------- *
 * Form / input chung
 * ---------------------------------------------------------------------- */
label {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    color: #112a4e;
    margin: 0 0 7px;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #c9d4e3;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #f7faff;
    color: #16233a;
}
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: 2px solid #1c6bc4;
    background: #ffffff;
}

.primary, .secondary {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.primary {
    background-color: #15386b; /* nền dự phòng nếu không hỗ trợ gradient */
    background-image: linear-gradient(90deg, #15386b, #1c6bc4);
    color: #ffffff;
}
.primary:hover { background-color: #112a4e; background-image: none; }
.secondary { background: #e8f1fc; color: #112a4e; }
.secondary:hover { background: #dde9fa; }
.full { display: block; width: 100%; margin-top: 22px; min-height: 48px; font-size: 15.5px; }

.error {
    display: block;
    color: #b3261e;
    background: #fdecec;
    border: 1px solid #f6c9c6;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 14px;
    font-size: 13.5px;
}
.error:empty { display: none; border: 0; padding: 0; margin: 0; }

.notice {
    display: block;
    color: #52637a;
    margin-top: 14px;
    font-size: 13.5px;
}

/* ---------------------------------------------------------------------- *
 * Màn hình đăng nhập — một cột, căn giữa
 * Canh giữa an toàn: dùng flexbox NGAY TRONG main, không kéo ra fixed theo
 * toàn viewport — vì fixed không biết header/footer cao bao nhiêu, dễ đè
 * lên dòng bản quyền bắt buộc ở footer. Flexbox trong main.wrap luôn nằm
 * đúng giữa header và footer theo flow tài liệu bình thường, không bao giờ
 * chồng lên 2 khối đó.
 * ---------------------------------------------------------------------- */
main.wrap:has(> .login-layout) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}
.login-layout {
    width: 100%;
    max-width: 440px;
    margin: 0;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f1;
}
.login-layout .login {
    /* Tăng đệm 2 bên 38px -> 48px: nội dung trước đó sát mép trái, cần
       thêm khoảng thở. Mọi width:364px bên dưới đổi theo thành 344px
       (440 - 2*48) để không tràn lề phải. */
    padding: 48px 48px 50px;
    border: 0;
    margin: 0;
    text-align: center;
}
.login-layout .eyebrow { display: block; margin-bottom: 10px; }
.login-layout .login h2 { margin: 0 0 6px; font-size: 28px; }
.login-layout label { text-align: left; }
.login-subtitle { color: #52637a; margin: 0 0 24px; font-size: 14.5px; }

.show-password-row { margin-top: 13px; text-align: left; }
.show-password-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin: 0 8px 0 0;
    cursor: pointer;
}
.show-password-row label {
    display: inline;
    vertical-align: middle;
    color: #52637a;
    font-weight: 400;
    font-size: 13.5px;
    cursor: pointer;
}

/* ---------------------------------------------------------------------- *
 * CHẾ ĐỘ ABSOLUTE / GRIDLAYOUT — Login.aspx. Kéo-thả được trong VS Design
 * view (Format > Position > Absolutely Position). Mất responsive trong
 * vùng này — tọa độ px cố định, chỉ đúng ở độ rộng card 440px.
 * ---------------------------------------------------------------------- */
.login-layout .login {
    position: relative;
    height: 500px;
    text-align: left;
}
.login-layout .eyebrow {
    position: absolute; top: 0px; left: 0px; width: 344px;
    text-align: center; margin: 0;
}
.login-layout .login h2 {
    position: absolute; top: 28px; left: 0px; width: 344px;
    text-align: center; margin: 0;
}
.login-subtitle {
    position: absolute; top: 68px; left: 0px; width: 344px;
    text-align: center; margin: 0;
}
.login-layout label[for="Username"] { position: absolute; top: 170px; left: 0px; width: 344px; }
#Username { position: absolute; top: 196px; left: 0px; width: 344px; }
.login-layout label[for="Password"] { position: absolute; top: 254px; left: 0px; width: 344px; }
#Password { position: absolute; top: 280px; left: 0px; width: 344px; }
.show-password-row { position: absolute; top: 338px; left: 0px; width: 344px; margin: 0; }
.login-layout .error { position: absolute; top: 374px; left: 0px; width: 344px; margin: 0; }
.login-layout .full { position: absolute; top: 414px; left: 0px; width: 344px; margin: 0; }

/* ---------------------------------------------------------------------- *
 * CHẾ ĐỘ ABSOLUTE / GRIDLAYOUT — Default.aspx, phần tĩnh (.intro, .filters).
 * .panel.result + .slip KHÔNG áp dụng được: nội dung sinh động từ Repeater,
 * số lượng phiếu lương thay đổi theo dữ liệu — không thể gán tọa độ cố
 * định cho phần tử lặp vô hạn số lượng. Giữ nguyên flow layout ở đó.
 * ---------------------------------------------------------------------- */
.intro.panel { position: relative; height: 116px; }
.intro-main { position: absolute; top: 0px; left: 0px; }
.intro > .status { position: absolute; top: 14px; right: 0px; float: none; }

.filters { position: relative; height: 72px; }
.filters > div, .filters > button, .filters > input[type="submit"] {
    display: block;
    position: absolute;
}
.filters > div { top: 0px; }
.filters > div:nth-child(1) { left: 0%; width: 38%; }
.filters > div:nth-child(2) { left: 40%; width: 16%; }
.filters > div:nth-child(3) { left: 58%; width: 16%; }
.filters .primary {
    left: 78%;
    top: 27px !important;
    width: 140px;
    min-height: 44px;
    padding: 0 10px;
}

/* ---------------------------------------------------------------------- *
 * Khối kết quả + thẻ phiếu lương
 * ---------------------------------------------------------------------- */
.result-head { margin-bottom: 4px; }
.result-head:after { content: ""; display: table; clear: both; }
.result-head > div { float: left; }
.result-head > button { float: right; }

.slip {
    border: 1px solid #e2e8f1;
    border-radius: 12px;
    padding: 22px 24px;
    margin-top: 18px;
    background-color: #f3f8fe;
    background-image: linear-gradient(180deg, #ffffff 0%, #f3f8fe 100%);
}
.slip-title { font-size: 15.5px; color: #0b1f3a; }
.slip-title:after { content: ""; display: table; clear: both; }
.slip-title strong { float: left; }
.slip-title .status { float: right; }
.slip-employee { color: #52637a; margin: 6px 0 0; font-size: 13.5px; }
.slip-meta { color: #8694a8; margin: 2px 0 0; font-size: 12.5px; }

/* Tiêu đề phụ cho từng khối chi tiết trong phiếu lương (chấm công, khoản
   cộng, khoản trừ) — cùng kiểu chữ với .eyebrow để đồng bộ toàn trang. */
.sub-head {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #1556a0;
    margin: 22px 0 10px;
}

/* Khối liệt kê từng khoản cộng / khoản trừ — mỗi dòng 1 khoản, kèm dòng
   tổng cộng tô nền để phân biệt với các dòng chi tiết phía trên. */
.itemlist {
    border: 1px solid #e2e8f1;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}
.itemlist > div {
    padding: 10px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid #eef2f8;
}
.itemlist > div:after { content: ""; display: table; clear: both; }
.itemlist > div span { float: left; color: #52637a; }
.itemlist > div b { float: right; color: #0b1f3a; font-weight: 600; }
.itemlist-empty {
    padding: 10px 16px;
    font-size: 13px;
    color: #8694a8;
    font-style: italic;
    border-bottom: 1px solid #eef2f8;
}
.itemlist-total {
    padding: 10px 16px;
    font-size: 13.5px;
    background: #f7faff;
}
.itemlist-total:after { content: ""; display: table; clear: both; }
.itemlist-total span { float: left; color: #112a4e; font-weight: 700; }
.itemlist-total b { float: right; color: #112a4e; font-weight: 700; }

.slip-note {
    background: #fff8e6;
    border: 1px solid #f3e3b0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 18px;
    font-size: 13px;
    color: #6b5a1f;
}
.slip-note strong { color: #4a3d11; }

.amount {
    background: #e8f1fc;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 18px 0;
    color: #112a4e;
}
.amount span {
    display: block;
    font-size: 11.5px;
    letter-spacing: 1.4px;
    font-weight: 700;
    color: #1556a0;
}
.amount strong { display: block; font-size: 32px; margin-top: 2px; }

/* .lines: 2 cột bằng float thay vì grid */
.lines:after { content: ""; display: table; clear: both; }
.lines div {
    float: left;
    width: 50%;
    padding: 11px 20px 11px 0;
    border-bottom: 1px solid #e2e8f1;
    font-size: 13.5px;
}
.lines div:after { content: ""; display: table; clear: both; }
.lines div span { float: left; color: #52637a; }
.lines div b { float: right; color: #0b1f3a; }

/* ---------------------------------------------------------------------- *
 * Footer
 * ---------------------------------------------------------------------- */
footer {
    border-top: 1px solid #e2e8f1;
    background: #ffffff;
    padding: 24px 0 28px;
    color: #52637a;
    font-size: 12.5px;
    flex-shrink: 0;
}
footer strong { color: #0b1f3a; line-height: 1.7; }
footer p { margin: 6px 0 0; }

/* ---------------------------------------------------------------------- *
 * Responsive (chỉ áp dụng khi xem bằng trình duyệt thật; Designer bỏ qua
 * media query nên không ảnh hưởng tới việc xem trong VS)
 * ---------------------------------------------------------------------- */
@media (max-width: 740px) {
    .wrap { padding-left: 16px; padding-right: 16px; }
    .brand-logo { width: 90px; }
    .brand-title { font-size: 15px; padding-left: 12px; margin-left: 12px; }
    .tag { display: none; }
    .user { float: none; display: block; margin-top: 10px; }
    .panel { padding: 20px; }
    .intro > .status { float: none; display: inline-block; margin-top: 14px; }
    .intro h1 { font-size: 22px; }
    .avatar { width: 44px; height: 44px; line-height: 44px; }
    .filters, .filters > div, .filters > button { display: block; width: 100% !important; padding-right: 0; }
    .filters > div { margin-bottom: 14px; }
    .login-layout { width: calc(100% - 32px); max-width: 400px; }
    .login-layout .login { padding: 28px 24px; }
    .lines div { float: none; width: 100%; }
}

/* ---------------------------------------------------------------------- *
 * In phiếu lương
 * ---------------------------------------------------------------------- */
@media print {
    header, .intro, .filters, .notice, .result-head button, footer,
    .panel:not(.result) {
        display: none !important;
    }
    body, main { background: #fff !important; }
    .result { border: 0; margin: 0; padding: 0; }
    .slip { break-inside: avoid; }
}
