* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    background: #e4eaec;
    color: #1e2d38;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

button,
input,
textarea,
select {
    font-family: inherit;
    letter-spacing: 0;
}

a {
    color: inherit;
}

[v-cloak] {
    display: none;
}

.ty-page {
    min-height: 100vh;
}

.ty-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid #cbd6d9;
    background: rgba(255, 255, 255, 0.97);
}

.ty-topbar__inner {
    display: flex;
    width: min(1280px, calc(100% - 40px));
    min-height: 70px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.ty-admin-page .ty-topbar__inner,
.ty-admin-page .ty-main {
    width: min(1540px, calc(100% - 32px));
}

.ty-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.ty-brand__mark {
    display: inline-flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #126b7f;
    color: #ffffff;
    font-size: 20px;
}

.ty-brand__copy {
    min-width: 0;
}

.ty-brand__eyebrow {
    color: #6a7b87;
    font-size: 12px;
    line-height: 1.3;
}

.ty-brand__title {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    color: #172936;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
}

.ty-topbar__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.ty-balance {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid #cfdae0;
    border-radius: 6px;
    background: #f7fafb;
    color: #4c6170;
    font-size: 13px;
    white-space: nowrap;
}

.ty-balance strong {
    color: #0f687b;
    font-size: 17px;
}

.ty-main {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 46px;
}

.ty-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
}

.ty-page-heading h1 {
    margin: 0;
    color: #172936;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: 0;
}

.ty-page-heading p {
    max-width: 720px;
    margin: 7px 0 0;
    color: #647784;
    font-size: 14px;
    line-height: 1.65;
}

.ty-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 26px 0 12px;
}

.ty-section-title h2 {
    margin: 0;
    color: #20313d;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: 0;
}

.ty-section-title__meta {
    color: #72828d;
    font-size: 12px;
}

.ty-status-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid #cbd6d9;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.ty-status-band__item {
    min-width: 0;
    min-height: 78px;
    padding: 14px 16px;
    border-right: 1px solid #e2e8eb;
}

.ty-status-band__item:last-child {
    border-right: 0;
}

.ty-status-band__label {
    color: #758591;
    font-size: 12px;
    line-height: 1.35;
}

.ty-status-band__value {
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: #20313c;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.ty-status-band__value--accent {
    color: #0e6c7e;
    font-size: 22px;
}

.ty-panel {
    border: 1px solid #cbd6d9;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(29, 52, 66, 0.05);
}

.ty-panel__head {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px;
    border-bottom: 1px solid #e3e9ec;
}

.ty-panel__head h2,
.ty-panel__head h3 {
    margin: 0;
    color: #20313d;
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: 0;
}

.ty-panel__body {
    padding: 20px;
}

.ty-panel__body--flush {
    padding: 0;
}

.ty-empty-state {
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}

.ty-empty-state__icon {
    margin-bottom: 12px;
    color: #28788a;
    font-size: 38px;
}

.ty-empty-state h2 {
    margin: 0;
    color: #20313d;
    font-size: 20px;
    letter-spacing: 0;
}

.ty-empty-state p {
    margin: 8px 0 18px;
    color: #70808b;
    font-size: 13px;
}

.ty-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e3e9ec;
    background: #f8fafb;
}

.ty-toolbar__filters,
.ty-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.ty-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ty-pagination {
    display: flex;
    justify-content: flex-end;
    padding: 14px 16px;
    border-top: 1px solid #e3e9ec;
}

.ty-state-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: #83919a;
    vertical-align: 1px;
}

.ty-state-dot--success {
    background: #2f855a;
}

.ty-state-dot--warning {
    background: #b7791f;
}

.ty-state-dot--danger {
    background: #b54540;
}

.ty-state-dot--info {
    background: #22748a;
}

.ty-muted {
    color: #768691;
}

.ty-positive {
    color: #26724c;
    font-weight: 700;
}

.ty-negative {
    color: #b2423d;
    font-weight: 700;
}

.ty-mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.ty-break {
    overflow-wrap: anywhere;
    word-break: break-all;
}

.ty-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.ty-form-grid__full {
    grid-column: 1 / -1;
}

.ty-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.ty-verify-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ty-verify-input .el-input {
    min-width: 0;
}

.ty-captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 10px;
    align-items: center;
}

.ty-captcha-image {
    display: block;
    width: 130px;
    height: 48px;
    border: 1px solid #ccd8de;
    border-radius: 6px;
    cursor: pointer;
}

.ty-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
}

.ty-detail-item {
    min-width: 0;
}

.ty-detail-item__label {
    color: #778792;
    font-size: 12px;
}

.ty-detail-item__value {
    margin-top: 5px;
    overflow-wrap: anywhere;
    color: #243540;
    font-size: 14px;
    line-height: 1.5;
}

.ty-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.el-button,
.el-input__inner,
.el-textarea__inner,
.el-dialog,
.el-message-box,
.el-tag {
    border-radius: 6px;
}

.el-tabs__item {
    letter-spacing: 0;
}

.el-table th > .cell,
.el-table .cell {
    letter-spacing: 0;
}

@media (max-width: 960px) {
    .ty-status-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ty-status-band__item:nth-child(2) {
        border-right: 0;
    }

    .ty-status-band__item:nth-child(-n + 2) {
        border-bottom: 1px solid #e2e8eb;
    }
}

@media (max-width: 760px) {
    .ty-topbar__inner,
    .ty-main,
    .ty-admin-page .ty-topbar__inner,
    .ty-admin-page .ty-main {
        width: calc(100% - 24px);
    }

    .ty-topbar__inner {
        min-height: 64px;
        padding: 10px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .ty-topbar__actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ty-brand__title {
        font-size: 18px;
    }

    .ty-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .ty-page-heading h1 {
        font-size: 23px;
    }

    .ty-form-grid,
    .ty-detail-grid {
        grid-template-columns: 1fr;
    }

    .ty-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .ty-toolbar__filters .el-input,
    .ty-toolbar__filters .el-select,
    .ty-toolbar__filters .el-date-editor {
        width: 100% !important;
    }

    .ty-pagination {
        justify-content: center;
        overflow-x: auto;
    }
}

@media (max-width: 520px) {
    .ty-main {
        padding-top: 16px;
    }

    .ty-status-band {
        grid-template-columns: 1fr;
    }

    .ty-status-band__item,
    .ty-status-band__item:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #e2e8eb;
    }

    .ty-status-band__item:last-child {
        border-bottom: 0;
    }

    .ty-panel__body {
        padding: 15px;
    }

    .ty-verify-input {
        align-items: stretch;
        flex-direction: column;
    }

    .ty-captcha-row {
        grid-template-columns: 1fr;
    }
}
