/* Console — Waypoint Operate shell */
.console-body { min-height: 100vh; }
.console-layout { display: flex; min-height: calc(100vh - var(--nav-height, 64px)); }
.console-body .navbar .container { max-width: none; padding: 0 20px 0 16px; }
.console-body .brand-text { font-size: 1.05rem; }
.user-info { font-size: 0.9rem; color: var(--ink-secondary); font-weight: 550; }
.sidebar {
  width: var(--sidebar-width, 248px);
  background: var(--surface-2, #fff);
  border-right: 1px solid var(--border, #D5DCE8);
  padding: 16px 12px;
  flex-shrink: 0;
  box-shadow: none;
}
.quick-actions, .endpoint-info {
    background: var(--surface-2, #fff);
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border, #D5DCE8);
    box-shadow: var(--shadow-xs);
}
.quick-actions h2, .endpoint-info h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.tab-btn.active {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}


.sidebar-header h3 {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-lighter);
    padding: 8px 12px 10px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-light);
    text-decoration: none;
    transition:
        background-color var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out);
    border-radius: var(--radius-md);
    border-left: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.sidebar-link.active {
    background: var(--primary-soft);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-link .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: inherit;
}

.sidebar-link .nav-icon iconify-icon {
    width: 18px;
    height: 18px;
}

.sidebar-link .icon,
.sidebar-link .iconfont,
.sidebar-link .fas {
    font-size: 1.1em;
    color: inherit;
    width: 20px;
    text-align: center;
}

/* 涓诲唴瀹瑰尯 */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 24px 28px 40px;
    background:
        radial-gradient(ellipse 70% 40% at 100% 0%, rgba(22, 100, 255, 0.06), transparent 55%),
        var(--surface-1, #F3F6FB);
    overflow-y: auto;
}

.content-section {
    display: none;
    width: 100%;
    max-width: none;
}

.content-section.active {
    display: block;
    animation: riseIn 0.35s var(--ease-out);
}

.content-section > h1,
.section-header h1 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ink);
}

.section-desc {
    color: var(--ink-secondary);
    margin-bottom: 20px;
}

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

/* 缁熻姒傝 */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-box {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFF 100%);
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border, #D5DCE8);
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    transition:
        box-shadow var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal) var(--ease-out),
        transform var(--duration-normal) var(--ease-out);
}

.stat-box:hover {
    box-shadow: var(--shadow-sm);
    border-color: rgba(22, 100, 255, 0.28);
    transform: translateY(-1px);
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    color: var(--brand);
    flex-shrink: 0;
}

.stat-icon .nav-icon,
.stat-icon iconify-icon {
    width: 22px;
    height: 22px;
    color: inherit;
}

.stat-icon i {
    display: block;
    font-size: 22px;
    color: inherit;
    transition: transform var(--duration-normal) var(--ease-out);
}

.stat-box:hover .stat-icon i,
.stat-box:hover .stat-icon iconify-icon {
    transform: scale(1.06);
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.6vw, 1.7rem);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-info p {
    color: var(--ink-muted);
    font-size: 0.82rem;
    font-weight: 550;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85em;
}

/* 蹇€熸搷浣?*/
.quick-actions {
    background: var(--surface-2, #fff);
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border, #D5DCE8);
    box-shadow: var(--shadow-xs);
    margin-bottom: 18px;
}

.quick-actions h2 {
    margin-bottom: 20px;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.action-card {
    background: linear-gradient(165deg, #FFFFFF 0%, #F5F8FF 100%);
    padding: 20px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border, #D5DCE8);
    text-align: left;
    cursor: pointer;
    transition:
        border-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
    box-shadow: var(--shadow-xs);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(22, 100, 255, 0.35);
}

.action-card:active {
    transform: translateY(0);
}

.action-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 14px;
}

.action-card h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.action-card p {
    color: var(--text-light);
    font-size: 0.9em;
}

/* API鎺ュ叆淇℃伅 */
.endpoint-info {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
}

.endpoint-info h2 {
    margin-bottom: 20px;
}

.info-card {
    margin-bottom: 20px;
}

.info-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.copy-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.copy-field code {
    flex: 1;
    background: var(--bg-light);
    padding: 11px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

/* API瀵嗛挜鍒楄〃 */
.keys-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.key-item {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.key-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-dark);
}

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

.key-value {
    background: var(--bg-light);
    padding: 11px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    word-break: break-all;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.key-info {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.9em;
}

.key-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
}

.key-status.active {
    background: #d4edda;
    color: #155724;
}

.key-status.disabled {
    background: #f8d7da;
    color: #721c24;
}

/* 琛ㄥ崟鏍峰紡 */
.settings-form {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
}

/* 鍏呭€间俊鎭?*/
.billing-info {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-info p {
    margin-bottom: 8px;
}

.alert-info p:last-child {
    margin-bottom: 0;
}

/* 鐢ㄦ埛淇℃伅 */
.user-info {
    color: var(--text-dark);
    font-weight: 500;
    margin-right: 15px;
}

/* 鏂囨湰宸ュ叿绫?*/
.text-muted {
    color: var(--text-light);
}

/* 渚ц竟鏍忔爣棰?*/
.sidebar-header {
    padding: 0 25px 15px;
    color: var(--text-light);
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 鍦ㄧ嚎浣撻獙 */
.playground-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-light);
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: -1px;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(200, 133, 63, 0.08);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
    background: rgba(200, 133, 63, 0.05);
}

.playground-tab-content {
    display: none;
}

.playground-tab-content.active {
    display: block;
}

.playground-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: calc(100vh - 280px);
}

.playground-chat-layout {
    display: grid;
    grid-template-columns: 280px 240px 1fr;
    gap: 20px;
    height: calc(100vh - 280px);
}

.history-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.chat-history-item {
    cursor: pointer;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-history-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chat-history-item.active {
    border-color: var(--primary-color);
    background: rgba(200, 133, 63, 0.06);
}

.chat-history-item-title {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-history-item-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.chat-history-item-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.chat-history-item-actions .btn-text-danger {
    border: none;
    background: transparent;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.playground-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.playground-header h3 {
    margin-bottom: 8px;
    color: var(--text-dark);
}

.playground-sidebar {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 12px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.playground-sidebar h3 {
    margin-bottom: 16px;
    color: var(--text-dark);
    font-size: 1.1em;
}

/* 瀵硅瘽璁剧疆琛ㄥ崟鏍峰紡 */
.playground-sidebar .form-group {
    margin-bottom: 14px;
}

.playground-sidebar .form-group:last-of-type {
    margin-bottom: 0;
}

.playground-limits {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #F7F8FA;
    border: 1px solid #E5E6EB;
}

.playground-limits-title {
    font-size: 12px;
    font-weight: 600;
    color: #4E5969;
    margin-bottom: 6px;
}

.playground-limit-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    line-height: 1.6;
}

.playground-limit-row span:first-child {
    color: #86909C;
    flex-shrink: 0;
}

.playground-limit-row span:last-child {
    color: #1F2329;
    text-align: right;
    word-break: break-all;
}

.playground-sidebar .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.9em;
    font-weight: 500;
}

.playground-sidebar .form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.playground-sidebar .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

.playground-sidebar select.form-control {
    cursor: pointer;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    padding-right: 32px;
}

.playground-sidebar select.form-control:hover {
    border-color: var(--primary-color);
}

.playground-sidebar input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #ddd 0%, #ddd 100%);
    outline: none;
    padding: 0;
    cursor: pointer;
}

.playground-sidebar input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.playground-sidebar input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: var(--primary-dark);
}

.playground-sidebar input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.playground-sidebar input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
    background: var(--primary-dark);
}

.playground-sidebar input[type="number"] {
    appearance: textfield;
}

.playground-sidebar input[type="number"]::-webkit-inner-spin-button,
.playground-sidebar input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

.playground-main {
    background: var(--bg-white);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 20px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* 涓枃闃呰鏇磋垝閫傜殑瀛椾綋涓庤璺?*/
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
        "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
}

.message {
    padding: 14px 16px;
    border-radius: 10px;
    max-width: 86%;
    word-wrap: break-word;
    word-break: break-word;
}

.message-body {
    white-space: pre-wrap;
    line-height: 1.75;
    font-size: 15px;
}

.message.user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.message.assistant {
    background: #faf8f5;
    color: #2b2f36;
    align-self: flex-start;
    border: 1px solid #ece7df;
}

.chat-composer {
    padding: 12px 16px 16px;
    background: #fff;
}

.chat-composer-box {
    border: 1px solid #E5E6EB;
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px 8px;
}

.chat-composer-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.chat-attach-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.chat-attach-label {
    font-size: 12px;
    color: #86909C;
    margin-right: 2px;
}

.chat-attach-btn {
    border: 1px solid #E5E6EB;
    background: #F7F8FA;
    color: #1F2329;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}

.chat-attach-btn:hover {
    border-color: var(--brand, #1664FF);
    color: var(--brand, #1664FF);
    background: #fff;
}

.chat-pending-media {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.chat-pending-media:empty {
    display: none;
    margin: 0;
}

.chat-pending-chip {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E5E6EB;
    background: #F2F3F5;
}

.chat-pending-chip img,
.chat-pending-chip video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #111;
}

.chat-pending-chip.is-audio {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #4E5969;
}

.chat-pending-chip button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    line-height: 18px;
    padding: 0;
}

.chat-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.chat-composer-toolbar #sendChatBtn {
    flex-shrink: 0;
    height: 32px;
    padding: 0 16px;
}

.chat-msg-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.chat-msg-thumb {
    display: block;
    width: 160px;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.message.user .chat-msg-thumb {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.12);
}

.chat-msg-thumb img,
.chat-msg-thumb video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    vertical-align: top;
}

.chat-msg-thumb-video {
    width: 220px;
}

.chat-msg-thumb-video video {
    height: 140px;
    background: #111;
}

.chat-msg-thumb-missing {
    width: 120px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.55);
}

.message.user .chat-msg-thumb-missing {
    color: rgba(255, 255, 255, 0.85);
}

.chat-msg-audio {
    max-width: 260px;
}

.chat-msg-audio audio {
    width: 100%;
}

.message.user .message-body {
    color: inherit;
}

.chat-composer-box textarea {
    width: 100%;
    resize: none;
    border: none;
    border-radius: 0;
    padding: 4px 2px 8px;
    font-family: inherit;
    font-size: 0.95em;
    box-shadow: none;
    background: transparent;
}

.chat-composer-box textarea:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

/* 图片画廊 */
.image-gallery {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.image-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s;
}

.image-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 瑙嗛鐢诲粖 */
.video-gallery {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.video-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.video-item video {
    width: 100%;
    height: auto;
    display: block;
}

/* 浣跨敤璁板綍 */
.usage-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.usage-filters select {
    padding: 9px 32px 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-width: 200px;
}

.usage-filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

.usage-filters select:hover {
    border-color: var(--primary-color);
}

.data-table {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg-light);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9em;
}

.data-table td {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.9em;
}

.console-pager {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 16px;
    flex-wrap: wrap;
}

.console-pager-info {
    color: #888;
    font-size: 13px;
    margin-right: auto;
}

.console-pager button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 鏃ュ織鍒楄〃 */
.logs-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.logs-filters select {
    padding: 9px 32px 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-width: 150px;
}

.logs-filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

.logs-filters select:hover {
    border-color: var(--primary-color);
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-item {
    background: var(--bg-white);
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 0 solid var(--secondary-color);
    border: 1px solid var(--border-color);
    border-left-width: 3px;
}

.log-item.error {
    border-left-color: var(--error-color);
}

.log-item.warning {
    border-left-color: var(--warning-color);
}

.log-time {
    color: var(--text-light);
    font-size: 0.85em;
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.log-level-badge {
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 999px;
    color: #fff;
    background: #c0392b;
}
.log-level-badge.warning {
    background: #d68910;
}

.log-chip {
    background: var(--bg-light);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
}

.log-detail {
    margin: 8px 0 0;
    padding: 10px;
    background: #f7f7f7;
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 160px;
    overflow: auto;
}

/* 模型广场网格 */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    padding: 8px 0 24px;
}

@media (min-width: 1024px) {
    .models-grid {
        gap: 24px;
    }
}

.plaza-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 24px;
    color: var(--ink-muted);
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.plaza-empty-state i {
    display: block;
    font-size: 1.75rem;
    color: var(--brand);
    margin-bottom: 12px;
    opacity: 0.7;
}

.plaza-empty-state p {
    margin: 0;
    font-size: 0.9375rem;
}

/* 推荐筛选：最热 / 最新 */
.plaza-flag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -8px 0 20px;
    padding: 0 4px;
}

.plaza-flag-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-secondary);
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.plaza-flag-tag i {
    font-size: 0.95rem;
    line-height: 1;
}

.plaza-flag-tag:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-softer);
}

.plaza-flag-tag.active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(22, 100, 255, 0.22);
}

.plaza-flag-tag-hot.active {
    border-color: #e8590c;
    background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%);
    box-shadow: 0 2px 8px rgba(232, 89, 12, 0.25);
}

.plaza-flag-tag-new.active {
    border-color: #1c7ed6;
    background: linear-gradient(135deg, #339af0 0%, #1c7ed6 100%);
    box-shadow: 0 2px 8px rgba(28, 126, 214, 0.25);
}

/* 模型卡片 */
.model-card {
    background: var(--surface-2);
    padding: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.model-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
    position: relative;
    z-index: 1;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 18, 32, 0.08), 0 4px 10px rgba(22, 100, 255, 0.06);
    border-color: rgba(22, 100, 255, 0.28);
}

.model-card::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 120px;
    background: radial-gradient(ellipse at bottom, rgba(22, 100, 255, 0.06) 0%, transparent 72%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.model-card:hover::after {
    opacity: 1;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand) 0%, #5b8cff 55%, #a8c5ff 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.model-card:hover::before,
.model-card.is-hot::before,
.model-card.is-new::before {
    opacity: 1;
}

.model-card.is-hot::before {
    background: linear-gradient(90deg, #fd7e14 0%, #ff922b 50%, #ffc078 100%);
}

.model-card.is-new:not(.is-hot)::before {
    background: linear-gradient(90deg, #339af0 0%, #4dabf7 50%, #a5d8ff 100%);
}

.model-card.is-hot {
    border-color: rgba(232, 89, 12, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 244, 230, 0.55) 0%, transparent 88px),
        var(--surface-2);
}

.model-card.is-new:not(.is-hot) {
    border-color: rgba(28, 126, 214, 0.28);
    background:
        linear-gradient(180deg, rgba(231, 245, 255, 0.65) 0%, transparent 88px),
        var(--surface-2);
}

.plaza-card-header {
    margin-bottom: 12px;
}

.model-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    width: 100%;
}

.model-card h3 {
    color: var(--ink);
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.02em;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 鍘傚晢鏍囩鏍峰紡 */
.model-provider {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.85em;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 0 solid #C8853F;
}

.model-provider i {
    color: #C8853F;
    font-size: 0.95em;
}

/* 多档价格 / IO / 限制 */
.model-meta-sections {
    margin-top: auto;
    padding-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.model-meta-section {
    padding: 12px 0;
    border-bottom: 1px solid #F0F1F2;
}

.model-meta-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.model-meta-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.model-meta-label {
    font-size: 13px;
    font-weight: 600;
    color: #4E5969;
    flex-shrink: 0;
}

.price-rule-group-select {
    max-width: 58%;
    padding: 4px 8px;
    border: 1px solid #DEE0E3;
    border-radius: 6px;
    font-size: 12px;
    color: #1F2329;
    background: #fff;
}

.price-rules-grid,
.limits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.price-rule-cell,
.limit-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pr-label,
.limit-key {
    font-size: 12px;
    color: #86909C;
    line-height: 1.3;
}

.pr-value,
.limit-val {
    font-size: 14px;
    font-weight: 600;
    color: #1F2329;
    line-height: 1.35;
}

.io-types-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.io-types-side {
    display: flex;
    align-items: center;
    gap: 8px;
}

.io-side-label {
    font-size: 12px;
    color: #86909C;
}

.io-chips {
    display: flex;
    gap: 6px;
    align-items: center;
}

.io-chip {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #E5E6EB;
    background: #F7F8FA;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #4E5969;
}

.io-chip[data-mod="text"] .io-chip-icon {
    font-weight: 700;
    font-family: Georgia, 'Times New Roman', serif;
}

.io-empty {
    color: #C9CDD4;
    font-size: 13px;
}

/* 浠锋牸鍖哄煙鏍峰紡 */
.model-price {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.price-item {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    transition: all 0.2s ease;
}

.price-item:hover {
    background: #f0f1f3;
}

.price-label {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-value {
    font-size: 0.9375rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* 绫诲瀷鏍囩寰界珷 */
.model-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: white;
}

.model-type-badge:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* 鏂囨湰绫诲瀷 - 钃濊壊 */
.model-type-badge.type-text {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* 鍥惧儚绫诲瀷 - 绱壊 */
.model-type-badge.type-image {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

/* 闊抽绫诲瀷 - 缁胯壊 */
.model-type-badge.type-audio {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

/* 瑙嗛绫诲瀷 - 绾㈣壊 */
.model-type-badge.type-video {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* 3D绫诲瀷 - 姗欒壊 */
.model-type-badge.type-3d {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

/* 宓屽叆绫诲瀷 - 鐏拌壊 */
.model-type-badge.type-embedding {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.model-provider-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.model-provider-line i {
    color: var(--brand);
    font-size: 0.95rem;
    opacity: 0.85;
}

.plaza-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.plaza-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

.plaza-badge i {
    font-size: 0.85rem;
    line-height: 1;
}

.plaza-badge-hot {
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    color: #d9480f;
    border: 1px solid #ffc078;
    box-shadow: 0 1px 2px rgba(217, 72, 15, 0.08);
}

.plaza-badge-new {
    background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
    color: #1864ab;
    border: 1px solid #74c0fc;
    box-shadow: 0 1px 2px rgba(28, 126, 214, 0.08);
}

.plaza-scenario-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
}

.plaza-scenario-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #b2f2bb;
    font-size: 0.75rem;
    font-weight: 500;
}

.plaza-card-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    min-height: 0;
}

.plaza-discount {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--warning);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.model-description {
    color: var(--ink-secondary);
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 0 0 4px;
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plaza-base-prices {
    margin-bottom: 12px;
}

.plaza-base-prices .price-item {
    flex: 1 1 30%;
}

/* 模型广场：基础价列表 + 超长上下文加价折叠 */
.plaza-price-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.plaza-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 22px;
}

.plaza-price-label {
    font-size: 0.8125rem;
    color: #86909c;
    font-weight: 500;
    line-height: 1.4;
}

.plaza-price-value {
    font-size: 0.875rem;
    color: #1f2329;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.plaza-price-row.is-detail .plaza-price-label {
    color: #646a73;
    font-size: 0.78rem;
}

.plaza-price-row.is-detail .plaza-price-value {
    font-size: 0.8125rem;
    font-weight: 600;
}

.plaza-surcharge {
    width: 100%;
    margin: 2px 0 8px;
}

.plaza-surcharge-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border: none;
    background: transparent;
    color: #4e5969;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
}

.plaza-surcharge-toggle:hover {
    color: #1f2329;
}

.plaza-surcharge-toggle i {
    font-size: 0.7rem;
    color: #86909c;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.plaza-surcharge.is-open .plaza-surcharge-toggle i {
    transform: rotate(180deg);
}

.plaza-surcharge-body {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0 2px 2px;
}

.plaza-surcharge-body[hidden] {
    display: none !important;
}

.plaza-surcharge.is-open .plaza-surcharge-body {
    display: flex;
}

/* 澶嶅埗鎸夐挳鏍峰紡 */
.copy-model-btn {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--ink-muted);
    padding: 6px 8px;
    min-width: 32px;
    min-height: 32px;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    font-size: 14px;
    opacity: 0.72;
}

.model-name-row:hover .copy-model-btn,
.copy-model-btn:focus-visible {
    opacity: 1;
}

.copy-model-btn:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.copy-model-btn:active {
    background: var(--brand-pressed);
}

.filters-container {
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 28px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid rgba(200, 133, 63, 0.15);
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 18px;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
    position: relative;
}

.filter-item:hover {
    border-color: rgba(200, 133, 63, 0.3);
    box-shadow: 0 2px 8px rgba(200, 133, 63, 0.1);
}

.filter-item:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

.filter-item i {
    color: var(--primary-color);
    font-size: 1.1em;
    min-width: 18px;
}

.filter-search {
    flex: 1;
    min-width: 260px;
}

.filter-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-dark);
    width: 100%;
    font-family: inherit;
}

.filter-input::placeholder {
    color: var(--ink-muted);
}

.filter-select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-dark);
    cursor: pointer;
    padding-right: 24px;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C8853F' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    min-width: 140px;
}

.filter-select:hover {
    color: var(--primary-color);
}

/* 绫诲瀷鏍囩鎸夐挳 */
.type-tags-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    padding: 0 4px;
}

.type-tag {
    padding: 8px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.type-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(200, 133, 63, 0.05);
    transform: translateY(-1px);
}

.type-tag.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(200, 133, 63, 0.3);
}

.type-tag.active:hover {
    background: var(--primary-color);
    color: white;
}

/* 鍏呭€肩浉鍏?*/
.recharge-container {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.recharge-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.method-card {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.method-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: var(--bg-white);
}

.method-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.method-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.method-card h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.method-card p {
    color: var(--text-light);
    font-size: 0.9em;
}

.amount-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.amount-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1em;
    font-weight: 500;
    color: var(--text-dark);
}

.custom-amount-input {
    width: 200px;
    text-align: center;
}

.amount-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-white);
    color: var(--primary-color);
}

.amount-btn.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* 璁㈤槄淇℃伅 */
.subscription-info {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.plan-card {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.plan-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.plan-price {
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.plan-card li {
    padding: 10px 0;
    color: var(--text-dark);
}

/* 涓汉璧勬枡鍜屽彂绁ㄨ〃鍗?*/
.profile-form,
.invoice-form {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    max-width: 600px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.profile-form .form-group,
.invoice-form .form-group {
    margin-bottom: 16px;
}

.profile-form .form-group:last-of-type,
.invoice-form .form-group:last-of-type {
    margin-bottom: 20px;
}

.profile-form .form-group label,
.invoice-form .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.9em;
    font-weight: 500;
}

.profile-form .form-control,
.invoice-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.profile-form .form-control:focus,
.invoice-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

.profile-form .form-control:read-only,
.invoice-form .form-control:read-only {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

.profile-form select,
.invoice-form select {
    width: 100%;
    padding: 10px 32px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.profile-form select:focus,
.invoice-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

/* 涓夋爮甯冨眬锛堢粯鍥惧拰瑙嗛椤甸潰锛?*/
.playground-three-column {
    display: grid;
    grid-template-columns: 320px 1fr 380px;
    gap: 20px;
    height: calc(100vh - 280px);
}

/* 宸︿晶鍘嗗彶浣滃搧鍖?*/
.history-sidebar {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h3 {
    font-size: 1.1em;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.history-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-light);
}

.history-item.is-failed {
    opacity: 0.78;
}

.history-item-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #f3f4f6;
    border-radius: 6px;
    margin-bottom: 8px;
    display: block;
}

.history-item-info .history-prompt {
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.4;
}

.history-item-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.history-status-ok {
    color: #16a34a;
}

.history-status-fail {
    color: #dc2626;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    transform: rotate(180deg);
}

.btn-icon:active {
    transform: rotate(180deg) scale(0.9);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item-placeholder {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-size: 0.9em;
}

.history-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.history-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.history-item img,
.history-item video {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 8px;
}

.history-item-info {
    font-size: 0.85em;
    color: var(--text-light);
}

/* 涓棿宸ヤ綔鍙板尯 */
.workbench-center {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.workbench-center h3 {
    margin-top: 0;
    margin-bottom: 6px;
    color: var(--text-dark);
    font-size: 1.1em;
}

.workbench-center > p {
    margin: 0 0 10px 0;
    color: var(--ink-muted);
    font-size: 0.85em;
    line-height: 1.4;
}

.workbench-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 宸ヤ綔鍙拌〃鍗曟牱寮?*/
.workbench-form .form-group {
    margin-bottom: 0;
}

.workbench-form .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9em;
    font-weight: 500;
}

.workbench-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.workbench-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

.workbench-form select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    padding-right: 32px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.workbench-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

/* 涓?select.form-control 娣诲姞涓嬫媺鍥炬爣 */
.workbench-form select.form-control {
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    padding-right: 32px;
    cursor: pointer;
}

.workbench-form .form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.workbench-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 133, 63, 0.1);
}

.form-hint {
    font-size: 0.8em;
    color: var(--ink-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: var(--surface-3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 8px 0;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(200, 133, 63, 0.06);
    box-shadow: 0 2px 8px rgba(200, 133, 63, 0.08);
}

.upload-trigger {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.upload-area:hover .upload-trigger {
    transform: translateY(-3px);
}

.upload-trigger i {
    font-size: 2.5em;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.upload-area:hover .upload-trigger i {
    transform: scale(1.1);
    color: var(--primary-dark);
}

.upload-area.has-files {
    padding: 10px;
    text-align: left;
}

.upload-area.has-files .upload-trigger {
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.upload-area.has-files .upload-trigger i {
    font-size: 1.05em;
}

.upload-area.has-files .upload-hint {
    display: none;
}

.upload-area.has-files .file-preview {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-preview-item button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    line-height: 18px;
    cursor: pointer;
    padding: 0;
}

.file-preview-size {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 4px;
    font-size: 11px;
    line-height: 1.2;
}

.form-row {
    display: flex;
    gap: 15px;
}

/* 鍙充晶缁撴灉灞曠ず鍖?*/
.result-sidebar {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.result-sidebar h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-placeholder {
    text-align: center;
    color: var(--text-light);
    padding: 60px 20px;
    font-size: 0.9em;
    line-height: 1.6;
}

.result-item img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-item video {
    width: 100%;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-item-meta {
    margin-top: 10px;
    font-size: 0.85em;
    color: var(--text-light);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 8px;
    box-sizing: border-box;
}

/* 涓嬭浇鎸夐挳 */
.btn-download {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-download:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .console-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .sidebar-link {
        flex-direction: column;
        gap: 5px;
        padding: 10px 15px;
        font-size: 0.85em;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .playground-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .playground-chat-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .playground-three-column {
        grid-template-columns: 1fr;
        height: auto;
    }

    .history-sidebar,
    .workbench-center,
    .result-sidebar {
        max-height: 500px;
    }
    
    .playground-sidebar {
        order: 2;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .recharge-methods {
        grid-template-columns: 1fr;
    }
}

/* 璁㈤槄椤甸潰鏍峰紡 */
.subscription-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 鐢ㄦ埛淇℃伅鏍?*/
.subscription-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.user-details {
    flex: 1;
}

.user-id {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.user-balance {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-balance i {
    color: #f59e0b;
}

.btn-manage-subscription {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-manage-subscription:hover {
    background: #f8f9fa;
    border-color: var(--ink-muted);
}

.subscription-container h2 {
    text-align: center;
    font-size: 28px;
    margin: 30px 0;
    color: #333;
}

/* 璁㈤槄鍛ㄦ湡鍒囨崲 */
.subscription-period-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.period-btn {
    padding: 10px 24px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.period-btn:hover {
    border-color: var(--success);
}

.period-btn.active {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.discount-badge {
    background: #ef4444;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
}

/* 璁㈤槄濂楅鍗＄墖 */
.subscription-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.plan-card {
    position: relative;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.plan-card:hover {
    border-color: var(--success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.plan-card.selected {
    border-color: var(--success);
    background: #f0fdf4;
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.plan-badge-hot {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.plan-header h3 {
    font-size: 20px;
    margin: 10px 0;
    color: #333;
}

.plan-price {
    margin: 20px 0;
}

.price-current {
    font-size: 48px;
    font-weight: 700;
    color: #333;
}

.price-unit {
    font-size: 16px;
    color: #666;
}

.price-original {
    font-size: 16px;
    color: var(--ink-muted);
    text-decoration: line-through;
    margin-left: 10px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.plan-features li {
    padding: 10px 0;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.plan-features li i {
    color: var(--success);
    margin-top: 2px;
}

.btn-select-plan {
    width: 100%;
    padding: 12px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-select-plan:hover {
    background: #e5e7eb;
}

.plan-card.selected .btn-select-plan {
    background: #333;
    color: white;
}

/* 鏀粯鍖哄煙 */
.subscription-payment {
    display: flex;
    gap: 40px;
    padding: 30px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-top: 30px;
}

.payment-qrcode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.payment-qrcode .subscription-qrcode-box,
.payment-qrcode #subscriptionQrcode {
    width: 200px;
    height: 200px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    position: relative;
    flex-shrink: 0;
}

.payment-qrcode #subscriptionQrcode img,
.payment-qrcode #subscriptionQrcode canvas,
.payment-qrcode #subscriptionQrcode table {
    width: 200px !important;
    height: 200px !important;
    max-width: 200px !important;
    max-height: 200px !important;
    display: block;
    margin: 0 auto;
}

.subscription-order-tip {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.4;
    max-width: 240px;
    word-break: break-all;
    min-height: 1.2em;
}

.subscription-pay-open {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
}

.subscription-pay-open:hover {
    text-decoration: underline;
}

.subscription-pay-methods {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 4px 0;
}

.subscription-pay-methods .sub-pay-method {
    min-width: 108px;
    padding: 8px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.subscription-pay-methods .sub-pay-method:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.subscription-pay-methods .sub-pay-method.active[data-sub-method="wechat"] {
    background: #07c160;
    border-color: #07c160;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.2);
}

.subscription-pay-methods .sub-pay-method.active[data-sub-method="alipay"] {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
}

.btn-confirm-paid {
    padding: 10px 30px;
    background: #333;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.btn-confirm-paid:hover {
    background: #555;
}

.payment-info {
    flex: 1;
}

.payment-method {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.payment-amount {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.payment-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.payment-agreement {
    font-size: 13px;
    color: var(--ink-muted);
}

.payment-agreement label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.payment-agreement input[type="checkbox"] {
    margin-top: 2px;
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .subscription-plans {
        grid-template-columns: 1fr;
    }
    
    .subscription-payment {
        flex-direction: column;
        align-items: center;
    }
}


.pay-notice {
  margin: 15px 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.pay-notice-info {
  background: var(--primary-light);
  color: var(--brand-deep);
  border-color: rgba(22, 100, 255, 0.25);
}
.pay-notice-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(15, 122, 58, 0.25);
}


/* dashboard fluid */
@media (max-width: 1200px) {
  .stats-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .stats-overview { grid-template-columns: 1fr; }
}

.usage-token-cell,
.usage-hit-cell {
  min-width: 140px;
  line-height: 1.35;
}

.usage-token-main,
.usage-hit-main {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.usage-token-sub,
.usage-hit-sub {
  margin-top: 2px;
  font-size: 0.75rem;
  color: #6b7280;
}

.usage-hit-main.is-zero {
  color: #e03131;
}

.usage-hit-main.is-low {
  color: #e67700;
}

.usage-hit-main.is-ok {
  color: #d9480f;
}
