:root {
    --tf-primary: #448fff;
    --tf-primary-dark: #357ab7;
    --tf-danger: #ff4d4f;
    --tf-success: #07c160;
    --tf-text: #333;
    --tf-muted: #7f8490;
    --tf-border: #eceef3;
    --tf-surface: #fff;
    --tf-page: #f5f4f4;
    --tf-radius: 12px;
    --tf-shadow: 0 12px 36px rgba(61, 82, 120, .10);
}

* {
    box-sizing: border-box;
}

html {
    color: var(--tf-text);
    background: var(--tf-page);
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(to bottom, transparent 0%, transparent 68%, #f5f5f5 96%),
        radial-gradient(circle at 0 0, #fff5f5 10%, #ffe0e0 22%, transparent 50%),
        radial-gradient(circle at 100% 0, #f0f8ff 15%, #e6f3ff 30%, transparent 65%),
        var(--tf-page);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.tf-shell {
    width: min(100%, 1180px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px 18px 90px;
}

.tf-shell--mobile {
    width: min(100%, 600px);
}

.tf-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: var(--tf-radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--tf-shadow);
}

.tf-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tf-brand img {
    width: 54px;
    height: 54px;
    border: 3px solid #fff;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 8px 22px rgba(68, 143, 255, .18);
}

.tf-brand h1 {
    margin: 0 0 4px;
    font-size: 21px;
}

.tf-brand p {
    margin: 0;
    color: var(--tf-muted);
    font-size: 13px;
}

.tf-form {
    display: grid;
    gap: 15px;
}

.tf-field {
    display: grid;
    gap: 7px;
}

.tf-field span {
    color: #5e6370;
    font-size: 14px;
}

.tf-input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #dde1e9;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.tf-input:focus {
    border-color: var(--tf-primary);
    box-shadow: 0 0 0 4px rgba(68, 143, 255, .11);
}

.tf-button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 23px;
    color: #fff;
    background: linear-gradient(135deg, #62a6ff, var(--tf-primary));
    box-shadow: 0 10px 20px rgba(68, 143, 255, .22);
    cursor: pointer;
}

.tf-alert {
    padding: 11px 13px;
    border-radius: 9px;
    color: #b42318;
    background: #fff1f0;
    font-size: 13px;
}

.tf-login {
    display: grid;
    min-height: calc(100vh - 150px);
    place-items: center;
}

.tf-login-card {
    width: min(100%, 410px);
    padding: 28px;
}

.tf-login-card .tf-brand {
    margin-bottom: 26px;
}

.tf-brand-footer {
    padding: 24px 12px 0;
    color: #8a8f98;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
}

.tf-brand-footer span {
    display: block;
}

.tf-sales {
    display: grid;
    gap: 12px;
    padding-bottom: 82px;
}

.tf-sales-banner {
    width: 100%;
    max-height: 260px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: var(--tf-shadow);
}

.tf-sales-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tf-sales-profile > img {
    width: 72px;
    height: 72px;
    border-radius: 13px;
    object-fit: cover;
}

.tf-sales-profile h1 {
    margin: 0 0 7px;
    font-size: 20px;
}

.tf-sales-profile p,
.tf-payment-loading p,
.tf-qr-result p {
    margin: 5px 0;
    color: var(--tf-muted);
    font-size: 14px;
    line-height: 1.65;
}

.tf-section-title {
    margin: 0 0 14px;
    font-size: 16px;
}

.tf-avatar-row {
    display: flex;
    gap: 7px;
    overflow: hidden;
}

.tf-avatar-row img {
    width: 45px;
    height: 45px;
    flex: 0 0 auto;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 3px 12px rgba(42, 57, 79, .12);
}

.tf-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tf-preview-grid img {
    width: 100%;
    max-height: 390px;
    border-radius: 10px;
    object-fit: cover;
    object-position: top;
}

.tf-buy-bar {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: min(100%, 600px);
    margin: auto;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--tf-border);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -8px 24px rgba(55, 69, 91, .09);
    backdrop-filter: blur(12px);
}

.tf-buy-bar small {
    display: block;
    color: var(--tf-muted);
}

.tf-buy-bar strong {
    color: var(--tf-danger);
    font-size: 23px;
}

.tf-buy-bar .tf-button {
    min-width: 145px;
}

.tf-payment-loading,
.tf-qr-result {
    width: min(100%, 400px);
    text-align: center;
}

.tf-payment-loading > img,
.tf-result-success {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.tf-payment-loading h1,
.tf-qr-result h1 {
    margin: 16px 0 10px;
    font-size: 22px;
}

.tf-payment-loading form {
    margin-top: 22px;
}

.tf-result-qr {
    display: block;
    width: min(100%, 290px);
    margin: 20px auto 12px;
    border-radius: 10px;
}

.tf-result-tip {
    padding: 10px;
    border-radius: 8px;
    background: #f4f8ff;
}

.tf-console-header {
    display: flex;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
}

.tf-console-header .tf-brand img {
    border-radius: 50%;
}

.tf-text-button {
    padding: 8px 10px;
    border: 0;
    color: var(--tf-muted);
    background: transparent;
    cursor: pointer;
}

.tf-level-summary,
.tf-next-level {
    display: flex;
    margin-bottom: 12px;
    align-items: center;
    justify-content: space-between;
}

.tf-level-summary > div {
    display: grid;
    gap: 6px;
}

.tf-level-summary small,
.tf-next-level small,
.tf-level-card small {
    color: var(--tf-muted);
}

.tf-stats-grid {
    display: grid;
    margin-bottom: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tf-stats-grid .tf-card {
    display: grid;
    min-height: 94px;
    align-content: center;
    text-align: center;
}

.tf-stats-grid strong {
    margin-bottom: 10px;
    color: var(--tf-danger);
    font-size: 21px;
}

.tf-stats-grid span {
    color: var(--tf-muted);
    font-size: 13px;
}

.tf-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tf-menu-grid a {
    display: grid;
    padding: 13px 5px;
    place-items: center;
    gap: 8px;
    border-radius: 10px;
    color: #696974;
    background: #fafbfe;
    font-size: 13px;
}

.tf-menu-grid img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.tf-next-level {
    margin-top: 12px;
}

.tf-next-level h2 {
    margin: 5px 0;
    font-size: 18px;
}

.tf-next-level p,
.tf-page-heading p,
.tf-list-card p,
.tf-level-card p {
    margin: 5px 0;
    color: var(--tf-muted);
    font-size: 13px;
}

.tf-mini-button {
    display: inline-flex;
    min-height: 34px;
    padding: 0 14px;
    align-items: center;
    border: 0;
    border-radius: 17px;
    color: #fff;
    background: var(--tf-primary);
    cursor: pointer;
}

.tf-page-heading {
    margin: 4px 4px 16px;
}

.tf-page-heading h2 {
    margin: 0;
    font-size: 21px;
}

.tf-list {
    display: grid;
    gap: 10px;
}

.tf-list-card {
    display: flex;
    gap: 13px;
    align-items: center;
}

.tf-list-card > img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.tf-list-card h3 {
    margin: 0 0 5px;
}

.tf-copy-result {
    position: fixed;
    z-index: 30;
    right: 14px;
    bottom: 82px;
    left: 14px;
    width: min(calc(100% - 28px), 572px);
    margin: auto;
    padding: 13px;
    border-radius: 10px;
    color: #fff;
    background: rgba(28, 34, 45, .93);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.tf-records {
    display: grid;
}

.tf-records > div {
    display: grid;
    padding: 12px 0;
    grid-template-columns: 1.5fr .7fr .6fr;
    gap: 8px;
    border-bottom: 1px solid var(--tf-border);
    font-size: 12px;
}

.tf-records em {
    color: var(--tf-success);
    text-align: right;
    font-style: normal;
}

.tf-level-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tf-level-card.is-current {
    border-color: rgba(68, 143, 255, .42);
    background: linear-gradient(135deg, #fff, #f1f7ff);
}

.tf-level-card h2 {
    margin: 6px 0;
}

.tf-level-card > strong {
    color: var(--tf-danger);
    font-size: 20px;
}

.tf-resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tf-resource-grid article,
.tf-message-list article {
    padding: 12px;
    border-radius: 10px;
    background: #f8f9fc;
}

.tf-resource-grid img {
    width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.tf-resource-grid h3 {
    margin: 9px 0 5px;
    font-size: 14px;
}

.tf-resource-grid p,
.tf-message-list p {
    color: var(--tf-muted);
    font-size: 12px;
    line-height: 1.6;
}

.tf-message-list {
    display: grid;
    gap: 9px;
}

.tf-message-list small {
    color: #9ba0aa;
}

.tf-empty {
    color: var(--tf-muted);
    text-align: center;
}

.tf-bottom-nav {
    position: fixed;
    z-index: 25;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: min(100%, 600px);
    margin: auto;
    padding-bottom: env(safe-area-inset-bottom);
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--tf-border);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -8px 24px rgba(55, 69, 91, .08);
    backdrop-filter: blur(12px);
}

.tf-bottom-nav a {
    padding: 13px 4px;
    color: #8b909a;
    text-align: center;
    font-size: 12px;
}

.tf-bottom-nav a.is-active {
    color: var(--tf-primary);
    font-weight: 700;
}

.tf-admin-header {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
    justify-content: space-between;
}

.tf-admin-header nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tf-admin-header nav > a {
    padding: 9px 13px;
    border-radius: 18px;
    color: #686e78;
    background: rgba(255, 255, 255, .76);
    font-size: 13px;
}

.tf-admin-stats {
    display: grid;
    margin-bottom: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.tf-admin-stats .tf-card {
    display: grid;
    min-height: 130px;
    align-content: center;
}

.tf-admin-stats span {
    color: var(--tf-muted);
    font-size: 13px;
}

.tf-admin-stats strong {
    margin: 10px 0;
    color: var(--tf-danger);
    font-size: 25px;
}

.tf-admin-stats small {
    color: #a1a5ae;
}

.tf-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr);
    gap: 12px;
}

.tf-admin-table {
    overflow-x: auto;
}

.tf-admin-table > div {
    display: grid;
    min-width: 630px;
    padding: 12px 4px;
    grid-template-columns: 1.7fr .7fr .7fr .8fr;
    gap: 10px;
    border-bottom: 1px solid var(--tf-border);
    color: #5f6570;
    font-size: 13px;
}

.tf-admin-table .tf-admin-table-head {
    color: #8d929d;
    font-size: 12px;
}

.tf-admin-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.tf-admin-menu a {
    display: grid;
    padding: 13px 5px;
    place-items: center;
    gap: 8px;
    border-radius: 10px;
    background: #f8f9fc;
    color: #686e78;
    font-size: 12px;
}

.tf-admin-menu img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.tf-management-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tf-management-grid h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.tf-management-grid h2 small {
    color: var(--tf-muted);
    font-size: 11px;
    font-weight: normal;
}

.tf-management-grid p {
    min-height: 42px;
    color: var(--tf-muted);
    font-size: 13px;
    line-height: 1.6;
}

.tf-manage-tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 14px;
    padding: 7px;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 8px 25px rgba(65, 77, 99, .06);
    scrollbar-width: none;
}

.tf-manage-tabs::-webkit-scrollbar {
    display: none;
}

.tf-manage-tabs a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 10px;
    color: #707681;
    font-size: 13px;
    white-space: nowrap;
}

.tf-manage-tabs a.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--tf-primary), #6d7cff);
    box-shadow: 0 7px 16px rgba(70, 98, 255, .22);
    font-weight: 700;
}

.tf-manage-layout {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(540px, 1.5fr);
    align-items: start;
    gap: 13px;
}

.tf-manage-layout > *,
.tf-manage-list-card {
    min-width: 0;
}

.tf-manage-form-card {
    position: sticky;
    top: 12px;
}

.tf-section-heading,
.tf-list-title,
.tf-switch-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tf-section-heading {
    margin-bottom: 17px;
}

.tf-section-heading span {
    color: var(--tf-primary);
    font-size: 11px;
}

.tf-section-heading h2,
.tf-list-title h2 {
    margin: 3px 0 0;
    font-size: 19px;
}

.tf-section-heading img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.tf-list-title {
    margin-bottom: 13px;
}

.tf-list-title span {
    padding: 5px 10px;
    border-radius: 15px;
    color: #858b95;
    background: #f4f6fa;
    font-size: 11px;
}

.tf-admin-form {
    display: grid;
    gap: 11px;
}

.tf-admin-form label {
    display: grid;
    gap: 6px;
    color: #686e78;
    font-size: 12px;
}

.tf-admin-form input,
.tf-admin-form select,
.tf-admin-form textarea,
.tf-inline-form input,
.tf-inline-form select,
.tf-action-group input {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    border: 1px solid #e5e8ef;
    border-radius: 9px;
    outline: none;
    color: #343944;
    background: #fafbfc;
    font: inherit;
}

.tf-admin-form textarea {
    resize: vertical;
}

.tf-admin-form input:focus,
.tf-admin-form select:focus,
.tf-admin-form textarea:focus {
    border-color: rgba(80, 106, 255, .55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(80, 106, 255, .08);
}

.tf-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.tf-form-tip {
    margin: 0;
    color: #9298a3;
    font-size: 11px;
    line-height: 1.55;
}

.tf-primary-button {
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--tf-primary), #6d7cff);
    box-shadow: 0 8px 18px rgba(70, 98, 255, .22);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.tf-primary-button:hover {
    filter: brightness(1.03);
}

.tf-primary-button:disabled {
    cursor: not-allowed;
    filter: grayscale(.6);
    opacity: .55;
}

.tf-data-table {
    overflow-x: auto;
}

.tf-data-row {
    display: grid;
    min-width: 690px;
    padding: 12px 4px;
    grid-template-columns: 1.35fr 1fr .75fr 1.05fr;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--tf-border);
    color: #59606b;
    font-size: 13px;
}

.tf-data-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.tf-data-row strong,
.tf-compact-row strong {
    display: block;
    color: #323842;
}

.tf-data-row small,
.tf-compact-row small {
    display: block;
    margin-top: 4px;
    color: #9aa0aa;
    font-size: 10px;
}

.tf-data-head {
    min-height: auto;
    padding-top: 5px;
    color: #969ba5;
    font-size: 11px;
}

.tf-level-row {
    grid-template-columns: 1fr 1.15fr .8fr .65fr;
}

.tf-order-row {
    min-width: 850px;
    grid-template-columns: 1.25fr .85fr .75fr .8fr 1.2fr;
}

.tf-withdraw-row {
    min-width: 780px;
    grid-template-columns: 1fr .7fr .8fr 1.7fr;
}

.tf-inline-form,
.tf-action-group,
.tf-action-group form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tf-inline-form {
    flex-wrap: wrap;
}

.tf-inline-form select {
    min-width: 100px;
    min-height: 32px;
    padding: 5px 7px;
    font-size: 11px;
}

.tf-action-group {
    flex-wrap: wrap;
}

.tf-action-group input {
    width: 130px;
    min-height: 32px;
    font-size: 11px;
}

.tf-button-danger {
    color: #fff;
    border-color: #f16b72;
    background: #f16b72;
}

.tf-sub-list {
    padding: 13px 0;
    border-bottom: 1px solid var(--tf-border);
}

.tf-sub-list h3 {
    margin: 0 0 6px;
    color: #454b56;
    font-size: 14px;
}

.tf-sub-list h3 small {
    color: #9ba0aa;
    font-weight: normal;
}

.tf-compact-row {
    display: flex;
    padding: 9px 2px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px dashed #eceef3;
    color: #59606b;
    font-size: 13px;
}

.tf-compact-row b {
    color: var(--tf-primary);
    white-space: nowrap;
}

.tf-switch-panel {
    margin-bottom: 15px;
    padding: 14px;
    border-radius: 11px;
    background: linear-gradient(135deg, #f4f7ff, #faf7ff);
}

.tf-switch-panel strong {
    color: #3c4350;
    font-size: 14px;
}

.tf-switch-panel p {
    margin: 5px 0 0;
    color: #8f95a0;
    font-size: 11px;
}

.tf-resource-summary {
    margin-top: 13px;
    grid-template-columns: repeat(2, 1fr);
}

.tf-resource-summary strong {
    color: var(--tf-primary);
    font-size: 28px;
}

.tf-admin-toast {
    position: fixed;
    z-index: 99;
    top: 18px;
    left: 50%;
    max-width: min(90vw, 520px);
    padding: 11px 18px;
    transform: translate(-50%, -150%);
    border-radius: 22px;
    color: #fff;
    background: #3a4453;
    box-shadow: 0 12px 35px rgba(45, 53, 67, .2);
    opacity: 0;
    transition: .22s ease;
    font-size: 13px;
}

.tf-admin-toast.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.tf-admin-toast.is-success {
    background: #32ae77;
}

.tf-admin-toast.is-error {
    background: #e45861;
}

.tf-install-shell {
    width: min(100% - 28px, 980px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 34px 0 22px;
}

.tf-install-hero {
    display: flex;
    margin-bottom: 16px;
    padding: 22px 26px;
    align-items: center;
    gap: 17px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 12px 38px rgba(65, 77, 99, .08);
}

.tf-install-hero > img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
}

.tf-install-hero span,
.tf-install-section-title span {
    color: var(--tf-primary);
    font-size: 11px;
}

.tf-install-hero h1 {
    margin: 4px 0 6px;
    color: #2d333e;
    font-size: 25px;
}

.tf-install-hero p,
.tf-install-submit p {
    margin: 0;
    color: #8b919c;
    font-size: 12px;
}

.tf-install-errors {
    margin-bottom: 14px;
    padding: 14px 18px;
    border: 1px solid #ffd5d8;
    border-radius: 12px;
    color: #bd4149;
    background: #fff5f6;
    font-size: 13px;
}

.tf-install-errors p {
    margin: 5px 0 0;
}

.tf-install-checks,
.tf-install-card,
.tf-install-submit {
    margin-bottom: 14px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 15px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 26px rgba(65, 77, 99, .06);
}

.tf-install-section-title {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tf-install-section-title h2 {
    margin: 3px 0 0;
    color: #343a45;
    font-size: 18px;
}

.tf-install-section-title > img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.tf-install-section-title > b {
    padding: 6px 11px;
    border-radius: 15px;
    font-size: 11px;
}

.tf-install-section-title > b.is-pass {
    color: #16875c;
    background: #eaf9f2;
}

.tf-install-section-title > b.is-fail {
    color: #c34b53;
    background: #fff0f1;
}

.tf-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.tf-check-item {
    display: flex;
    min-width: 0;
    padding: 10px;
    align-items: center;
    gap: 9px;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    background: #fafbfc;
}

.tf-check-item > img {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    object-fit: contain;
}

.tf-check-item strong,
.tf-check-item small {
    display: block;
}

.tf-check-item strong {
    overflow: hidden;
    color: #535a66;
    text-overflow: ellipsis;
    font-size: 12px;
    white-space: nowrap;
}

.tf-check-item small {
    margin-top: 3px;
    color: #9a9faa;
    font-size: 10px;
}

.tf-check-item.is-fail {
    border-color: #ffdadd;
    background: #fff7f7;
}

.tf-install-form {
    display: block;
}

.tf-install-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.tf-install-fields label {
    display: grid;
    min-width: 0;
    gap: 6px;
    color: #686e78;
    font-size: 12px;
}

.tf-install-fields input,
.tf-install-fields select {
    width: 100%;
    min-height: 41px;
    padding: 8px 11px;
    border: 1px solid #e3e7ee;
    border-radius: 9px;
    outline: none;
    color: #333944;
    background: #fafbfc;
    font: inherit;
}

.tf-install-fields input:focus,
.tf-install-fields select:focus {
    border-color: rgba(80, 106, 255, .55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(80, 106, 255, .08);
}

.tf-field-wide {
    grid-column: 1 / -1;
}

.tf-install-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.tf-install-submit strong {
    display: block;
    margin-bottom: 5px;
    color: #3d4450;
    font-size: 14px;
}

.tf-install-success-shell {
    display: grid;
    align-content: center;
}

.tf-install-success {
    max-width: 540px;
    margin: auto;
    padding: 42px 28px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 18px 48px rgba(65, 77, 99, .1);
    text-align: center;
}

.tf-install-success img {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.tf-install-success span {
    display: block;
    margin-top: 13px;
    color: #25a371;
    font-size: 12px;
}

.tf-install-success h1 {
    margin: 5px 0 10px;
    color: #303640;
}

.tf-install-success p {
    margin: 0 0 22px;
    color: #858b95;
    line-height: 1.7;
}

.tf-install-success .tf-primary-button {
    display: inline-block;
}

@media (max-width: 640px) {
    .tf-shell {
        padding: 18px 12px 76px;
    }

    .tf-login-card {
        padding: 22px 18px;
    }

    .tf-admin-header {
        align-items: flex-start;
    }

    .tf-admin-header nav {
        display: grid;
        justify-items: end;
    }

    .tf-admin-header nav > a {
        padding: 5px 8px;
        background: transparent;
    }

    .tf-admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .tf-admin-grid,
    .tf-management-grid {
        grid-template-columns: 1fr;
    }

    .tf-manage-layout {
        grid-template-columns: 1fr;
    }

    .tf-manage-form-card {
        position: static;
    }

    .tf-form-grid {
        grid-template-columns: 1fr;
    }

    .tf-resource-summary {
        grid-template-columns: 1fr;
    }

    .tf-install-shell {
        width: min(100% - 20px, 980px);
        padding-top: 12px;
    }

    .tf-install-hero {
        padding: 16px;
    }

    .tf-install-hero > img {
        width: 56px;
        height: 56px;
        border-radius: 13px;
    }

    .tf-install-hero h1 {
        font-size: 20px;
    }

    .tf-check-grid,
    .tf-install-fields {
        grid-template-columns: 1fr;
    }

    .tf-field-wide {
        grid-column: auto;
    }

    .tf-install-submit {
        align-items: stretch;
        flex-direction: column;
    }
}
