* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: #f9fafb;
    min-height: 100vh;
    line-height: 1.6;
    color: #111827;
}

.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nav-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.375rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.status-badge {
    background: #d1fae5;
    color: #065f46;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.page-description {
    color: #6b7280;
    font-size: 1rem;
}

.tabs {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.25rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.tab {
    flex: 1;
    padding: 0.75rem 1.25rem;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    color: #6b7280;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: fit-content;
}

.tab:hover {
    color: #374151;
    background: #f9fafb;
}

.tab.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.section {
    display: none;
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.section h2 {
    font-size: 1.5rem;
    color: #111827;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* 商户配置专用样式 */
.merchant-label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.merchant-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.merchant-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.merchant-input:hover {
    border-color: #9ca3af;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.merchant-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.merchant-input:valid {
    border-color: #10b981;
}

.merchant-input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

/* 商户配置表单组样式 */
#merchant .form-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

#merchant .form-group:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

#merchant .form-help {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

#merchant .form-help::before {
    content: "💡";
    font-size: 0.75rem;
}

/* 商户余额显示样式 */
.balance-section {
    margin: 0 0 2rem 0;
}

.balance-card-unified {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.balance-card-unified:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.balance-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.balance-header .balance-icon {
    font-size: 1.5rem;
}

.balance-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.balance-content {
    padding: 1rem;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.balance-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    flex: 1;
}

.balance-currency {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.currency-icon {
    font-size: 1.25rem;
}

.currency-name {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.balance-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.balance-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent 0%, #e5e7eb 50%, transparent 100%);
    margin: 0;
}

/* 商品配置页面样式 */
.development-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.notice-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.development-notice h3 {
    color: #92400e;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.development-notice p {
    color: #a16207;
    font-size: 1rem;
    margin: 0;
}

.products-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.products-header {
    background: #f9fafb;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.products-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

.products-count {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.products-list {
    min-height: 300px;
    padding: 1.5rem;
}

.products-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6b7280;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.product-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.product-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.product-item:last-child {
    margin-bottom: 0;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.product-key {
    font-size: 0.875rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
    font-family: monospace;
}

.product-description {
    color: #4b5563;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #059669;
}

.products-empty {
    text-align: center;
    color: #6b7280;
    padding: 3rem 1rem;
}

.products-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.products-empty h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.products-empty p {
    margin: 0;
}

/* 消息模版列表样式 */
.message-template-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.message-template-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    gap: 1rem;
}

.message-template-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.template-info {
    flex: 1;
    min-width: 0;
}

.template-keyword {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.template-content {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-delete:hover {
    background: #fecaca;
    border-color: #f87171;
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.empty-state-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.group-selector {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.group-selector-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.group-selector-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.group-selector-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.group-select-wrapper {
    position: relative;
}

.group-select {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.875rem;
    background: #ffffff;
    color: #111827;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.group-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.group-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.group-select:focus+.group-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* 群组卡片样式 */
.group-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    display: none;
}

.group-card.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.group-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.group-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.group-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
}

.group-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.group-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.group-status {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #d1fae5;
    color: #065f46;
}

.switch-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.switch-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.switch-group:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.switch-info {
    flex: 1;
}

.switch-title {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.switch-desc {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    transition: all 0.3s ease;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
    background: #3b82f6;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.slider:hover {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: fit-content;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #ffffff;
    color: #111827;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 20px;
    height: 20px;
    background: #d1fae5;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .section {
        padding: 1.5rem;
    }

    .group-selector {
        padding: 1.25rem;
    }

    .group-card {
        padding: 1.25rem;
    }

    .group-info {
        gap: 0.75rem;
    }

    .group-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .switch-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .switch-info {
        width: 100%;
    }

    .actions {
        flex-direction: column-reverse;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .tabs {
        padding: 0.125rem;
    }

    .tab {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .section {
        padding: 1.25rem;
    }

    .group-selector {
        padding: 1rem;
    }

    .group-card {
        padding: 1rem;
    }
}

/* 能量闪租样式 */
.address-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.address-input-group .form-input {
    flex: 1;
    min-width: 0;
}

.address-input-group .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.balance-display {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 12px;
    color: white;
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.balance-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.balance-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.balance-value {
    font-size: 1.1rem;
    font-weight: bold;
}

.rental-config {
    margin-top: 1rem;
}

.config-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.config-section h3 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1rem;
}

.duration-options {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.duration-option {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.duration-option:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.duration-option.selected {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
}

.duration-time {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 0.125rem;
}

.duration-desc {
    font-size: 0.75rem;
    opacity: 0.8;
}

.quantity-options {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.quantity-option {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.quantity-option:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.quantity-option.selected {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
}

.quantity-num {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 0.125rem;
}

.quantity-price {
    display: none;
}

.order-summary {
    margin: 1rem 0;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.summary-row.total {
    font-weight: bold;
    font-size: 1rem;
    color: #3b82f6;
    border-top: 1px solid #e9ecef;
    padding-top: 0.375rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.payment-section {
    margin-top: 1rem;
}

.btn-large {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
}

/* 平板端适配 */
@media (max-width: 768px) {
    .balance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .quantity-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .duration-options {
        flex-direction: column;
        gap: 0.75rem;
    }

    .balance-display {
        padding: 1rem;
        margin: 1rem 0;
    }

    .config-section {
        padding: 1rem;
    }
}

/* 手机端适配 */
@media (max-width: 480px) {
    .address-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .address-input-group .btn {
        width: 100%;
        justify-content: center;
    }

    .balance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .balance-item {
        padding: 0.75rem;
    }

    .balance-value {
        font-size: 1.25rem;
    }

    .balance-label {
        font-size: 0.8rem;
    }

    .quantity-options {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .quantity-option,
    .duration-option {
        padding: 0.75rem;
    }

    .config-section {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }

    .config-section h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .order-summary {
        padding: 0.75rem;
        margin: 1rem 0;
    }

    .summary-row {
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* 超小屏幕适配 */
@media (max-width: 360px) {
    .balance-display {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }

    .balance-item {
        padding: 0.5rem;
    }

    .balance-value {
        font-size: 1.1rem;
    }

    .config-section {
        padding: 0.5rem;
    }

    .quantity-option,
    .duration-option {
        padding: 0.5rem;
    }

    .quantity-num,
    .duration-time {
        font-size: 1rem;
    }

    .order-summary {
        padding: 0.5rem;
    }
}

/* 表单操作按钮样式 */
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.form-help {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}