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

/* 禁用页面缩放 */
html {
    touch-action: manipulation;
}

body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 防止iOS自动放大输入框 - 确保所有输入框字体大小至少16px */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    font-size: 16px !important;
}

/* 在小屏幕设备上也保持16px */
@media screen and (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* 充值功能相关样式 */
.recharge-modal-content {
    max-width: 600px;
    width: 95%;
}

/* 选项卡导航 */
.tab-nav {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #667eea;
    background: #f5f5ff;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f5f5ff;
}

/* 选项卡内容 */
.tab-content {
    display: none;
}

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

/* 余额信息显示 */
.recharge-balance-info {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-right: 10px;
}

.balance-amount {
    font-size: 24px;
    font-weight: bold;
}

/* 金额选择网格 */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.amount-btn:hover {
    border-color: #667eea;
    background: #f5f5ff;
}

.amount-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* 按钮样式 */
.btn-full-width {
    width: 100%;
}

/* 充值记录样式 */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid transparent;
}

.history-item.success {
    border-left-color: #4CAF50;
}

.history-item.pending {
    border-left-color: #ffc107;
}

.history-item.expired {
    border-left-color: #f44336;
}

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

.history-amount {
    font-weight: bold;
    color: #333;
}

.history-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
}

.history-status.success {
    background: #4CAF50;
}

.history-status.pending {
    background: #ffc107;
}

.history-status.expired {
    background: #f44336;
}

.history-details {
    font-size: 12px;
    color: #666;
}

/* USDT支付弹窗样式 */
.usdt-payment-content {
    max-width: 450px;
    width: 95%;
}

.payment-header {
    text-align: center;
    margin-bottom: 20px;
}

.payment-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.countdown {
    display: inline-block;
    padding: 5px 15px;
    background: #ff4444;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.qr-container {
    text-align: center;
    margin: 15px 0;
}

#qrcode {
    display: inline-block;
    padding: 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.countdown-text {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.payment-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.info-label {
    color: #666;
    font-size: 14px;
    min-width: 70px;
    max-width: 80px;
    flex-shrink: 0;
}

.info-value {
    color: #333;
    font-weight: bold;
    word-break: break-all;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
}

.copy-btn {
    display: inline-block;
    padding: 3px 6px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 0;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #5a67d8;
}

/* 地址显示样式 */
.address-display {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    background: #f8f9fa;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    color: #333;
    text-align: left;
    flex: 1;
    margin-right: 8px;
}

.amount-highlight {
    font-size: 20px;
    color: #ff4444;
}

.warning-box {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
}

.warning-box strong {
    display: block;
    margin-bottom: 5px;
}

.status-checking {
    text-align: center;
    padding: 15px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

.success-animation {
    text-align: center;
    padding: 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* 重要提醒弹窗样式 */
.warning-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.warning-popup-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInScale 0.4s ease;
}

.warning-popup-header {
    display: flex;
    justify-content: flex-end;
    padding: 15px 15px 0 15px;
}

.warning-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.warning-popup-close:hover {
    background: #f0f0f0;
    color: #666;
}

.warning-popup-body {
    text-align: center;
    padding: 0 25px 25px 25px;
}

.warning-icon {
    font-size: 50px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.warning-popup-body h3 {
    color: #ff6b35;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.warning-text {
    color: #333;
    line-height: 1.6;
}

.warning-text p {
    margin: 8px 0;
    font-size: 16px;
}

.warning-text p strong {
    color: #ff6b35;
    font-weight: 700;
    font-size: 18px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInScale {
    from {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 移动端适配 */
@media (max-width: 480px) {
    .warning-popup-content {
        width: 95%;
        margin: 0 10px;
    }
    
    .warning-popup-body {
        padding: 0 20px 20px 20px;
    }
    
    .warning-text p {
        font-size: 15px;
    }
    
    .warning-icon {
        font-size: 40px;
    }
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 400px;
    max-width: 90%;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 16px;
}

.btn-text {
    display: inline;
}

.register-link {
    text-align: center;
    margin-top: 20px;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
}

/* 导航栏样式 */
.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 20px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.welcome {
    font-size: 14px;
    color: #333;
}

.balance {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 只显示图标的按钮 */
.btn-icon-only {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.btn-icon-only:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-icon-only:active {
    transform: translateY(0);
}

.btn-icon-only .icon {
    font-size: 20px;
}

.btn-icon-only.btn-logout {
    background: #fff5f5;
    border-color: #f8d7da;
}

.btn-icon-only.btn-logout:hover {
    background: #f8d7da;
}

/* 内容区域 */
.content {
    position: absolute;
    top: 60px; /* 导航栏高度 */
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    padding-bottom: 30px; /* 增加底部内边距 */
    overflow-y: auto;
    box-sizing: border-box;
}

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

.bank-count {
    color: #666;
}

/* 读卡器网格 */
.bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.bank-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.bank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* 卡片头部 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
    position: relative;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sn-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.status-indicator {
    font-size: 14px;
}

.status-indicator.online {
    color: #28a745;
}

.status-indicator.offline {
    color: #dc3545;
}

.status-indicator.partial {
    color: #ffc107;
}

.bank-card h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

/* 设置按钮容器 */
.card-settings {
    display: flex;
    gap: 8px;
    align-items: center;
}

.settings-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.settings-btn:hover {
    background: #e9ecef;
    transform: rotate(90deg);
}

.settings-icon {
    font-size: 16px;
}


/* 卡片内容 */
.card-content {
    margin-top: 15px;
}

.status-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.status-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
    margin-right: 8px;
}

.status-value {
    color: #333;
    flex: 1;
}

.status-icon {
    margin-right: 6px;
    font-size: 14px;
}

.status-text {
    color: #333;
}

.user-online {
    color: #28a745;
    font-weight: 600;
}

.user-offline {
    color: #dc3545;
    font-weight: 600;
}

.service-status {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.service-status.no-service {
    background: #f8f9fa;
    color: #6c757d;
}

.service-status.device-offline {
    background: #f8d7da;
    color: #721c24;
}

.device-details {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
}

.device-details .status-row {
    margin-bottom: 6px;
}

.device-details .status-row:last-child {
    margin-bottom: 0;
}

/* 设备状态栏样式 */
.device-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.operator-info, .network-type, .no-service {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #333;
}

.no-service {
    color: #dc3545;
    font-weight: 600;
}

.signal-info {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 50px;
}

.sim-status {
    display: flex;
    align-items: center;
    min-width: 20px;
    justify-content: center;
}

.network-reg {
    display: flex;
    align-items: center;
    min-width: 20px;
    justify-content: center;
}

.reg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.reg-dot.reg-online {
    background: #28a745;
}

.reg-dot.reg-offline {
    background: #dc3545;
}

.device-current-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #333;
    font-size: 13px;
    padding-top: 8px;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 信号强度图标颜色 */
.bi-reception-4 { color: #4CAF50; } /* 满格 - 绿色 */
.bi-reception-3 { color: #8BC34A; } /* 3格 - 浅绿 */
.bi-reception-2 { color: #FF9800; } /* 2格 - 橙色 */
.bi-reception-1 { color: #FF5722; } /* 1格 - 橙红 */
.bi-reception-0 { color: #f44336; } /* 无信号 - 红色 */

/* SIM卡状态样式 */
.sim-available {
    color: #4CAF50 !important; /* 绿色 - 有卡 */
}

.sim-unavailable {
    color: #f44336 !important; /* 红色 - 无卡 */
}

/* 设备状态栏中的重启按钮 */
.restart-device {
    display: flex;
    align-items: center;
}

.btn-restart-inline {
    background: #dc3545;
    border: none;
    border-radius: 3px;
    color: white;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
}

.btn-restart-inline:hover:not(:disabled) {
    background: #c82333;
    transform: scale(1.05);
}

.btn-restart-inline:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.restart-spin {
    animation: spin 1s linear infinite;
}

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

.bank-card p {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status.online {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.offline {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.device-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
}

.device-status.online {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.device-status.offline {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.device-info {
    border-top: 2px solid #f8f9fa;
    padding-top: 15px;
    margin-top: 15px;
    background: #fafbfc;
    border-radius: 8px;
    padding: 15px;
    margin: 15px -5px 0 -5px;
}


/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 25px;
    border-radius: 15px;
    width: 95%;
    max-width: 400px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close:hover {
    color: #000;
    background: #f0f0f0;
}

.modal h3 {
    margin-bottom: 25px;
    color: #333;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
}

.modal label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

/* 卡池设置弹窗样式 */
.bank-info-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

/* 危险操作区域 */
.danger-zone {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f8f9fa;
}

.danger-zone h4 {
    color: #dc3545;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.danger-zone p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.btn-danger {
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }
    
    .nav-container {
        gap: 10px;
    }
    
    .nav-info {
        flex: 1;
        min-width: 0;
    }
    
    .welcome {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .balance {
        font-size: 15px;
    }
    
    .nav-actions {
        gap: 6px;
    }
    
    .btn-icon-only {
        width: 36px;
        height: 36px;
    }
    
    .btn-icon-only .icon {
        font-size: 18px;
    }
    
    .bank-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bank-card {
        padding: 15px;
    }
    
    .settings-btn,
    .sms-btn {
        width: 28px;
        height: 28px;
    }
    
    .settings-icon,
    .sms-icon,
    .cdr-icon {
        font-size: 14px;
    }
    
    .card-settings {
        gap: 6px;
    }
}

/* 发送短信弹窗样式 */
.char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn-full-width {
    width: 100%;
    padding: 12px 20px;
}

/* 统一发送短信表单输入框宽度 */
#sendSMSModal .form-group input,
#sendSMSModal .form-group textarea {
    width: 100%;
    box-sizing: border-box;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}
    
    .sn-label {
        font-size: 15px;
    }
    
    .status-row {
        font-size: 13px;
    }
    
    .status-label {
        min-width: 70px;
    }
    
    .device-details {
        padding: 8px;
    }
    
    .device-status-bar {
        font-size: 12px;
    }
    
    .status-left {
        gap: 10px;
    }
    
    .status-right {
        gap: 8px;
    }
    
    .signal-info {
        min-width: 40px;
    }
    
    .content {
        padding: 15px;
        padding-bottom: 25px;
    }
    
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .section-header h3 {
        font-size: 18px;
    }
    
    .bank-count {
        font-size: 14px;
    }
    
    .login-box {
        padding: 20px;
        margin: 20px;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 90%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 12px;
    }
    
    .nav-actions {
        gap: 4px;
    }
    
    .btn-icon-only {
        width: 32px;
        height: 32px;
    }
    
    .btn-icon-only .icon {
        font-size: 16px;
    }
    
    .welcome {
        font-size: 12px;
    }
    
    .balance {
        font-size: 14px;
    }
    
    .content {
        padding: 10px;
        padding-bottom: 20px;
    }
    
    .bank-card {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .bank-card h4 {
        font-size: 16px;
    }
    
    .bank-card p {
        font-size: 13px;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        padding: 15px;
    }
    
    .form-group input {
        padding: 15px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .btn-primary {
        padding: 15px;
        font-size: 16px;
    }
}

/* 气泡提示样式 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: white;
    font-size: 14px;
    font-weight: 500;
    max-width: 320px;
    min-width: 200px;
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
    animation: toastSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.toast.toast-out {
    animation: toastSlideOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.toast-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.toast-error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.toast-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.toast-info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}

.toast-icon {
    margin-right: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    margin-left: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* 移动端适配 */
@media (max-width: 480px) {
    .toast-container {
        top: 15px;
        left: 15px;
        right: 15px;
        transform: none;
    }
    
    .toast {
        max-width: none;
        width: 100%;
        border-radius: 20px;
    }
}

/* 页面切换样式 */
.page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f5;
    z-index: 100;
}

.page.active {
    display: block;
}

/* 短信页面样式 */
#smsPage .navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0;
}

#smsPage .nav-container {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

#smsPage .nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

#smsPage .nav-right {
    display: flex;
    align-items: center;
}

.btn-back {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 5px;
}

.btn-send-sms {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: #667eea;
    font-size: 18px;
    transition: all 0.3s;
    border-radius: 5px;
}

.btn-send-sms:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.content-area {
    position: absolute;
    top: 60px; /* 导航栏高度 */
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px;
    padding-bottom: 30px; /* 增加底部内边距 */
    overflow-y: auto;
    box-sizing: border-box;
}

/* 短信列表样式 */
.sms-list {
    padding: 0;
    max-width: 100%;
}

.sms-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.sms-item:last-child {
    margin-bottom: 40px; /* 最后一个项目增加更多底部边距 */
}

.sms-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 短信接收和发送样式区分 */
.sms-received {
    border-left: 3px solid #4CAF50;
}

.sms-sent {
    border-left: 3px solid #2196F3;
}

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

.sms-number {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sms-number i {
    color: #666;
    font-size: 14px;
}

.sms-type-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.sms-received .sms-type-badge {
    background: #e8f5e9;
    color: #4CAF50;
}

.sms-sent .sms-type-badge {
    background: #e3f2fd;
    color: #2196F3;
}

.sms-content {
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
    word-break: break-word;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 5px;
    font-size: 14px;
}

.sms-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.sms-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sms-time i {
    font-size: 12px;
}

.sms-iccid {
    font-family: monospace;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

/* 空状态和加载状态 */
.sms-list .loading,
.sms-list .no-data,
.sms-list .error {
    text-align: center;
    padding: 40px;
    color: #999;
}

.sms-list .no-data {
    font-size: 14px;
}

.sms-list .error {
    color: #f44336;
}

/* 通话记录样式 */
.cdr-list {
    padding: 30px 0 0 0; /* 添加顶部内边距，防止第一条被遮挡 */
    max-width: 100%;
}

.cdr-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.cdr-item:last-child {
    margin-bottom: 40px;
}

.cdr-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 通话状态样式区分 */
.cdr-completed {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.cdr-ongoing {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    animation: pulse 2s infinite;
}

.cdr-failed {
    background: #ffebee;
    border-left: 3px solid #f44336;
}

.cdr-unanswered {
    background: #f5f5f5;
    border-left: 3px solid #999;
}

/* 通话中闪烁效果 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.blink {
    animation: blink 1s infinite;
    color: #ff9800;
    font-weight: bold;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cdr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cdr-status {
    font-size: 18px;
}

.cdr-number {
    flex: 1;
    margin: 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.cdr-number i {
    margin-right: 4px;
    color: #666;
}

.cdr-type-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    background: #ff9800;
    color: white;
}

.cdr-content {
    padding: 8px 0;
}

.cdr-content p {
    margin: 4px 0;
    font-size: 13px;
    color: #666;
}

.cdr-duration {
    color: #333 !important;
    font-weight: 500;
}

.ongoing-duration {
    color: #ff9800;
    font-weight: bold;
}

.cdr-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cdr-time {
    font-size: 12px;
    color: #999;
}

.cdr-time i {
    margin-right: 4px;
}

/* 空状态和加载状态 */
.cdr-list .loading,
.cdr-list .no-data,
.cdr-list .error {
    text-align: center;
    padding: 40px;
    color: #999;
}

.cdr-list .no-data {
    font-size: 14px;
}

.cdr-list .error {
    color: #f44336;
}

/* 短信按钮样式 */
.sms-btn, .cdr-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.sms-btn:hover, .cdr-btn:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.sms-icon, .cdr-icon {
    font-size: 16px;
}

/* 刷新按钮样式 */
.btn-refresh-cdr {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    transition: all 0.3s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-refresh-cdr:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #2196f3;
}

.btn-refresh-cdr:active {
    background: rgba(0, 0, 0, 0.1);
}

/* 旋转动画 */
.rotating {
    animation: rotate 1s linear infinite;
}

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

/* 悬浮添加按钮 */
.fab-add {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fab-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #218838, #1bb584);
}

.fab-add:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.fab-icon {
    font-size: 20px;
    font-weight: bold;
    color: white;
    line-height: 1;
}

/* 只在主页面显示悬浮按钮 */
#smsPage .fab-add {
    display: none;
}

/* 移动端短信列表优化 */
@media (max-width: 768px) {
    .content-area {
        padding: 8px;
    }
    
    .fab-add {
        width: 42px;
        height: 42px;
        bottom: 15px;
        left: 15px;
    }
    
    .fab-icon {
        font-size: 18px;
    }
    
    .sms-item {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .sms-content {
        padding: 6px;
        font-size: 13px;
    }
    
    .sms-header {
        margin-bottom: 8px;
    }
    
    .sms-footer {
        font-size: 11px;
    }
}

/* 聊天系统样式 */
.chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-icon:hover {
    background-color: #5a6fd8;
    transform: scale(1.1);
}

.chat-unread-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4757;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chat-window {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}
.chat-window .chat-content {
    background-color: white;
    border-radius: 15px;
    width: 95%;
    max-width: 400px;
    height: auto;
    min-height: min(500px, 50vh);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    margin: 5vh 0;
}

.chat-header {
    background-color: #667eea;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.chat-controls {
    display: flex;
    gap: 8px;
}

.chat-minimize,
.chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.chat-minimize:hover,
.chat-close:hover {
    background-color: rgba(255,255,255,0.2);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.message-item {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
}

.message-item.user {
    align-self: flex-end;
    background-color: #667eea;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-item.admin {
    align-self: flex-start;
    background-color: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.message-item.admin .message-time {
    text-align: left;
}

.message-sender {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 2px;
    opacity: 0.8;
}

.chat-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.chat-input-group button {
    width: 36px;
    height: 36px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chat-input-group button:hover:not(:disabled) {
    background-color: #5a6fd8;
}

.chat-input-group button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.chat-input-hint {
    font-size: 11px;
    color: #666;
    margin-top: 6px;
    text-align: center;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .chat-window .chat-content {
        width: 90%;
        min-height: min(400px, 40vh);
        max-height: 60vh;
        margin: 10vh 0;
    }
    
    .chat-icon {
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* === 设备绑定服务相关样式 === */

/* 服务区域样式 */
.service-section {
    margin: 15px 0;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: linear-gradient(45deg, #f8f9fa, #ffffff);
}

/* 未开通服务状态 */
.service-status-inactive {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.service-info {
    flex: 1;
}

.service-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.service-desc {
    display: block;
    font-size: 12px;
    color: #6c757d;
}

.btn-activate-service {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.btn-activate-service:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-activate-service:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.activate-icon {
    font-size: 14px;
}

/* 已开通服务状态 */
.service-status-active {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.service-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.service-details {
    flex: 1;
}

.binding-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.device-info {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}

.expire-time {
    font-size: 12px;
    color: #6c757d;
}

.auto-renew {
    font-size: 11px;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    width: fit-content;
}

.manual-renew {
    font-size: 11px;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    width: fit-content;
}

/* 开通服务弹窗样式 */
#activateServiceModal .modal-content {
    max-width: 500px;
    width: 90%;
}

.service-info {
    margin: 20px 0;
}

.service-info h4 {
    color: #343a40;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.price-info {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    border: 2px solid #e1bee7;
}

.price {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(102, 126, 234, 0.1);
}

.price-desc {
    font-size: 13px;
    color: #6c757d;
    margin-top: 8px;
}

.balance-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.balance {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
    margin: 5px 0;
}

.balance-warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    margin-top: 10px;
    font-size: 13px;
}

.recharge-link {
    color: #4A90E2;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.recharge-link:hover {
    color: #357ABD;
    text-decoration: none;
}

.auto-renew-option {
    background: #f0f4ff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1ecff;
    margin-bottom: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

/* 开通服务按钮 - 极简版 */
.activate-service-btn {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.activate-service-btn:hover {
    background: #5568d3;
}

.auto-renew-desc {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
    padding-left: 26px;
}

.service-terms {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.service-terms h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 14px;
}

.service-terms ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-terms li {
    padding: 4px 0;
    font-size: 12px;
    color: #6c757d;
    position: relative;
    padding-left: 16px;
}

.service-terms li::before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 25px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-secondary:hover {
    background: #5a6268;
}

#activateServiceBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 2;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

#activateServiceBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

#activateServiceBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 成功信息样式 */
.success-info {
    text-align: center;
}

.success-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.success-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #495057;
}

.success-details strong {
    color: #343a40;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .service-status-inactive {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .service-info {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .btn-activate-service {
        align-self: center;
        justify-content: center;
    }
    
    .service-status-active {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .binding-info {
        text-align: center;
    }
    
    .auto-renew,
    .manual-renew {
        align-self: center;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .checkbox-group {
        justify-content: center;
    }
    
    .auto-renew-desc {
        padding-left: 0;
        text-align: center;
    }
}

/* 自动续费设置区域 */
.auto-renew-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.setting-item {
    margin-bottom: 10px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.setting-row > label:first-child {
    font-size: 14px;
    color: #666;
    flex: 1;
}

.setting-desc {
    margin: 0;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

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

input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .setting-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}