/**
 * Blue-white Pokemon / panda theme for poke-ui body
 */

body.poke-ui,
body.poke-auth {
    --poke-blue: #1677ff;
    --poke-blue-light: #4096ff;
    --poke-blue-pale: #e6f4ff;
    --poke-blue-deep: #0958d9;
    --poke-blue-dark: #0958d9;
    --poke-white: #ffffff;
    --poke-bg: #f0f7ff;
    --poke-accent: #69b1ff;
    --poke-border: #bae0ff;
    --poke-shadow: 0 4px 20px rgba(22, 119, 255, 0.1);
    --poke-shadow-sm: 0 2px 10px rgba(22, 119, 255, 0.08);
    --poke-radius: 14px;
    --poke-radius-sm: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--poke-bg);
    color: #1d2129;
    -webkit-font-smoothing: antialiased;
}

body.poke-ui::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(22, 119, 255, 0.08), transparent 50%),
        radial-gradient(ellipse 60% 40% at 90% 100%, rgba(105, 177, 255, 0.1), transparent 45%);
}

body.poke-ui .app-main,
body.poke-ui .ui-admin-page {
    position: relative;
    z-index: 1;
}

/* Panda background layer */
body.poke-ui .panda-bg-layer {
    opacity: 0.35;
}

body.poke-ui .app-navbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.poke-ui .brand-name-line {
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.poke-ui .brand-sub {
    font-size: 0.7rem;
    opacity: 0.85;
}

/* Form controls */
body.poke-ui .form-control,
body.poke-ui .form-select {
    border-radius: 10px;
    border-color: rgba(22, 119, 255, 0.2);
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.poke-ui .form-control:focus,
body.poke-ui .form-select:focus {
    border-color: var(--poke-blue);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15);
}

body.poke-ui .form-label {
    font-weight: 500;
    color: #4e5969;
    font-size: 0.875rem;
}

/* Primary buttons */
body.poke-ui .btn-primary {
    background: linear-gradient(135deg, var(--poke-blue) 0%, var(--poke-blue-light) 100%);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
    transition: transform 0.15s, box-shadow 0.2s;
}

body.poke-ui .btn-primary:hover {
    background: linear-gradient(135deg, var(--poke-blue-deep) 0%, var(--poke-blue) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.35);
}

body.poke-ui .btn-light-soft,
body.poke-ui .ui-btn--soft {
    background: var(--poke-blue-pale);
    color: var(--poke-blue-deep);
    border: 1px solid rgba(22, 119, 255, 0.2);
    border-radius: 10px;
}

body.poke-ui .btn-light-soft:hover {
    background: #bae0ff;
    color: var(--poke-blue-deep);
}

body.poke-ui .btn-danger-soft {
    background: #fff1f0;
    color: #cf1322;
    border: 1px solid #ffccc7;
    border-radius: 10px;
}

/* Badges */
body.poke-ui .badge.bg-primary {
    background: linear-gradient(135deg, var(--poke-blue), var(--poke-blue-light)) !important;
}

body.poke-ui .badge.bg-success {
    background: #52c41a !important;
}

body.poke-ui .badge.bg-warning {
    background: #faad14 !important;
}

body.poke-ui .badge.bg-info {
    background: var(--poke-accent) !important;
    color: var(--poke-blue-deep) !important;
}

/* Alerts */
body.poke-ui .alert-success {
    background: #f6ffed;
    border-color: #b7eb8f;
    color: #389e0d;
    border-radius: var(--poke-radius);
}

body.poke-ui .alert-danger {
    background: #fff2f0;
    border-color: #ffccc7;
    color: #cf1322;
    border-radius: var(--poke-radius);
}

body.poke-ui .alert-warning {
    background: #fffbe6;
    border-color: #ffe58f;
    color: #d48806;
    border-radius: var(--poke-radius);
}

/* Cards legacy compat */
body.poke-ui .app-card {
    background: var(--poke-white);
    border-radius: var(--poke-radius);
    border: 1px solid rgba(22, 119, 255, 0.12);
    box-shadow: var(--poke-shadow);
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
}

body.poke-ui .app-card .card-title {
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* Tables legacy */
body.poke-ui .app-table-wrap,
body.poke-ui .ui-data-table-wrap {
    background: var(--poke-white);
    border-radius: var(--poke-radius);
    border: 1px solid rgba(22, 119, 255, 0.12);
    box-shadow: var(--poke-shadow);
    overflow: hidden;
}

body.poke-ui .table.app-table,
body.poke-ui .ui-data-table {
    margin-bottom: 0;
}

body.poke-ui .table.app-table thead th {
    background: var(--poke-blue-pale);
    color: var(--poke-blue-deep);
    font-weight: 600;
    border-bottom: 2px solid #91caff;
}

/* Page header legacy */
body.poke-ui .page-header h1 {
    font-weight: 700;
    color: #1d2129;
}

body.poke-ui .page-header .subtitle {
    color: #86909c;
}

/* Stat cards legacy */
body.poke-ui .stat-card {
    background: var(--poke-white);
    border-radius: var(--poke-radius);
    border: 1px solid rgba(22, 119, 255, 0.12);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--poke-shadow);
}

body.poke-ui .stat-card h5 {
    font-size: 0.8rem;
    color: #86909c;
    margin-bottom: 0.35rem;
}

body.poke-ui .stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--poke-blue-deep);
}

/* Action bar */
body.poke-ui .action-bar {
    margin-top: 1.5rem;
    padding-top: 1rem;
}

/* Filter buttons legacy */
body.poke-ui .filter-btn-group .btn-primary {
    box-shadow: none;
}

/* Modal pokemon style */
body.poke-ui .modal-content {
    border: 2px solid rgba(22, 119, 255, 0.15);
    box-shadow: 0 12px 40px rgba(22, 119, 255, 0.2);
}

body.poke-ui .modal-title {
    font-weight: 700;
    color: var(--poke-blue-deep);
}

body.poke-ui .modal-header .btn-close {
    opacity: 0.6;
}

/* Text utilities */
body.poke-ui .text-primary {
    color: var(--poke-blue) !important;
}

body.poke-ui .text-success {
    color: #389e0d !important;
}

body.poke-ui .text-muted {
    color: #86909c !important;
}

body.poke-ui .fw-semibold {
    font-weight: 600;
}

/* Links */
body.poke-ui a:not(.btn):not(.ui-admin-toolbar__item):not(.ui-filter-tabs__tab) {
    color: var(--poke-blue);
}

body.poke-ui a:not(.btn):hover {
    color: var(--poke-blue-deep);
}

/* Scrollbar subtle */
body.poke-ui ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.poke-ui ::-webkit-scrollbar-thumb {
    background: rgba(22, 119, 255, 0.25);
    border-radius: 4px;
}

body.poke-ui ::-webkit-scrollbar-track {
    background: rgba(22, 119, 255, 0.05);
}

/* 登录/注册：保留 app.css 蓝白渐变 + 熊猫，仅强化表单卡 */
body.auth-page.poke-auth .auth-card {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 2px solid var(--poke-border);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(9, 88, 217, 0.28);
}
body.auth-page.poke-auth .auth-card::before {
    left: 12%;
    right: 12%;
    height: 5px;
    background: linear-gradient(90deg, var(--poke-blue-deep) 0%, var(--poke-blue) 42%, #ff4d4f 42%, #ff4d4f 58%, #fff 58%, #fff 100%);
    border-radius: 5px;
}
body.auth-page.poke-auth .auth-brand .brand-icon {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
}
body.auth-page.poke-auth .auth-stats .auth-stat-item {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.18);
}
body.auth-page.poke-auth .btn-primary {
    background: linear-gradient(135deg, var(--poke-blue) 0%, var(--poke-blue-light) 100%);
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(22, 119, 255, 0.35);
}

body.auth-page.poke-auth .auth-brand__home-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s;
}
body.auth-page.poke-auth .auth-brand__home-link:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

body.auth-page.poke-auth .auth-highlight-box {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
}
body.auth-page.poke-auth .auth-highlight-box__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #fff;
}
body.auth-page.poke-auth .auth-highlight-box p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
    opacity: 0.92;
}
body.auth-page.poke-auth .auth-features li {
    margin-bottom: 0.65rem;
}

@media (max-width: 991.98px) {
    body.auth-page.poke-auth .auth-highlight-box {
        display: none;
    }
}

/* 管理/用户 · 宝可梦面板顶条 */
body.poke-ui .ui-panel,
body.poke-ui .ui-record-card,
body.poke-ui .ui-stat-card,
body.poke-ui .chart-panel {
    background: #fff;
    border: 2px solid var(--poke-border);
    box-shadow: var(--poke-shadow);
}
body.poke-ui .ui-panel {
    position: relative;
    overflow: hidden;
}
body.poke-ui .ui-panel::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--poke-blue-deep) 0%, var(--poke-blue) 44%, #ff4d4f 44%, #ff4d4f 56%, #fff 56%);
    pointer-events: none;
}
body.poke-ui .ui-panel__head {
    background: linear-gradient(180deg, var(--poke-blue-pale) 0%, #fff 100%);
    border-bottom-color: var(--poke-border);
}
body.poke-ui .ui-record-card {
    border-left: 4px solid var(--poke-blue);
}
body.poke-ui .ui-stat-card__value {
    color: var(--poke-blue-deep);
}
body.poke-ui .user-platform-hub-card {
    border-width: 2px;
    border-color: var(--poke-border);
    box-shadow: var(--poke-shadow-sm);
}
body.poke-ui .user-platform-hub-card:hover {
    border-color: var(--poke-blue);
    box-shadow: var(--poke-shadow);
}
body.poke-ui .ui-account-hero,
body.poke-ui .ui-platform-hero {
    background: #fff;
    border: 2px solid var(--poke-border);
    border-radius: var(--poke-radius);
    box-shadow: var(--poke-shadow);
    margin-bottom: 1.25rem;
}

/* Container fluid admin */
body.poke-ui.admin-layout .app-container-fluid {
    max-width: 1400px;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1200px) {
    body.poke-ui.admin-layout .app-container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Lead amount field toggle */
body.poke-ui .lead-amount-wrap.is-hidden {
    display: none;
}

/* Animation subtle on panels */
body.poke-ui .ui-panel,
body.poke-ui .ui-record-card {
    animation: poke-fade-in 0.35s ease-out;
}

@keyframes poke-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection highlight */
body.poke-ui ::selection {
    background: rgba(22, 119, 255, 0.25);
    color: inherit;
}

/* ========== 账户中心 · 五平台按钮入口 ========== */
.user-platform-hub-section {
    margin-bottom: 1.5rem;
}
.user-platform-hub-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--poke-blue-dark, #0958d9);
    margin: 0 0 0.35rem;
}
.user-platform-hub-lead {
    color: var(--text-muted, #6b7280);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}
.user-platform-hub-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}
.user-platform-hub-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.1rem 0.75rem;
    text-decoration: none;
    color: inherit;
    border-radius: var(--poke-radius-sm, 12px);
    border: 2px solid var(--poke-border, #bae0ff);
    background: #fff;
    box-shadow: var(--poke-shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    min-height: 148px;
}
.user-platform-hub-card:hover {
    transform: translateY(-3px);
    border-color: var(--poke-blue, #1677ff);
    box-shadow: var(--poke-shadow);
    color: inherit;
}
.user-platform-hub-card strong {
    font-size: 0.95rem;
    margin-top: 0.5rem;
}
.user-platform-hub-card small {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin-top: 0.2rem;
}
.user-platform-hub-badge {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #389e0d;
}
.user-platform-hub-enter {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--poke-blue, #1677ff);
}
.platform-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--poke-blue-pale, #e6f4ff);
    border: 2px solid var(--poke-border);
}
.platform-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.platform-icon-fallback {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--poke-blue);
}
.ui-account-hero,
.ui-platform-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}
.ui-platform-hero-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ui-platform-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}
.ui-balance-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #059669;
}
@media (max-width: 991.98px) {
    .user-platform-hub-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 575.98px) {
    .user-platform-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
