html,
body {
    min-height: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.tx_db_body {
    margin: 0;
    background: #071127;
    color: #243a5a;
    font-family: "Inter", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.tx_db_body a {
    text-decoration: none;
}

.tx_db_shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(520px, 36vw, 640px);
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 70% 22%, rgba(87, 94, 224, 0.14), transparent 30%),
        radial-gradient(circle at 20% 84%, rgba(24, 187, 211, 0.14), transparent 34%),
        #071127;
}

.tx_db_visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #071127;
}

.tx_login_slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.035);
    background-position: center;
    background-size: cover;
    transition: opacity 1100ms ease, transform 6200ms ease;
}

.tx_login_slide.tx_is_active {
    opacity: 1;
    transform: scale(1);
}

.tx_db_visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 16% 78%, rgba(20, 171, 196, 0.18), transparent 34%),
        linear-gradient(90deg, rgba(7, 17, 39, 0.06) 0%, rgba(7, 17, 39, 0.12) 54%, rgba(7, 17, 39, 0.82) 100%),
        linear-gradient(180deg, rgba(7, 17, 39, 0.14) 0%, transparent 34%, rgba(7, 17, 39, 0.34) 100%);
}

.tx_db_visual_overlay {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 54px 58px 56px;
}

.tx_db_brand_img {
    display: block;
    width: auto;
    max-width: 220px;
    max-height: 44px;
    object-fit: contain;
}

.tx_db_copy {
    max-width: 620px;
    margin-bottom: 24px;
}

.tx_db_copy span,
.tx_db_kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: #35c7e6;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.tx_db_copy h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 52px;
    font-weight: 780;
    line-height: 1.08;
    letter-spacing: 0;
}

.tx_db_copy p {
    max-width: 560px;
    margin: 0;
    color: rgba(238, 244, 255, 0.76);
    font-size: 17px;
    line-height: 1.75;
}

.tx_db_insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
}

.tx_db_insights div {
    min-height: 78px;
    padding: 16px;
    border: 1px solid rgba(124, 207, 232, 0.24);
    border-radius: 8px;
    background: rgba(8, 20, 42, 0.42);
    backdrop-filter: blur(12px);
}

.tx_db_insights strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 680;
}

.tx_db_insights small {
    color: rgba(216, 232, 255, 0.7);
    font-size: 12px;
}

.tx_login_dots {
    position: absolute;
    right: 58px;
    bottom: 34px;
    display: flex;
    gap: 7px;
}

.tx_login_dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    transition: width 220ms ease, background 220ms ease;
}

.tx_login_dots span.tx_is_active {
    width: 24px;
    background: #54d7ea;
}

.tx_db_panel {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 100vh;
    padding: 42px;
    background: #f4f8fb;
}

.tx_db_panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 248, 251, 0.96)),
        radial-gradient(circle at 88% 16%, rgba(20, 167, 204, 0.14), transparent 30%),
        radial-gradient(circle at 6% 88%, rgba(22, 104, 220, 0.08), transparent 34%);
}

.tx_db_card {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    max-height: calc(100vh - 84px);
    overflow: auto;
    padding: 30px;
    border: 1px solid rgba(211, 225, 239, 0.96);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 64px rgba(20, 48, 88, 0.12);
}

.tx_db_card_header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.tx_db_card_header h2 {
    margin: 0;
    color: #0b2b55;
    font-size: 28px;
    font-weight: 680;
    letter-spacing: 0;
}

.tx_db_back {
    flex: 0 0 auto;
    margin-top: 4px;
    color: #496b92;
    font-size: 13px;
}

.tx_db_back:hover {
    color: #0f85c8;
}

.tx_db_list {
    gap: 10px;
}

.tx_db_list.list-group {
    display: grid;
}

.tx_db_item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid #d8e5f1;
    border-radius: 8px;
    background: #fbfdff;
}

.tx_db_name {
    display: flex;
    align-items: center;
    min-width: 0;
    color: #173154;
    font-size: 15px;
    font-weight: 560;
}

.tx_db_name:hover {
    color: #0f85c8;
}

.tx_db_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #1687ff 0%, #22c0cf 100%);
    box-shadow: 0 8px 18px rgba(22, 135, 255, 0.16);
}

.tx_db_actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.tx_db_action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 560;
    line-height: 1;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tx_db_action:hover {
    transform: translateY(-1px);
}

.tx_db_action i {
    margin-right: 4px;
    pointer-events: none;
}

.tx_db_action_primary {
    color: #0e6fb5;
    border-color: #b9dcea;
    background: #f1f9fc;
}

.tx_db_action_neutral {
    color: #4b607d;
    border-color: #d8e4ef;
    background: #f7fafc;
}

.tx_db_action_danger {
    color: #c9425b;
    border-color: #f6cbd5;
    background: #fff7f9;
}

.tx_db_primary_actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.tx_db_primary_actions .btn {
    min-width: 0;
    min-height: 42px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 560;
    white-space: normal;
}

.tx_db_primary_actions .btn-primary,
.tx_db_card .btn-primary,
.modal-content .btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #1668dc 0%, #0f91c2 100%);
    box-shadow: 0 12px 24px rgba(15, 122, 191, 0.18);
}

.tx_db_primary_actions .btn-primary:hover,
.tx_db_card .btn-primary:hover,
.modal-content .btn-primary:hover {
    border-color: transparent;
    background: linear-gradient(135deg, #125bc2 0%, #0b80ad 100%);
}

.tx_db_primary_actions .btn-outline-primary,
.tx_db_card .btn-outline-primary {
    color: #0f65b8;
    border-color: #8fc2e6;
    background: #fff;
}

.tx_db_primary_actions .btn-outline-primary:hover,
.tx_db_card .btn-outline-primary:hover {
    color: #0b548f;
    border-color: #5baed6;
    background: #edf8fc;
}

.tx_db_empty_form {
    margin-top: 8px;
}

.tx_db_card .form-control,
.tx_db_card .form-select,
.modal-content .form-control,
.modal-content .form-select {
    min-height: 40px;
    border-color: #d7e4ef;
    border-radius: 7px;
    color: #243a5a;
    box-shadow: none;
}

.tx_db_card .form-control:focus,
.tx_db_card .form-select:focus,
.modal-content .form-control:focus,
.modal-content .form-select:focus {
    border-color: #1492c4;
    box-shadow: 0 0 0 3px rgba(20, 146, 196, 0.12);
}

.modal-content {
    border: 1px solid #d7e4ef;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(19, 44, 83, 0.16);
}

.modal-header,
.modal-footer {
    border-color: #e2ebf4;
}

.modal-title {
    color: #0b2b55;
    font-size: 20px;
    font-weight: 680;
}

.modal .o_little_eye {
    cursor: pointer;
}

@media (max-width: 1180px) {
    .tx_db_shell {
        grid-template-columns: minmax(0, 0.82fr) minmax(500px, 1fr);
    }

    .tx_db_visual_overlay {
        padding: 44px 40px;
    }

    .tx_db_copy h1 {
        font-size: 42px;
    }

    .tx_db_insights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .tx_db_shell {
        display: block;
        min-height: 100vh;
        background: #f6f9fd;
    }

    .tx_db_visual {
        min-height: 230px;
    }

    .tx_db_visual_overlay {
        min-height: 230px;
        padding: 28px;
    }

    .tx_db_copy,
    .tx_db_insights,
    .tx_login_dots {
        display: none;
    }

    .tx_db_panel {
        min-height: calc(100vh - 230px);
        padding: 22px;
    }

    .tx_db_card {
        max-height: none;
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .tx_db_panel {
        display: block;
        padding: 14px;
        overflow-x: hidden;
    }

    .tx_db_card {
        width: calc(100vw - 28px);
        max-width: calc(100vw - 28px);
        padding: 20px 16px;
    }

    .tx_db_card_header {
        display: block;
    }

    .tx_db_back {
        display: inline-flex;
        margin-top: 10px;
    }

    .tx_db_item {
        grid-template-columns: 1fr;
    }

    .tx_db_actions {
        justify-content: flex-start;
    }

    .tx_db_primary_actions {
        grid-template-columns: 1fr;
    }
}
