:root {
    --kd-ink: #1d2939;
    --kd-muted: #667085;
    --kd-soft: #f3f5f7;
    --kd-panel: #ffffff;
    --kd-line: #e4e7ec;
    --kd-primary: #175cd3;
    --kd-primary-dark: #1849a9;
    --kd-accent: #067647;
    --kd-warning: #b54708;
    --kd-danger: #b42318;
    --kd-sidebar: #20262f;
    --kd-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    background: var(--kd-soft);
}

body {
    min-width: 320px;
    color: var(--kd-ink);
    background: var(--kd-soft);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
    color: var(--kd-primary);
}

.kd-admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
}

.kd-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 16px 16px;
    overflow-y: auto;
    background: var(--kd-sidebar);
    color: #d0d5dd;
}

.kd-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 0 6px 22px;
    color: #fff;
    text-decoration: none;
}

.kd-sidebar-brand:hover {
    color: #fff;
}

.kd-sidebar-logo,
.kd-mobile-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

.kd-sidebar-brand span {
    min-width: 0;
}

.kd-sidebar-brand strong,
.kd-sidebar-brand small {
    display: block;
}

.kd-sidebar-brand strong {
    font-size: 16px;
    line-height: 1.35;
}

.kd-sidebar-brand small {
    margin-top: 2px;
    color: #98a2b3;
    font-size: 12px;
}

.kd-sidebar-nav {
    display: grid;
    gap: 5px;
}

.kd-sidebar-label {
    padding: 7px 10px 8px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
}

.kd-sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 7px;
    color: #c7ced8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.kd-sidebar-link i {
    width: 20px;
    color: #98a2b3;
    font-size: 17px;
    text-align: center;
}

.kd-sidebar-link:hover {
    background: #2d3540;
    color: #fff;
}

.kd-sidebar-link.active {
    background: #344054;
    color: #fff;
}

.kd-sidebar-link.active i {
    color: #84adff;
}

.kd-sidebar-footer {
    display: grid;
    gap: 11px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #344054;
}

.kd-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0 6px;
}

.kd-user-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf2ff;
    color: var(--kd-primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.kd-user-chip strong,
.kd-user-chip small {
    display: block;
}

.kd-user-chip strong {
    color: #f2f4f7;
    font-size: 13px;
}

.kd-user-chip small {
    color: #98a2b3;
    font-size: 11px;
}

.kd-back-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 7px;
    color: #c7ced8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.kd-back-link:hover {
    background: #2d3540;
    color: #fff;
}

.kd-mobile-chrome {
    display: none;
}

.kd-main {
    min-width: 0;
    padding: 28px clamp(18px, 3vw, 40px) 40px;
}

.kd-page-content {
    width: min(100%, 1480px);
    margin: 0 auto;
}

.kd-page-header {
    min-height: 58px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.kd-page-header h1 {
    margin: 0;
    color: #101828;
    font-size: 24px;
    font-weight: 750;
    line-height: 1.3;
}

.kd-page-header p {
    margin: 5px 0 0;
    color: var(--kd-muted);
    font-size: 13px;
}

.kd-icon-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--kd-line);
    border-radius: 7px;
    background: #fff;
    color: #475467;
    text-decoration: none;
}

.kd-icon-button:hover {
    background: #f8fafc;
    color: var(--kd-primary);
}

.nav-card,
.table-card,
.stat-card,
.card-box,
.kd-auth-card,
.kd-mobile-panel,
.card {
    border: 1px solid var(--kd-line) !important;
    border-radius: 8px !important;
    background: var(--kd-panel);
    box-shadow: var(--kd-shadow) !important;
}

.kuake-logo,
.header-logo {
    flex-shrink: 0;
    border-radius: 8px !important;
    object-fit: cover;
}

.kuake-logo {
    width: 48px;
    height: 48px;
}

.header-logo {
    width: 64px;
    height: 64px;
}

.kd-brand-title {
    font-size: 18px;
    font-weight: 700;
}

.kd-brand-subtitle {
    color: var(--kd-muted);
    font-size: 13px;
}

.btn {
    border-radius: 7px;
    font-weight: 650;
}

.btn-primary,
.page-item.active .page-link {
    background: var(--kd-primary) !important;
    border-color: var(--kd-primary) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--kd-primary-dark) !important;
    border-color: var(--kd-primary-dark) !important;
}

.btn-outline-primary {
    color: var(--kd-primary);
    border-color: #b2ccff;
}

.btn-outline-primary:hover {
    background: var(--kd-primary);
    border-color: var(--kd-primary);
}

.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger {
    border-color: var(--kd-line);
}

.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--kd-line);
    color: var(--kd-ink);
    font-weight: 700;
}

.table {
    --bs-table-hover-bg: #f8fafc;
}

.table thead th {
    padding-top: 11px;
    padding-bottom: 11px;
    border-bottom-color: var(--kd-line);
    background: #f8fafc !important;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.table td,
.table th {
    vertical-align: middle;
}

.table td {
    border-color: #eef1f4;
}

.form-control,
.form-select {
    min-height: 40px;
    border-color: #d0d5dd;
    border-radius: 7px;
}

.form-control:focus,
.form-select:focus {
    border-color: #84adff;
    box-shadow: 0 0 0 .2rem rgba(23, 92, 211, .12);
}

.form-check-input:checked {
    background-color: var(--kd-primary);
    border-color: var(--kd-primary);
}

code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eff4ff;
    color: #1849a9;
}

.badge {
    border-radius: 999px;
    font-weight: 700;
    padding: .43em .65em;
}

.bg-success {
    background-color: var(--kd-accent) !important;
}

.bg-warning {
    background-color: #dc8b16 !important;
}

.bg-danger {
    background-color: var(--kd-danger) !important;
}

.bg-info,
.bg-primary {
    background-color: var(--kd-primary) !important;
}

.bg-secondary {
    background-color: #667085 !important;
}

.stat-icon {
    width: 48px !important;
    height: 48px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    background: #eff4ff !important;
    color: var(--kd-primary) !important;
}

.live-dot,
.status-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    background: #12b76a;
    box-shadow: 0 0 0 4px rgba(18, 183, 106, .12);
    animation: kdPulse 1.8s infinite;
}

.status-dot-warning {
    background: #f79009;
    box-shadow: 0 0 0 4px rgba(247, 144, 9, .12);
}

@keyframes kdPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

.kd-auth-body,
.kd-mobile-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.kd-auth-card,
.kd-mobile-panel {
    width: 100%;
    max-width: 430px;
    overflow: hidden;
}

.kd-auth-mark,
.kd-mobile-header {
    padding: 26px 26px 20px;
    border-bottom: 1px solid var(--kd-line);
    background: #f8fafc;
    text-align: center;
}

.kd-mobile-header h1,
.kd-auth-mark h1 {
    margin: 12px 0 4px;
    font-size: 20px;
    font-weight: 760;
}

.kd-mobile-header p,
.kd-auth-mark p {
    margin: 0;
    color: var(--kd-muted);
    font-size: 13px;
}

.kd-mobile-content {
    padding: 24px;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: kdFadeIn .22s ease-out;
}

@keyframes kdFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.kd-info-strip,
.pay-tip,
.scan-tip,
.waiting-tip,
.status-card,
.tips {
    border: 1px solid var(--kd-line);
    border-radius: 8px;
    background: #f8fafc !important;
    color: #405064 !important;
}

.pay-tip {
    border-color: #abefc6;
    background: #ecfdf3 !important;
}

.scan-tip,
.waiting-tip {
    border-color: #fedf89;
    background: #fffaeb !important;
}

.qr-code-container {
    display: inline-block;
    padding: 16px;
    border: 1px solid var(--kd-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--kd-shadow);
}

.kd-result-icon {
    width: 68px;
    height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 50%;
    font-size: 30px;
}

.kd-result-icon.success {
    background: #ecfdf3;
    color: var(--kd-accent);
}

.kd-result-icon.danger {
    background: #fef3f2;
    color: var(--kd-danger);
}

#scanner {
    border-color: var(--kd-line) !important;
    background: #111827 !important;
}

.kd-scan-actions {
    display: flex;
    gap: 10px;
}

.kd-scan-actions .btn {
    flex: 1;
}

/* Customer card flow refresh: scoped to the public redemption page. */
.kd-mobile-body.kd-customer-card-page {
    --kd-customer-ink: #211f33;
    --kd-customer-muted: #6f6a80;
    --kd-customer-line: #e4e1ee;
    --kd-customer-quark: #6252d8;
    --kd-customer-quark-soft: #f0edff;
    --kd-customer-alipay: #1677ff;
    --kd-customer-alipay-soft: #eef6ff;
    --kd-customer-success: #099268;
    --kd-customer-success-soft: #e9fbf4;
    --kd-customer-warning: #c77800;
    --kd-customer-warning-soft: #fff6dd;
    min-height: 100dvh;
    margin: 0;
    padding: 18px 12px 24px;
    display: grid;
    grid-template-columns: minmax(0, 440px);
    place-items: start center;
    overflow-x: hidden;
    background: #eef0fb !important;
    color: var(--kd-customer-ink);
    letter-spacing: 0;
}

.kd-customer-card-page *,
.kd-customer-card-page *::before,
.kd-customer-card-page *::after {
    box-sizing: border-box;
    letter-spacing: 0;
}

.kd-customer-card-page .kd-mobile-panel {
    width: min(100%, 440px);
    max-width: 440px;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #d9d5e8 !important;
    border-radius: 8px !important;
    background: #fbfaff;
    box-shadow: 0 18px 44px rgba(52, 44, 102, .14) !important;
}

.kd-customer-accent {
    height: 4px;
    display: grid;
    grid-template-columns: 1.25fr 1fr .8fr .7fr;
}

.kd-customer-accent span:nth-child(1) {
    background: var(--kd-customer-quark);
}

.kd-customer-accent span:nth-child(2) {
    background: var(--kd-customer-alipay);
}

.kd-customer-accent span:nth-child(3) {
    background: #f4b83f;
}

.kd-customer-accent span:nth-child(4) {
    background: var(--kd-customer-success);
}

.kd-customer-card-page .kd-mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--kd-customer-line);
    background: var(--kd-customer-quark-soft);
    text-align: left;
}

.kd-customer-card-page .header-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    margin: 0;
    border: 1px solid #d8d2fb;
    border-radius: 8px;
    background: #fff;
    object-fit: cover;
    box-shadow: 0 7px 16px rgba(98, 82, 216, .16);
}

.kd-brand-copy {
    min-width: 0;
}

.kd-customer-card-page .kd-mobile-header h1 {
    margin: 0;
    color: #2b2742;
    font-size: 16px;
    font-weight: 760;
    line-height: 1.3;
}

.kd-customer-card-page .kd-mobile-header p {
    margin: 2px 0 0;
    color: var(--kd-customer-muted);
    font-size: 11px;
    line-height: 1.4;
}

.kd-customer-card-page .kd-mobile-content {
    min-width: 0;
    padding: 16px 20px 22px;
    background: #fbfaff;
}

.kd-customer-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 17px;
}

.kd-customer-step {
    position: relative;
    z-index: 0;
    min-width: 0;
    min-height: 42px;
    color: #a09bad;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
}

.kd-customer-step::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 4px;
    left: calc(50% + 10px);
    right: calc(-50% + 10px);
    height: 2px;
    background: #e9e6ef;
}

.kd-customer-step:last-child::after {
    display: none;
}

.kd-customer-step > span {
    width: 10px;
    height: 10px;
    display: grid;
    place-items: center;
    margin: 0 auto 8px;
    border: 2px solid #d4d0dd;
    border-radius: 50%;
    background: #fff;
}

.kd-customer-step small {
    display: block;
    overflow-wrap: anywhere;
    font-size: 11px;
}

.kd-customer-step.is-current {
    color: var(--kd-customer-quark);
    font-weight: 750;
}

.kd-customer-step.is-current > span {
    border-color: var(--kd-customer-quark);
    background: var(--kd-customer-quark);
    box-shadow: 0 0 0 4px rgba(98, 82, 216, .14);
}

.kd-customer-step.is-complete {
    color: var(--kd-customer-success);
    font-weight: 700;
}

.kd-customer-step.is-complete > span {
    border-color: var(--kd-customer-success);
    background: var(--kd-customer-success);
}

.kd-customer-step.is-complete::after {
    background: #7bd7b5;
}

.kd-customer-step.is-failed {
    color: #c4323b;
    font-weight: 700;
}

.kd-customer-step.is-failed > span {
    border-color: #c4323b;
    background: #c4323b;
}

.kd-task-header {
    min-height: 86px;
    margin-bottom: 14px;
}

.kd-task-header > span {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--kd-customer-quark);
    font-size: 11px;
    font-weight: 760;
}

.kd-task-header h2 {
    margin: 0;
    color: #25213c;
    font-size: 21px;
    font-weight: 780;
    line-height: 1.3;
}

.kd-task-header p {
    min-height: 38px;
    margin: 6px 0 0;
    color: var(--kd-customer-muted);
    font-size: 13px;
    line-height: 1.5;
}

.kd-customer-card-page .step {
    display: none;
}

.kd-customer-card-page .step.active {
    display: block;
    animation: kdCustomerReveal .24s ease-out;
}

.kd-customer-card-page .form-label {
    margin: 0 0 8px;
    color: #403a58;
    font-size: 13px;
    font-weight: 700;
}

.kd-customer-card-page .form-control {
    min-height: 50px;
    border: 1px solid #d8d4e4;
    border-radius: 7px;
    background: #fff;
    color: var(--kd-customer-ink);
    font-size: 16px;
}

.kd-customer-card-page .form-control::placeholder {
    color: #aaa5b6;
}

.kd-customer-card-page .form-control:focus {
    border-color: var(--kd-customer-quark);
    box-shadow: 0 0 0 4px rgba(98, 82, 216, .13);
}

.kd-field-error {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 8px;
    padding: 9px 10px;
    border: 1px solid #fac5ca;
    border-radius: 7px;
    background: #fff1f2;
    color: #a91828;
    font-size: 12px;
    line-height: 1.45;
}

.kd-field-error::before {
    content: '!';
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #c4323b;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.kd-field-error.d-none {
    display: none !important;
}

.kd-customer-action {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 13px;
    border-radius: 7px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 720;
}

.kd-customer-action[aria-busy='true'] {
    cursor: wait;
}

.kd-customer-card-page .btn-primary {
    border-color: var(--kd-customer-quark);
    background: var(--kd-customer-quark);
    color: #fff;
    box-shadow: 0 8px 18px rgba(98, 82, 216, .18);
}

.kd-customer-card-page .btn-primary:hover,
.kd-customer-card-page .btn-primary:focus,
.kd-customer-card-page .btn-primary:active {
    border-color: #5142c1;
    background: #5142c1;
    color: #fff;
}

.kd-customer-card-page .btn-outline-secondary {
    border-color: #cbc5dd;
    background: #fff;
    color: #544d69;
}

.kd-customer-card-page .btn-outline-secondary:hover,
.kd-customer-card-page .btn-outline-secondary:focus {
    border-color: #aaa1c2;
    background: #f5f3fb;
    color: #3f3855;
}

.kd-button-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, .48);
    border-top-color: #fff;
    border-radius: 50%;
    animation: kdCustomerSpin .72s linear infinite;
}

.kd-account-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 11px 12px;
    border: 1px solid #d9d2fb;
    border-radius: 7px;
    background: var(--kd-customer-quark-soft);
}

.kd-account-summary > i {
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #fff;
    color: var(--kd-customer-quark);
    font-size: 16px;
}

.kd-account-summary span,
.kd-account-summary strong {
    display: block;
}

.kd-account-summary span {
    color: var(--kd-customer-muted);
    font-size: 11px;
}

.kd-account-summary strong {
    margin-top: 2px;
    color: #312b49;
    font-size: 14px;
}

.kd-verification-loading {
    min-height: 246px;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    border: 1px solid #ddd8ef;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.kd-verification-loading.d-none {
    display: none !important;
}

.kd-recovery-state {
    min-height: 218px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 24px 18px;
    border: 1px solid #efd58f;
    border-left: 4px solid var(--kd-customer-warning);
    border-radius: 8px;
    background: #fffaf0;
    text-align: center;
}

.kd-recovery-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    border-radius: 8px;
    background: #ffe7a8;
    color: #9d5f00;
    font-size: 24px;
}

.kd-recovery-state h3 {
    margin: 0;
    color: #3b3040;
    font-size: 17px;
    font-weight: 780;
    line-height: 1.4;
}

.kd-recovery-state p {
    max-width: 310px;
    margin: 8px auto 0;
    color: #6e6470;
    font-size: 13px;
    line-height: 1.65;
}

.kd-recovery-state[data-recovery-action='retry_preorder'] {
    border-color: #b7d4ff;
    border-left-color: var(--kd-customer-alipay);
    background: #f3f8ff;
}

.kd-recovery-state[data-recovery-action='retry_preorder'] .kd-recovery-icon {
    background: #dcecff;
    color: #095fcc;
}

.kd-recovery-state[data-recovery-action='restart_verification'] {
    border-color: #d9d2fb;
    border-left-color: var(--kd-customer-quark);
    background: #f7f5ff;
}

.kd-recovery-state[data-recovery-action='restart_verification'] .kd-recovery-icon {
    background: #e8e3ff;
    color: #5544cb;
}

.kd-recovery-state[aria-busy='true'] .kd-recovery-icon {
    animation: kdCustomerPulse 1.1s ease-in-out infinite;
}

.kd-verification-loading strong,
.kd-verification-loading span,
.kd-qr-loading-state strong,
.kd-qr-loading-state span,
.kd-qr-message-state strong,
.kd-qr-message-state span {
    display: block;
}

.kd-verification-loading strong,
.kd-qr-loading-state strong {
    color: #302b49;
    font-size: 15px;
    font-weight: 760;
}

.kd-verification-loading > span,
.kd-qr-loading-state > span {
    min-height: 36px;
    margin-top: 7px;
    color: var(--kd-customer-muted);
    font-size: 12px;
    line-height: 1.5;
}

.kd-color-loader {
    width: 66px;
    height: 66px;
    position: relative;
    display: grid;
    place-items: center;
    margin: 0 auto 17px;
    border-radius: 50%;
    background: conic-gradient(var(--kd-customer-quark) 0 28%, var(--kd-customer-alipay) 28% 58%, #f4b83f 58% 78%, var(--kd-customer-success) 78% 100%);
    animation: kdCustomerSpin 1.12s linear infinite;
}

.kd-color-loader::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #fff;
}

.kd-color-loader img {
    width: 33px;
    height: 33px;
    position: relative;
    z-index: 1;
    border-radius: 7px;
    object-fit: cover;
    animation: kdCustomerCounterSpin 1.12s linear infinite;
}

.kd-loading-track {
    width: min(218px, 100%);
    height: 5px;
    overflow: hidden;
    margin: 14px auto 0;
    border-radius: 5px;
    background: #ebe8f5;
}

.kd-loading-track::after {
    content: '';
    width: 42%;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--kd-customer-alipay);
    box-shadow: 25px 0 0 var(--kd-customer-quark), 50px 0 0 var(--kd-customer-success);
    animation: kdCustomerSweep 1.35s ease-in-out infinite;
}

.kd-payment-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
    padding: 11px 13px;
    border: 1px solid #d9d2fb;
    border-radius: 7px;
    background: var(--kd-customer-quark-soft);
}

.kd-payment-summary > div {
    min-width: 0;
}

.kd-payment-summary span,
.kd-payment-summary strong {
    display: block;
}

.kd-payment-summary > div span {
    color: #665f80;
    font-size: 11px;
}

.kd-payment-summary strong {
    margin-top: 1px;
    color: var(--kd-customer-alipay);
    font-size: 21px;
    line-height: 1.25;
}

.kd-payment-bonus {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid #f5d98e;
    border-radius: 6px;
    background: var(--kd-customer-warning-soft);
    color: #9a5c00;
    font-size: 11px;
    font-weight: 750;
}

.kd-customer-card-page .qr-code-container {
    width: min(100%, 240px);
    min-height: 240px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    padding: 12px;
    overflow: hidden;
    border: 1px solid #d7dff1;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 3px 0 var(--kd-customer-alipay);
}

.kd-customer-card-page .qr-code-container canvas,
.kd-customer-card-page .qr-code-container img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.kd-qr-loading-state,
.kd-qr-message-state {
    width: 100%;
    min-height: 214px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 12px;
    text-align: center;
}

.kd-qr-message-state > i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--kd-customer-warning-soft);
    color: var(--kd-customer-warning);
    font-size: 22px;
}

.kd-qr-message-state strong {
    color: #3e384f;
    font-size: 15px;
}

.kd-qr-message-state span {
    margin-top: 6px;
    color: var(--kd-customer-muted);
    font-size: 12px;
    line-height: 1.45;
}

.kd-qr-state-ready {
    padding: 19px !important;
}

.kd-qr-state-expired {
    border-color: #f2d58b !important;
    background: #fffdf6 !important;
    box-shadow: inset 0 3px 0 #f4b83f !important;
}

.kd-qr-state-error {
    border-color: #fac5ca !important;
    background: #fffafb !important;
    box-shadow: inset 0 3px 0 #c4323b !important;
}

.kd-qr-state-error .kd-qr-message-state > i {
    background: #fff1f2;
    color: #c4323b;
}

.kd-payment-countdown {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 9px;
    color: var(--kd-customer-muted);
    font-size: 12px;
}

.kd-payment-countdown strong {
    margin-left: 4px;
    color: #4a435e;
    font-variant-numeric: tabular-nums;
}

.kd-payment-link {
    width: 100%;
    border: 1px solid #9dc4ff;
    background: var(--kd-customer-alipay-soft);
    color: #095fcc;
    text-decoration: none;
}

.kd-payment-link:hover,
.kd-payment-link:focus {
    border-color: var(--kd-customer-alipay);
    background: #e2efff;
    color: #064fa9;
}

.kd-payment-link.is-disabled {
    cursor: not-allowed;
    opacity: .48;
    pointer-events: none;
}

.kd-refresh-payment {
    width: 100%;
    border: 1px solid #f0ce74;
    background: var(--kd-customer-warning-soft);
    color: #8b5500;
}

.kd-refresh-payment:hover,
.kd-refresh-payment:focus {
    border-color: #dfa82b;
    background: #fff0c6;
    color: #744700;
}

.kd-refresh-payment.d-none {
    display: none !important;
}

.kd-delivery-state {
    min-height: 232px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 24px 18px;
    border: 1px solid #ddd8ef;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.kd-delivery-state strong {
    margin-top: 15px;
    color: #302b49;
    font-size: 17px;
}

.kd-delivery-state p {
    max-width: 280px;
    margin: 7px auto 0;
    color: var(--kd-customer-muted);
    font-size: 12px;
    line-height: 1.55;
}

.kd-delivery-loader {
    width: 62px;
    height: 62px;
    position: relative;
    border: 2px solid #ded9ef;
    border-radius: 50%;
    background: var(--kd-customer-quark-soft);
}

.kd-delivery-loader::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid transparent;
    border-top-color: var(--kd-customer-quark);
    border-right-color: var(--kd-customer-alipay);
    border-radius: 50%;
    animation: kdCustomerSpin 1s linear infinite;
}

.kd-delivery-loader span {
    width: 7px;
    height: 7px;
    position: absolute;
    top: 26px;
    border-radius: 50%;
    background: var(--kd-customer-quark);
    animation: kdCustomerDot 1.15s ease-in-out infinite;
}

.kd-delivery-loader span:nth-child(1) {
    left: 14px;
}

.kd-delivery-loader span:nth-child(2) {
    left: 26px;
    background: var(--kd-customer-alipay);
    animation-delay: .14s;
}

.kd-delivery-loader span:nth-child(3) {
    right: 14px;
    background: var(--kd-customer-success);
    animation-delay: .28s;
}

.kd-result-state {
    min-height: 290px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 26px 18px;
    border: 1px solid var(--kd-customer-line);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.kd-result-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 13px;
    border-radius: 8px;
    font-size: 29px;
}

.kd-result-icon.success {
    background: var(--kd-customer-success-soft);
    color: var(--kd-customer-success);
}

.kd-result-icon.danger {
    background: #fff1f2;
    color: #c4323b;
}

.kd-result-state h3 {
    margin: 0;
    color: #302b49;
    font-size: 19px;
    font-weight: 780;
}

.kd-result-state > p {
    margin: 7px 0 0;
    color: var(--kd-customer-muted);
    font-size: 13px;
}

.kd-result-meta {
    width: 100%;
    display: grid;
    gap: 1px;
    margin: 17px 0 0;
    overflow: hidden;
    border: 1px solid var(--kd-customer-line);
    border-radius: 7px;
    background: var(--kd-customer-line);
    text-align: left;
}

.kd-result-meta > div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 11px;
    background: #fbfaff;
}

.kd-result-meta dt,
.kd-result-meta dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.kd-result-meta dt {
    color: var(--kd-customer-muted);
    font-weight: 500;
}

.kd-result-meta dd {
    min-width: 0;
    color: #342f47;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.kd-customer-fatal {
    width: min(100%, 420px);
    min-height: 360px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 30px 24px;
    border: 1px solid #d9d5e8;
    border-radius: 8px;
    background: #fbfaff;
    box-shadow: 0 18px 44px rgba(52, 44, 102, .14);
    text-align: center;
}

.kd-customer-fatal > img {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 8px;
    object-fit: cover;
}

.kd-customer-fatal .kd-result-icon {
    width: 58px;
    height: 58px;
}

.kd-customer-fatal h1 {
    margin: 0;
    color: #302b49;
    font-size: 21px;
    font-weight: 780;
}

.kd-customer-fatal p {
    margin: 8px 0 0;
    color: var(--kd-customer-muted);
    font-size: 13px;
}

@keyframes kdCustomerReveal {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes kdCustomerSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes kdCustomerCounterSpin {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes kdCustomerSweep {
    from {
        transform: translateX(-150%);
    }
    to {
        transform: translateX(340%);
    }
}

@keyframes kdCustomerDot {
    0%, 100% {
        opacity: .4;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

@keyframes kdCustomerPulse {
    0%, 100% {
        opacity: .7;
        transform: scale(.96);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (min-width: 641px) {
    .kd-mobile-body.kd-customer-card-page {
        place-items: center;
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .kd-mobile-body.kd-customer-card-page {
        padding: 12px 10px 20px;
    }

    .kd-customer-card-page .kd-mobile-panel {
        max-width: 100%;
        box-shadow: 0 10px 28px rgba(52, 44, 102, .1) !important;
    }

    .kd-customer-card-page .kd-mobile-header {
        padding: 14px 16px;
    }

    .kd-customer-card-page .kd-mobile-content {
        padding: 15px 16px 19px;
    }

    .kd-task-header h2 {
        font-size: 19px;
    }

    .kd-payment-summary {
        align-items: flex-start;
    }

    .kd-payment-bonus {
        max-width: 46%;
        white-space: normal;
        text-align: center;
    }

    .kd-result-meta > div {
        grid-template-columns: 82px minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .kd-customer-card-page .step.active,
    .kd-button-spinner,
    .kd-color-loader,
    .kd-color-loader img,
    .kd-loading-track::after,
    .kd-delivery-loader::before,
    .kd-delivery-loader span {
        animation: none;
    }

    .kd-recovery-state[aria-busy='true'] .kd-recovery-icon {
        animation: none;
    }
}

.kd-page-primary-action {
    flex: 0 0 auto;
    min-height: 40px;
    padding-right: 16px;
    padding-left: 16px;
    white-space: nowrap;
}

.kd-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.kd-metric-tile {
    min-width: 0;
    min-height: 126px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 18px;
    border: 1px solid var(--kd-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(16, 24, 40, .04);
}

.kd-metric-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff4ff;
    color: var(--kd-primary);
    font-size: 19px;
}

.kd-metric-tile[data-tone="green"] .kd-metric-icon {
    background: #ecfdf3;
    color: var(--kd-accent);
}

.kd-metric-tile[data-tone="amber"] .kd-metric-icon {
    background: #fffaeb;
    color: var(--kd-warning);
}

.kd-metric-tile[data-tone="red"] .kd-metric-icon {
    background: #fef3f2;
    color: var(--kd-danger);
}

.kd-metric-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.kd-metric-copy > span {
    color: #475467;
    font-size: 13px;
    font-weight: 650;
}

.kd-metric-copy > strong {
    margin-top: 3px;
    color: #101828;
    font-size: 25px;
    line-height: 1.2;
}

.kd-metric-copy > small {
    margin-top: 6px;
    overflow-wrap: anywhere;
    color: #98a2b3;
    font-size: 11px;
    line-height: 1.45;
}

.kd-work-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--kd-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--kd-shadow);
}

.kd-panel-header {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--kd-line);
}

.kd-panel-header h2 {
    margin: 0;
    color: #101828;
    font-size: 16px;
    font-weight: 750;
}

.kd-panel-header p {
    margin: 4px 0 0;
    color: var(--kd-muted);
    font-size: 12px;
}

.kd-panel-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kd-count-badge {
    min-width: 24px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 11px;
    font-weight: 750;
}

.kd-live-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #475467;
    font-size: 12px;
}

.kd-live-controls .form-check-label {
    white-space: nowrap;
}

.kd-connection-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.kd-connection-state.is-offline {
    color: var(--kd-warning);
}

.kd-business-table {
    min-width: 820px;
}

.kd-business-table td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.kd-record-identity,
.kd-customer-cell {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.kd-record-identity strong,
.kd-customer-cell strong {
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.kd-record-identity code {
    font-size: 12px;
}

.kd-record-identity small,
.kd-customer-cell small {
    color: #98a2b3;
    font-size: 11px;
}

.kd-time-text {
    color: #667085;
    font-size: 12px;
    white-space: nowrap;
}

.kd-action-cluster {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kd-action-cluster .kd-icon-button {
    width: 32px;
    height: 32px;
}

.kd-more-button {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--kd-line);
}

.kd-icon-danger {
    color: var(--kd-danger);
}

.kd-icon-danger:hover {
    border-color: #fecdca;
    background: #fef3f2;
    color: #912018;
}

.dropdown-menu {
    border-color: var(--kd-line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .12);
}

.dropdown-item {
    min-height: 36px;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.kd-empty-state {
    min-height: 116px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    color: #98a2b3;
    font-size: 13px;
    text-align: center;
}

.kd-empty-state i {
    font-size: 24px;
}

.kd-record-tabs {
    display: flex;
    gap: 22px;
    min-height: 48px;
    padding: 0 18px;
    overflow-x: auto;
    border-bottom: 1px solid var(--kd-line);
    scrollbar-width: none;
}

.kd-record-tabs::-webkit-scrollbar {
    display: none;
}

.kd-record-tabs a {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 1px;
    color: #667085;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.kd-record-tabs a::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: transparent;
}

.kd-record-tabs a:hover,
.kd-record-tabs a.active {
    color: var(--kd-primary);
}

.kd-record-tabs a.active::after {
    background: var(--kd-primary);
}

.kd-filter-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--kd-line);
    background: #fcfcfd;
}

.kd-filter-bar .form-select {
    width: auto;
    min-width: 140px;
    font-size: 13px;
}

.kd-search-field {
    position: relative;
    flex: 1 1 300px;
    min-width: 220px;
}

.kd-search-field i {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: #98a2b3;
    transform: translateY(-50%);
}

.kd-search-field .form-control {
    padding-left: 38px;
    font-size: 13px;
}

.kd-selection-bar {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 18px;
    border-bottom: 1px solid #b2ccff;
    background: #eff4ff;
    color: #344054;
    font-size: 13px;
}

.kd-selection-bar[hidden] {
    display: none;
}

.kd-selection-bar > div {
    display: flex;
    gap: 7px;
}

.kd-link-preview {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    color: var(--kd-primary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kd-pagination-wrap {
    display: flex;
    justify-content: center;
    padding: 14px 18px;
    border-top: 1px solid var(--kd-line);
}

.kd-mobile-records {
    background: #fff;
}

.kd-mobile-record {
    padding: 15px 16px;
    border-bottom: 1px solid var(--kd-line);
}

.kd-mobile-record:last-child {
    border-bottom: 0;
}

.kd-mobile-record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.kd-mobile-record-head > div,
.kd-mobile-record-head > label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kd-mobile-record-head label {
    cursor: pointer;
}

.kd-mobile-record-head code {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kd-mobile-record-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.kd-mobile-record-grid > div {
    min-width: 0;
}

.kd-mobile-record-grid span,
.kd-mobile-record-grid strong {
    display: block;
}

.kd-mobile-record-grid span {
    margin-bottom: 3px;
    color: #98a2b3;
    font-size: 11px;
}

.kd-mobile-record-grid strong {
    overflow-wrap: anywhere;
    color: #475467;
    font-size: 12px;
    font-weight: 650;
}

.kd-mobile-wide {
    grid-column: 1 / -1;
}

.kd-mobile-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
}

.kd-mobile-actions .kd-icon-button {
    width: 32px;
    height: 32px;
    margin-left: auto;
}

.modal-content {
    overflow: hidden;
    border: 1px solid var(--kd-line);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .18);
}

.modal-header,
.modal-footer {
    border-color: var(--kd-line);
}

.kd-modal-subtitle {
    margin: 3px 0 0;
    color: var(--kd-muted);
    font-size: 12px;
}

.kd-generated-links {
    max-height: 410px;
    overflow-y: auto;
    border: 1px solid var(--kd-line);
    border-radius: 7px;
}

.kd-generated-link-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 7px 10px;
    border-bottom: 1px solid #eef1f4;
}

.kd-generated-link-row:last-child {
    border-bottom: 0;
}

.kd-generated-link-number {
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
}

.kd-generated-link-row code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kd-generated-link-row .kd-icon-button {
    width: 32px;
    height: 32px;
}

.kd-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
}

.kd-detail-grid > div {
    min-width: 0;
    padding: 13px 0;
    border-bottom: 1px solid #eef1f4;
}

.kd-detail-grid span,
.kd-detail-grid strong {
    display: block;
}

.kd-detail-grid span {
    margin-bottom: 4px;
    color: #98a2b3;
    font-size: 11px;
}

.kd-detail-grid strong {
    overflow-wrap: anywhere;
    color: #344054;
    font-size: 13px;
}

.kd-detail-wide {
    grid-column: 1 / -1;
}

.kd-detail-actions {
    flex-wrap: wrap;
}

.kd-json-viewer {
    min-height: 220px;
    max-height: 420px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    border: 1px solid var(--kd-line);
    border-radius: 7px;
    background: #101828;
    color: #e4e7ec;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.kd-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #667085;
    font-size: 12px;
}

.kd-token-preview {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.kd-toast-region {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1090;
    width: min(340px, calc(100vw - 28px));
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.kd-toast {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border: 1px solid #abefc6;
    border-radius: 7px;
    background: #ecfdf3;
    color: #05603a;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
    font-size: 13px;
    font-weight: 650;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
}

.kd-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.kd-toast-danger {
    border-color: #fecdca;
    background: #fef3f2;
    color: #912018;
}

.kd-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(420px, 1.35fr);
    gap: 18px;
    align-items: start;
}

.kd-date-label,
.kd-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 12px;
    white-space: nowrap;
}

.kd-today-overview {
    padding: 20px;
}

.kd-today-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 52px;
    border-bottom: 1px solid #eef1f4;
}

.kd-today-stat span {
    color: #667085;
    font-size: 13px;
}

.kd-today-stat strong {
    color: #101828;
    font-size: 22px;
}

.kd-progress-block {
    padding-top: 18px;
}

.kd-progress-block > div:first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #667085;
    font-size: 12px;
}

.kd-progress-block strong {
    color: #344054;
}

.kd-progress-block .progress {
    height: 7px;
    background: #eaecf0;
}

.kd-progress-block .progress-bar {
    background: var(--kd-accent);
}

.kd-dashboard-orders {
    min-height: 280px;
}

.kd-dashboard-order-row {
    display: grid;
    grid-template-columns: minmax(110px, .8fr) minmax(150px, 1fr) auto 18px;
    align-items: center;
    gap: 14px;
    min-height: 66px;
    padding: 10px 18px;
    border-bottom: 1px solid #eef1f4;
    color: inherit;
    text-decoration: none;
}

.kd-dashboard-order-row:last-child {
    border-bottom: 0;
}

.kd-dashboard-order-row:hover {
    background: #f8fafc;
    color: inherit;
}

.kd-dashboard-order-row > .bi-chevron-right {
    color: #98a2b3;
}

.kd-page-alert {
    display: flex;
    align-items: center;
    border-radius: 7px;
    box-shadow: none;
}

.kd-settings-panel {
    max-width: 1040px;
}

.kd-settings-form {
    margin: 0;
}

.kd-settings-section {
    padding: 22px;
    border-bottom: 1px solid var(--kd-line);
}

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

.kd-section-heading h3 {
    margin: 0;
    color: #101828;
    font-size: 15px;
    font-weight: 750;
}

.kd-section-heading p {
    margin: 4px 0 0;
    color: #667085;
    font-size: 12px;
}

.kd-switch-list {
    border-top: 1px solid #eef1f4;
}

.kd-setting-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 74px;
    padding: 13px 2px;
    border-bottom: 1px solid #eef1f4;
    cursor: pointer;
}

.kd-setting-switch > span:first-child {
    min-width: 0;
}

.kd-setting-switch strong,
.kd-setting-switch small {
    display: block;
}

.kd-setting-switch strong {
    color: #344054;
    font-size: 13px;
}

.kd-setting-switch small {
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
    line-height: 1.5;
}

.kd-setting-switch .form-check {
    flex: 0 0 auto;
    margin: 0;
    padding-left: 2.6em;
}

.kd-advanced-settings {
    border-bottom: 1px solid var(--kd-line);
}

.kd-advanced-settings summary {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 22px;
    cursor: pointer;
    list-style: none;
}

.kd-advanced-settings summary::-webkit-details-marker {
    display: none;
}

.kd-advanced-settings summary > span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kd-advanced-settings summary > span > i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #f2f4f7;
    color: #475467;
}

.kd-advanced-settings summary strong,
.kd-advanced-settings summary small {
    display: block;
}

.kd-advanced-settings summary strong {
    color: #344054;
    font-size: 13px;
}

.kd-advanced-settings summary small {
    margin-top: 3px;
    color: #667085;
    font-size: 12px;
}

.kd-details-chevron {
    color: #98a2b3;
    transition: transform .18s ease;
}

.kd-advanced-settings[open] .kd-details-chevron {
    transform: rotate(180deg);
}

.kd-advanced-body {
    padding: 0 22px 22px;
}

.kd-settings-actions {
    display: flex;
    justify-content: flex-end;
    padding: 16px 22px;
    background: #fcfcfd;
}

@media (max-width: 1199.98px) {
    .kd-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kd-filter-bar {
        flex-wrap: wrap;
    }

    .kd-search-field {
        flex-basis: 100%;
    }

    .kd-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .kd-admin-shell {
        display: block;
    }

    .kd-sidebar {
        display: none;
    }

    .kd-business-cards-view .kd-metric-grid,
    .kd-business-cards-view .kd-pending-panel {
        display: none;
    }

    .kd-mobile-chrome {
        position: sticky;
        top: 0;
        z-index: 1020;
        display: block;
        border-bottom: 1px solid var(--kd-line);
        background: rgba(255, 255, 255, .98);
    }

    .kd-mobile-brandbar {
        height: 54px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 14px;
    }

    .kd-mobile-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        color: #101828;
        font-size: 15px;
        font-weight: 750;
        text-decoration: none;
    }

    .kd-mobile-logo {
        width: 32px;
        height: 32px;
    }

    .kd-mobile-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 0 8px 7px;
    }

    .kd-mobile-nav a {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 36px;
        border-radius: 6px;
        color: #667085;
        font-size: 12px;
        font-weight: 650;
        text-decoration: none;
    }

    .kd-mobile-nav a.active {
        background: #eff4ff;
        color: var(--kd-primary);
    }

    .kd-main {
        padding: 18px 14px 28px;
    }

    .kd-page-header {
        min-height: 0;
        margin-bottom: 16px;
    }

    .kd-page-header h1 {
        font-size: 21px;
    }

    .kd-panel-header {
        min-height: 68px;
    }

    .kd-records-header {
        border-bottom: 0;
    }

    .kd-filter-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kd-filter-bar .kd-search-field {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .kd-filter-bar .form-select {
        width: 100%;
        min-width: 0;
    }

    .kd-settings-panel {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .kd-mobile-body,
    .kd-auth-body {
        align-items: stretch;
        padding: 14px;
    }

    .kd-mobile-panel,
    .kd-auth-card {
        margin: auto 0;
    }

    .kd-mobile-content {
        padding: 20px;
    }

    .kd-mobile-nav a {
        gap: 4px;
        font-size: 11px;
    }

    .kd-page-header {
        gap: 10px;
    }

    .kd-page-header p {
        max-width: 190px;
    }

    .kd-page-primary-action {
        min-height: 38px;
        padding-right: 12px;
        padding-left: 12px;
        font-size: 13px;
    }

    .kd-metric-grid {
        gap: 9px;
    }

    .kd-metric-tile {
        min-height: 112px;
        display: block;
        padding: 13px;
    }

    .kd-metric-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 9px;
        font-size: 16px;
    }

    .kd-metric-copy > strong {
        font-size: 21px;
    }

    .kd-metric-copy > small {
        display: none;
    }

    .kd-panel-header {
        align-items: flex-start;
        padding: 14px 15px;
    }

    .kd-live-controls {
        display: grid;
        justify-items: end;
        gap: 8px;
    }

    .kd-record-tabs {
        gap: 18px;
        padding: 0 15px;
    }

    .kd-filter-bar {
        grid-template-columns: 1fr;
        padding: 12px 15px;
    }

    .kd-filter-bar .kd-search-field {
        grid-column: auto;
    }

    .kd-selection-bar {
        align-items: flex-start;
        padding: 10px 15px;
    }

    .kd-selection-bar > div {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .kd-detail-grid {
        grid-template-columns: 1fr;
    }

    .kd-detail-wide {
        grid-column: auto;
    }

    .kd-detail-actions .btn {
        flex: 1 1 calc(50% - 8px);
    }

    .kd-generated-link-row {
        grid-template-columns: 25px minmax(0, 1fr) 34px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .kd-toast-region {
        right: 14px;
        bottom: 14px;
    }

    .kd-dashboard-order-row {
        grid-template-columns: minmax(95px, .8fr) minmax(120px, 1fr) auto;
        gap: 9px;
        padding-right: 15px;
        padding-left: 15px;
    }

    .kd-dashboard-order-row > .bi-chevron-right {
        display: none;
    }

    .kd-settings-section,
    .kd-advanced-settings summary {
        padding-right: 16px;
        padding-left: 16px;
    }

    .kd-advanced-body {
        padding-right: 16px;
        padding-left: 16px;
    }

    .kd-setting-switch {
        gap: 12px;
    }

    .kd-setting-switch small {
        max-width: 235px;
    }

    .kd-settings-actions {
        padding: 14px 16px;
    }

    .kd-settings-actions .btn {
        width: 100%;
    }
}
.kd-password-panel .kd-status-chip i {
    color: #198754;
}

.kd-password-panel .form-control {
    min-height: 44px;
}
