:root {
    --sidebar-width: 200px; /* 1080p 下更紧凑，主内容区更宽 */
    --navbar-height: 56px;
    --primary-color: #0d6efd;
    --navbar-bg: #1c1c1c;
    --navbar-text: #f2f2f2;
    --sidebar-bg: #2a2a2a;
    --sidebar-hover: #333333;
    --content-bg: #f8f9fa;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--content-bg);
}

.hidden {
    display: none !important;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-header p {
    color: #6c757d;
    font-size: 14px;
}

/* 主界面布局 */
.admin-wrapper {
    min-height: 100vh;
    padding-top: var(--navbar-height);
}

/* 顶部导航栏 */
.navbar {
    background: var(--navbar-bg) !important;
    color: var(--navbar-text);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1030;
}
.navbar .navbar-brand,
.navbar .nav-link,
.navbar .dropdown-toggle,
.navbar .dropdown-item {
    color: var(--navbar-text) !important;
}
.navbar .dropdown-menu {
    background: #2a2a2a;
    border: 1px solid #333;
    color: var(--navbar-text);
    padding: 6px 0;
}
.navbar .dropdown-item {
    color: var(--navbar-text) !important;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: #333333 !important;
    color: #ffffff !important;
}
.navbar .nav-link:hover,
.navbar .dropdown-item:hover {
    color: #ffffff !important;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--navbar-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--sidebar-bg);
    overflow-y: auto;
    z-index: 1020;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    background: #262626;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h5 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.menu-item {
    margin: 4px 8px;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.menu-item a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.menu-item:hover a,
.menu-item.active a {
    background: var(--sidebar-hover);
    color: white;
}

/* 子菜单 */
.menu-item.has-children > a {
    justify-content: flex-start;
}
.submenu {
    list-style: none;
    padding-left: 0;
    margin: 2px 0 8px;
    display: none;
}
.submenu.show {
    display: block;
}
.submenu li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 42px; /* 与主菜单文字左边缘对齐：12px + 20(icon) + 10(mr) */
    border-radius: 6px;
    color: #d7dce1;
}
.submenu li a:hover {
    color: #fff;
}

.submenu-caret {
    margin-left: auto;
}

/* 主内容区 */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: calc(100vh - var(--navbar-height));
}

.content-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.content-header h4 {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.breadcrumb {
    margin: 0;
    background: transparent;
    padding: 0;
}

/* 标签栏 - 已隐藏 */
.tabs-bar-wrapper {
    display: none;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 6px 12px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tabs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
}

.tabs-list {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0;
    scrollbar-width: thin;
}

.tabs-list::-webkit-scrollbar {
    height: 4px;
}

.tabs-list::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 2px;
}

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: #495057;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    max-width: 160px;
}

.tab-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.tab-item.active {
    background: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
    color: #fff;
}

.tab-item .tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-item .tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    opacity: 0.75;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s, background 0.2s;
}

.tab-item .tab-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.15);
}

.tab-item.active .tab-close:hover {
    background: rgba(255,255,255,0.25);
}

.tabs-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tabs-action-btn {
    font-size: 12px;
    padding: 4px 8px;
}

.content-body {
    background: transparent;
}

/* 搜索框 + 清除按钮 */
.search-input-wrap .search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 16px;
    color: #6c757d;
    cursor: pointer;
    border-radius: 50%;
    user-select: none;
}
.search-input-wrap .search-clear:hover {
    color: #212529;
    background: rgba(0,0,0,0.06);
}

.page-content {
    display: none;
}

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

/* 卡片样式 */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
    color: white;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 14px;
}

/* 表格样式 */
.table {
    background: white;
    font-size: 14px;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    text-transform: none;
    font-size: 13px;
    white-space: nowrap;
    padding: 12px 8px;
}

.table tbody td {
    padding: 12px 8px;
    vertical-align: middle;
}

/* 状态开关在表格中的对齐 */
.table tbody td .form-check {
    display: inline-block;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    line-height: 1;
}

/* 账号列表状态列：与 CK 状态、AI 积分等徽章列同一水平高度，垂直居中 */
/* 账号管理-备注列宽度限制 */
.account-remark-cell {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table tbody td.account-status-cell {
    vertical-align: middle !important;
}
.table tbody td.account-status-cell .account-status-switch {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0 !important;       /* 覆盖 Bootstrap .form-check 的 padding-left */
    min-height: 0;
    height: 24px;                /* 与 badge 同高：padding 5px*2 + font ~14px */
    line-height: 24px;
    vertical-align: middle;
}
.table tbody td.account-status-cell .account-status-switch .form-check-input {
    flex-shrink: 0;
    margin-top: 3px !important;   /* 下移，与 CK 状态、AI 积分徽章中心对齐 */
}

.table tbody td .form-check-input {
    margin: 0;
    vertical-align: middle;
    position: relative;
    top: 0;
    display: inline-block;
}

/* 状态开关样式 */
.form-check-input {
    width: 32px !important;
    height: 14px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 7px !important;
    position: relative;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    vertical-align: middle !important;
}

.form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.form-check-input:not(:checked) {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    opacity: 1;
}

/* 状态开关内部圆点始终白色，居中显示 */
.form-check-input::after {
    background-color: #ffffff !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    top: 50% !important;
    left: 2px !important;
    transform: translateY(-50%) !important;
    transition: transform 0.3s ease !important;
}

.form-check-input:checked::after {
    background-color: #ffffff !important;
    transform: translate(18px, -50%) !important;
}

.form-check-input:not(:checked)::after {
    background-color: #ffffff !important;
    transform: translate(0, -50%) !important;
}

/* 表格中的状态开关 */
.table .form-check-input {
    width: 32px !important;
    height: 14px !important;
}

/* 编辑对话框优化 */
#editAccountModal .modal-dialog {
    max-width: 800px;
}

#editAccountModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#editAccountModal .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

#editAccountModal .form-control,
#editAccountModal .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: all 0.2s;
}

#editAccountModal .form-control:focus,
#editAccountModal .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#editAccountModal .form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* 表单分组 */
.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-group-row {
        grid-template-columns: 1fr;
    }
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* 按钮样式 */
.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* 状态标签 */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* 卡密列表气泡样式 */
.secret-list-bubble {
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%);
    z-index: 1000;
    min-width: 200px;
    max-width: 500px;
    pointer-events: auto;
}

.secret-bubble-content {
    background: #495057;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    position: relative;
    word-break: break-all;
    font-size: 13px;
    line-height: 1.6;
    user-select: text;
    cursor: text;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* 气泡左侧小三角（指向右侧） */
.secret-bubble-content::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #495057;
}

.secret-text {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

/* 卡密一行一个、可点击跳转 */
.secret-codes-lines .secret-code-link {
    color: #7dd3fc;
    text-decoration: none;
    cursor: pointer;
    padding: 2px 0;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}
.secret-codes-lines .secret-code-link:hover {
    text-decoration: underline;
    color: #bae6fd;
}

.secret-count-badge-inner {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 8px;
}

/* 右上角提示框 */
.toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    pointer-events: none !important;
    max-width: 320px;
}

.toast {
    min-width: 280px;
    max-width: 320px;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex !important;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    opacity: 0.95 !important;
    backdrop-filter: blur(10px);
    transform: translateX(0) !important;
}

.toast-success {
    background-color: rgba(32, 201, 151, 0.9) !important;
    color: white !important;
    backdrop-filter: blur(10px);
}

.toast-success .toast-icon,
.toast-success .toast-message,
.toast-success .toast-close {
    color: white !important;
}

.toast-danger {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    backdrop-filter: blur(10px);
}

.toast-warning {
    background-color: rgba(255, 193, 7, 0.9);
    color: #212529;
    backdrop-filter: blur(10px);
}

.toast-info {
    background-color: rgba(13, 202, 240, 0.9);
    color: white;
    backdrop-filter: blur(10px);
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    color: inherit;
}

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

.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.fade-out {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* 换号原因表格样式 */
#changeReasonTable {
    margin-bottom: 0;
}

#changeReasonTable tbody tr {
    transition: all 0.2s;
}

#changeReasonTable tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

#changeReasonTable tbody td {
    vertical-align: middle;
    padding: 12px 8px;
}

#changeReasonTable .btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

#changeReasonTable .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

#emptyReasonMessage {
    transition: opacity 0.3s;
}

/* 换号原因输入框样式 */
#newChangeReason {
    border-radius: 6px 0 0 6px;
    transition: all 0.2s;
}

#newChangeReason:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#newChangeReason + .btn {
    border-radius: 0 6px 6px 0;
}

/* 欢迎页面样式 */
.welcome-page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

.welcome-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 60px 40px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    margin-bottom: 30px;
}

.welcome-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.welcome-hero-content .welcome-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin: 0;
}

/* 功能卡片样式 */
.feature-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.feature-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-card-header i {
    font-size: 24px;
}

.feature-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.feature-card-body {
    padding: 30px 25px;
}

.feature-item {
    text-align: left;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.feature-item:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 32px;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.feature-item h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.feature-item p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* 联系方式卡片样式 */
.contact-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.contact-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-card-header i {
    font-size: 24px;
}

.contact-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.contact-card-body {
    padding: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

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

.contact-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-info {
    flex: 1;
}

.contact-info h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.contact-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

/* 套餐价格卡片样式 */
.pricing-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.pricing-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pricing-card-header i {
    font-size: 24px;
}

.pricing-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.pricing-card-body {
    padding: 25px;
}

.pricing-item {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
    background: #f8f9fa;
}

.pricing-item:hover {
    border-color: #0d6efd;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.pricing-item.featured {
    border-color: #0d6efd;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    transform: scale(1.02);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.pricing-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.pricing-price {
    text-align: center;
    margin-bottom: 20px;
}

.pricing-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0d6efd;
}

.pricing-price .period {
    font-size: 1rem;
    color: #6c757d;
    margin-left: 5px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-features li {
    padding: 10px 0;
    color: #495057;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li i {
    color: #28a745;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .welcome-hero {
        padding: 40px 20px;
    }
    
    .welcome-hero-content h1 {
        font-size: 2rem;
    }
    
    .welcome-hero-content .welcome-subtitle {
        font-size: 1rem;
    }
    
    .feature-card-header,
    .contact-card-header,
    .pricing-card-header {
        padding: 15px 20px;
    }
    
    .feature-card-body,
    .contact-card-body,
    .pricing-card-body {
        padding: 20px;
    }
    
    .pricing-item.featured {
        transform: scale(1);
    }
}

/* 系统更新日志弹窗样式 */
.update-log-item {
    transition: background-color 0.2s;
}

.update-log-item:hover {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    margin-left: -10px;
    margin-right: -10px;
}

.update-log-item ul {
    color: #666;
    line-height: 1.8;
}

.update-log-item li {
    margin-bottom: 5px;
}

#updateLogModal .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#updateLogModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

#updateLogModal .badge {
    font-size: 0.85rem;
    padding: 0.4em 0.6em;
}

/* 激活历史日历样式（紧凑） */
.activation-calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}
.activation-day-week-header {
    text-align: center;
    font-size: 11px;
    color: #6c757d;
    font-weight: 600;
}
.activation-calendar-wrap {
    margin-top: 8px;
}
.activation-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 4px;
}

.activation-day {
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 4px 2px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.15s;
    min-height: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.activation-day:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.activation-day-today {
    border: 2px solid #0d6efd !important;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.3);
}

.activation-day-date {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.activation-day-week {
    font-size: 10px;
    opacity: 0.75;
    line-height: 1.1;
}

.activation-day-count {
    font-size: 11px;
    font-weight: 600;
    margin-top: 1px;
}

.activation-legend {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.legend-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 1px solid #dee2e6;
}

/* 设备卡操作区：排除、删除按钮始终可见，避免添加排除后删除按钮被裁切 */
.device-card-actions {
    min-width: 0;
    overflow: visible;
}

/* 账号管理表格：排序时表头不换行，避免点击总使用数等排序时页面变形 */
#accountPage .table-responsive .table .account-sortable {
    white-space: nowrap;
}
