* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2a37;
    background: #f4f6f8;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f4c81;
}

.card {
    width: 400px;
    padding: 36px 32px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.brand {
    margin: 0;
    color: #0f4c81;
    font-size: 14px;
    font-weight: 700;
}

h1 {
    margin: 8px 0 4px;
    font-size: 22px;
}

h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.desc,
.muted {
    margin: 0 0 8px;
    color: #667085;
}

label {
    display: block;
    margin: 14px 0 6px;
    font-size: 14px;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
}

button,
.button {
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: #0f4c81;
    color: #fff;
    cursor: pointer;
}

button.secondary,
.button.secondary {
    background: #fff;
    color: #1f2a37;
    border: 1px solid #d0d5dd;
}

.full {
    width: 100%;
    margin-top: 18px;
}

.error {
    min-height: 22px;
    margin: 10px 0 0;
    color: #cf1322;
}

.ok {
    min-height: 22px;
    margin: 10px 0 0;
    color: #067647;
}

.form-grid {
    display: grid;
    grid-template-columns: 140px minmax(240px, 640px);
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.form-grid label {
    margin: 0;
}

.form-grid input[type="date"] {
    width: 180px;
}

#bcForm .actions {
    margin-top: 16px;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.checkline input {
    width: auto;
    height: auto;
}

.bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #e6e8eb;
}

.panel {
    margin: 16px 24px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
}

.toolbar,
.actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.toolbar input {
    max-width: 420px;
}

.loadbar {
    height: 3px;
    margin-top: 12px;
    background: #e6eef5;
    border-radius: 999px;
    overflow: hidden;
}

.loadbar[hidden] {
    display: none;
}

.loadbar span {
    display: block;
    height: 100%;
    width: 35%;
    background: #0f4c81;
    border-radius: 999px;
    animation: loadbar 0.9s ease-in-out infinite;
}

button.loading {
    position: relative;
    overflow: hidden;
}

button.loading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 40%;
    background: rgba(255, 255, 255, 0.9);
    animation: loadbar 0.9s ease-in-out infinite;
}

button.secondary.loading::after {
    background: #0f4c81;
}

button:disabled {
    cursor: default;
    opacity: 0.7;
}

@keyframes loadbar {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #eaecf0;
    text-align: left;
    white-space: nowrap;
}

th {
    color: #667085;
    font-weight: 600;
    background: #f8fafc;
    vertical-align: top;
}

.col-head {
    min-width: 108px;
}

.col-filter,
select.col-filter {
    width: 100%;
    height: 28px;
    margin-top: 6px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 400;
    color: #1f2a37;
    background: #fff;
}

.col-head.range {
    min-width: 248px;
}

.col-range {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.col-range span {
    color: #98a2b3;
    font-size: 12px;
    font-weight: 400;
}

.col-range input {
    width: 112px;
    height: 28px;
    margin: 0;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 400;
}

.col-filter.active {
    border-color: #0f4c81;
}

.check-col {
    width: 42px;
    min-width: 42px;
    text-align: center;
}

.row-check {
    width: 16px;
    height: 16px;
    accent-color: #409eff;
    cursor: pointer;
}

tr.row-selected td {
    background: #f5f7fa;
}

.export-box {
    position: relative;
}

.export-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 6;
    width: 220px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.export-menu p {
    margin: 10px 0 6px;
    color: #667085;
    font-size: 13px;
}

.export-menu p:first-child {
    margin-top: 0;
}

.export-menu .checkline {
    margin: 6px 0;
    font-size: 14px;
}

.export-menu button {
    width: 100%;
    margin-top: 10px;
}

.pager {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.pager-pages {
    display: flex;
    gap: 8px;
    align-items: center;
}

button.pager-btn,
button.pager-size-btn {
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    border: 1px solid #dcdfe6;
    border-radius: 2px;
    background: #fff;
    color: #606266;
    font-size: 14px;
}

button.pager-btn.current {
    background: #409eff;
    border-color: #409eff;
    color: #fff;
}

button.pager-btn:hover:not(:disabled):not(.current),
button.pager-size-btn:hover {
    color: #409eff;
}

button.pager-btn:disabled {
    color: #c0c4cc;
    background: #fff;
    opacity: 1;
}

button.pager-btn.loading::after,
button.pager-size-btn.loading::after {
    background: #409eff;
}

button.pager-btn.current.loading::after {
    background: #fff;
}

.pager-ellipsis {
    min-width: 32px;
    color: #606266;
    text-align: center;
}

.chevron {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
}

.chevron.left {
    transform: rotate(135deg);
    margin-left: 2px;
}

.chevron.right {
    transform: rotate(-45deg);
    margin-right: 2px;
}

.pager-size {
    position: relative;
    margin-left: 8px;
}

button.pager-size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 110px;
    padding: 0 12px;
}

.pager-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #c0c4cc;
}

.pager-size.open .pager-caret {
    border-top: 0;
    border-bottom: 5px solid #409eff;
}

.pager-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 5;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    min-width: 110px;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.pager-menu button {
    width: 100%;
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #606266;
    text-align: left;
}

.pager-menu button:hover,
.pager-menu button.active {
    background: #f5f7fa;
    color: #409eff;
}

dialog {
    width: 440px;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.35);
}

.link {
    color: #0f4c81;
    background: transparent;
    border: 0;
    padding: 0;
    height: auto;
    cursor: pointer;
}
