* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 登录页面 */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container h1 {
    color: white;
    margin-bottom: 30px;
    font-size: 36px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

/* 导航栏 */
.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* WebSocket 状态指示器 */
.ws-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: help;
}

.ws-status svg {
    flex-shrink: 0;
}

.ws-status.ws-connected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ws-status.ws-connected svg circle {
    fill: #28a745;
    stroke: #28a745;
    animation: pulse 2s infinite;
}

.ws-status.ws-disconnected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ws-status.ws-disconnected svg circle {
    fill: #dc3545;
    stroke: #dc3545;
}

.ws-status.ws-error {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.ws-status.ws-error svg circle {
    fill: #ffc107;
    stroke: #ffc107;
    animation: blink 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.3;
    }
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 标题区域 */
.header-section {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header-section h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    opacity: 0.9;
}

/* 邮箱显示区域 */
.mailbox-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mailbox-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mailbox-display input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    background: #f5f5f5;
}

.mailbox-info {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.domain-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.domain-selector label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

.domain-select {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.domain-select:hover {
    border-color: #667eea;
}

.domain-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mailbox-quota {
    padding: 10px 15px;
    background: #f0f2ff;
    border-left: 4px solid #667eea;
    border-radius: 5px;
    white-space: nowrap;
}

/* 自定义邮箱表单 */
.custom-mailbox-form {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9ff;
    border: 2px dashed #667eea;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.custom-input-group input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.3s;
}

.custom-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-input-group input::placeholder {
    color: #999;
}

.input-separator {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.domain-display {
    padding: 12px 15px;
    background: #e8ecff;
    border: 2px solid #667eea;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    color: #667eea;
    white-space: nowrap;
}

.custom-mailbox-hint {
    margin-top: 12px;
    padding: 10px 15px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 5px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}

.custom-mailbox-hint svg {
    flex-shrink: 0;
    margin-top: 2px;
    stroke: #ffc107;
}

/* 切换按钮激活状态 */
#toggleCustomBtn.active {
    background: #5568d3;
    transform: scale(0.98);
}

.quota-info {
    color: #555;
    font-size: 14px;
}

.quota-info strong {
    color: #667eea;
    font-size: 18px;
    margin: 0 5px;
}

.quota-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.quota-warning strong {
    color: #ff6b6b;
}

.quota-full {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.quota-full strong {
    color: #dc3545;
}

/* 邮箱列表区域 */
.mailbox-list-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-top: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mailbox-list-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.mailbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.mailbox-item {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.mailbox-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.mailbox-item.active {
    border-color: #667eea;
    background: #f0f2ff;
}

.mailbox-item .email {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.mailbox-item .actions {
    display: flex;
    gap: 5px;
}

/* 收件箱区域 */
.inbox-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.inbox-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
}

/* 邮件列表 */
.email-list {
    min-height: 300px;
}

.email-item {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
}

.email-item:hover {
    background: #f8f9ff;
}

.email-item.unread {
    background: #f0f2ff;
    font-weight: 500;
}

.email-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.email-from {
    font-weight: 500;
    color: #333;
}

.email-time {
    color: #999;
    font-size: 14px;
}

.email-subject {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.email-preview {
    color: #999;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 18px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-secondary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* 操作按钮样式（带图标） */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    font-weight: 500;
}

.btn-action:last-child {
    margin-right: 0;
}

.btn-action svg {
    flex-shrink: 0;
}

.btn-icon {
    background: #f5f5f5;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #e0e0e0;
}

/* 管理员面板 */
.admin-tabs {
    background: white;
    padding: 20px 30px 0;
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f8f9ff;
}

.tab-btn.active {
    border-bottom-color: #667eea;
    color: #667eea;
    font-weight: 500;
}

.tab-content {
    background: white;
    padding: 30px;
}

.section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #333;
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tr:hover {
    background: #f8f9ff;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* 模态框 */
.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: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-large {
    max-width: 800px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.error-message {
    color: #dc3545;
    margin-top: 10px;
    font-size: 14px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: #28a745;
}

.toast-error {
    background: #dc3545;
}

.toast-info {
    background: #17a2b8;
}

.toast-warning {
    background: #ffc107;
    color: #333;
}

/* 响应式 */
@media (max-width: 768px) {
    .header-section h1 {
        font-size: 32px;
    }

    .mailbox-display {
        flex-direction: column;
    }

    .mailbox-display input,
    .mailbox-display button {
        width: 100%;
    }

    .mailbox-info {
        flex-direction: column;
        gap: 10px;
    }

    .domain-selector {
        width: 100%;
    }

    .domain-select {
        width: 100%;
    }
    
    .mailbox-quota {
        width: 100%;
        text-align: center;
    }
    
    /* 自定义邮箱表单响应式 */
    .custom-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-input-group input {
        min-width: 100%;
        width: 100%;
    }
    
    .input-separator {
        display: none;
    }
    
    .domain-display {
        width: 100%;
        text-align: center;
    }
    
    .custom-input-group button {
        width: 100%;
    }

    .mailbox-list {
        grid-template-columns: 1fr;
    }

    .admin-tabs {
        overflow-x: auto;
    }
    
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}

/* ========================================
   系统配置现代化样式
   ======================================== */

/* 配置头部 */
.config-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.config-header-left h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.config-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.config-header-actions {
    display: flex;
    gap: 10px;
}

.btn-icon-text {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-icon-text svg {
    width: 16px;
    height: 16px;
}

.btn-icon-text:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 搜索栏 */
.config-search-bar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.config-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
}

.stat-badge strong {
    color: #333;
    margin-left: 4px;
}

.stat-badge.stat-system {
    background: #e3f2fd;
    color: #1976d2;
}

.stat-badge.stat-system strong {
    color: #1565c0;
}

.stat-badge.stat-custom {
    background: #f3e5f5;
    color: #7b1fa2;
}

.stat-badge.stat-custom strong {
    color: #6a1b9a;
}

/* 配置列表 */
.modern-config-list {
    display: grid;
    gap: 16px;
}

.modern-config-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border-left: 4px solid #667eea;
}

.modern-config-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.modern-config-item.system-config {
    border-left-color: #1976d2;
    background: linear-gradient(to right, #f8faff 0%, #ffffff 100%);
}

.modern-config-item.custom-config {
    border-left-color: #7b1fa2;
}

.config-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.config-key-wrapper {
    flex: 1;
}

.config-key {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.config-description {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 4px;
}

.config-type-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-type-badge.type-string {
    background: #e3f2fd;
    color: #1976d2;
}

.config-type-badge.type-int {
    background: #fff3e0;
    color: #f57c00;
}

.config-type-badge.type-bool {
    background: #e8f5e9;
    color: #388e3c;
}

.config-type-badge.type-json {
    background: #f3e5f5;
    color: #7b1fa2;
}

.config-item-body {
    margin: 12px 0;
}

.config-value-display {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: #495057;
    word-break: break-all;
    line-height: 1.6;
}

.config-value-long {
    max-height: 100px;
    overflow-y: auto;
}

.config-item-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.btn-config-edit,
.btn-config-delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-config-edit {
    background: #667eea;
    color: white;
}

.btn-config-edit:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.btn-config-delete {
    background: #dc3545;
    color: white;
}

.btn-config-delete:hover {
    background: #c82333;
    transform: scale(1.05);
}

.empty-config-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.empty-config-state svg {
    width: 80px;
    height: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-config-state h3 {
    color: #666;
    margin-bottom: 10px;
}

.empty-config-state p {
    color: #999;
}

/* 配置编辑模态框 */
.config-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.config-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideDown 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.config-modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.config-modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.config-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.config-modal-body {
    padding: 25px;
}

.config-form-group {
    margin-bottom: 20px;
}

.config-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.config-form-group label .required {
    color: #dc3545;
    margin-left: 2px;
}

.config-form-group input,
.config-form-group textarea,
.config-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.config-form-group textarea {
    font-family: 'Consolas', 'Monaco', monospace;
    min-height: 100px;
    resize: vertical;
}

.config-form-group input:focus,
.config-form-group textarea:focus,
.config-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.config-form-group .helper-text {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
}

.config-form-group .readonly-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

.config-modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-modal-cancel,
.btn-modal-save {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-cancel {
    background: #6c757d;
    color: white;
}

.btn-modal-cancel:hover {
    background: #5a6268;
}

.btn-modal-save {
    background: #667eea;
    color: white;
}

.btn-modal-save:hover {
    background: #5568d3;
}

.btn-modal-save:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Alert样式 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.alert-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1976d2;
}

.alert-warning {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    color: #f57c00;
}

.alert ul {
    list-style: disc;
}

.btn-success {
    background: linear-gradient(135deg, #5ee7df 0%, #66bb6a 100%);
    color: white;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .config-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .config-header-left h2 {
        font-size: 24px;
    }

    .config-header-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-icon-text {
        width: 100%;
        justify-content: center;
    }

    .config-modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .config-item-footer {
        flex-direction: column;
    }

    .btn-config-edit,
    .btn-config-delete {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   证书管理页面样式
   ======================================== */

/* 证书头部（复用配置页面样式） */
.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.3);
}

.cert-header-left h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.cert-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.cert-header-actions {
    display: flex;
    gap: 10px;
}

/* 证书统计卡片 */
.cert-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.stat-card.stat-total .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card.stat-active .stat-icon {
    background: linear-gradient(135deg, #5ee7df 0%, #b490ca 100%);
    color: white;
}

.stat-card.stat-expiring .stat-icon {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #f57c00;
}

.stat-card.stat-expired .stat-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

/* 证书列表 */
.cert-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cert-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #667eea;
}

.cert-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.cert-item.status-active {
    border-left-color: #5ee7df;
}

.cert-item.status-expiring {
    border-left-color: #fcb69f;
    background: linear-gradient(to right, #fff8f0 0%, #ffffff 100%);
}

.cert-item.status-expired {
    border-left-color: #ff6b6b;
    background: linear-gradient(to right, #fff5f5 0%, #ffffff 100%);
}

.cert-item.status-error {
    border-left-color: #dc3545;
    background: linear-gradient(to right, #fff5f5 0%, #ffffff 100%);
}

.cert-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cert-domain-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cert-domain {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Consolas', 'Monaco', monospace;
}

.cert-status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cert-status-badge.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.cert-status-badge.status-expiring {
    background: #fff3e0;
    color: #f57c00;
}

.cert-status-badge.status-expired {
    background: #ffebee;
    color: #c62828;
}

.cert-status-badge.status-error {
    background: #ffebee;
    color: #c62828;
}

.cert-status-badge.status-pending {
    background: #e3f2fd;
    color: #1976d2;
}

.cert-actions {
    display: flex;
    gap: 8px;
}

.btn-cert-renew,
.btn-cert-edit,
.btn-cert-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cert-renew {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-cert-renew:hover {
    background: #1976d2;
    color: white;
    transform: scale(1.1);
}

.btn-cert-edit {
    background: #f3e5f5;
    color: #7b1fa2;
}

.btn-cert-edit:hover {
    background: #7b1fa2;
    color: white;
    transform: scale(1.1);
}

.btn-cert-delete {
    background: #ffebee;
    color: #c62828;
}

.btn-cert-delete:hover {
    background: #c62828;
    color: white;
    transform: scale(1.1);
}

.cert-item-body {
    margin-top: 15px;
}

.cert-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.cert-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cert-info-item.expiring {
    color: #f57c00;
    font-weight: 600;
}

.cert-info-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.cert-path {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #666;
    word-break: break-all;
}

.cert-renew-info,
.cert-error-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
}

.cert-renew-info {
    background: #f0f4ff;
    color: #1976d2;
}

.cert-error-info {
    background: #fff5f5;
    color: #c62828;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .cert-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .cert-header-left h2 {
        font-size: 24px;
    }

    .cert-header-actions {
        width: 100%;
        flex-direction: column;
    }

    .cert-stats-grid {
        grid-template-columns: 1fr;
    }

    .cert-info-grid {
        grid-template-columns: 1fr;
    }

    .cert-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cert-domain-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cert-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ========================================
   Nginx域名管理页面样式
   ======================================== */

/* Nginx头部（复用证书页面样式） */
.nginx-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.3);
}

.nginx-header-left h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.nginx-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.nginx-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Nginx域名列表 */
.nginx-domain-list {
    display: grid;
    gap: 20px;
}

.nginx-domain-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nginx-domain-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.domain-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #333;
}

.domain-name svg {
    color: #667eea;
    flex-shrink: 0;
}

.domain-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-enabled {
    background: #e7f5e7;
    color: #388e3c;
}

.status-disabled {
    background: #ffebee;
    color: #d32f2f;
}

.badge-ssl {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.domain-info {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.info-label {
    color: #666;
    min-width: 80px;
    font-weight: 500;
}

.info-value {
    color: #333;
    word-break: break-all;
}

.domain-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state svg {
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 20px;
}

.empty-state p {
    margin: 0;
    color: #999;
    font-size: 14px;
}

/* 表单行布局 */
.config-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 警告按钮样式 */
.btn-warning {
    background: linear-gradient(135deg, #ffb74d 0%, #ff9800 100%);
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .nginx-header {
        flex-direction: column;
        gap: 20px;
    }

    .nginx-header-actions {
        width: 100%;
    }

    .nginx-header-actions button {
        flex: 1;
        min-width: 0;
    }

    .config-form-row {
        grid-template-columns: 1fr;
    }

    .domain-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .domain-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ========================================
   定时任务页面样式优化
   ======================================== */

/* 页面标题区域 */
.task-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.task-page-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

.task-page-title svg {
    stroke-width: 2.5;
}

.task-page-title h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.task-subtitle {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-modern:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 任务统计网格 */
.task-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.task-stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.task-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.task-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-stat-icon svg {
    stroke: white;
    stroke-width: 2;
}

.task-stat-content {
    flex: 1;
}

.task-stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.task-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.task-stat-details {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.task-stat-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.task-stat-detail-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.task-stat-detail-item.success .dot {
    background: #4caf50;
}

.task-stat-detail-item.success {
    color: #4caf50;
}

.task-stat-detail-item.failed .dot {
    background: #f44336;
}

.task-stat-detail-item.failed {
    color: #f44336;
}

.task-stat-progress {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.task-stat-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.task-stat-rate {
    font-size: 12px;
    color: #666;
}

.task-stats-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    color: #999;
}

.task-stats-empty p {
    margin: 15px 0 0 0;
    font-size: 16px;
}

/* 快速操作卡片 */
.task-quick-actions-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.task-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.task-card-header svg {
    stroke: #667eea;
    stroke-width: 2;
}

.task-card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.task-card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.task-action-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.task-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.task-action-btn.email-cleanup:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: transparent;
}

.task-action-btn.email-cleanup:hover .task-action-icon,
.task-action-btn.email-cleanup:hover .task-action-content {
    color: white;
}

.task-action-btn.email-cleanup:hover .task-action-icon {
    background: rgba(255, 255, 255, 0.2);
}

.task-action-btn.cert-renewal:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.task-action-btn.cert-renewal:hover .task-action-icon,
.task-action-btn.cert-renewal:hover .task-action-content {
    color: white;
}

.task-action-btn.cert-renewal:hover .task-action-icon {
    background: rgba(255, 255, 255, 0.2);
}

.task-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.task-action-icon svg {
    stroke: #667eea;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.task-action-content {
    flex: 1;
    transition: all 0.3s ease;
}

.task-action-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.task-action-desc {
    font-size: 13px;
    color: #999;
}

/* 任务历史卡片 */
.task-history-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.task-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.task-filter svg {
    stroke: #666;
    stroke-width: 2;
}

.task-filter-select {
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    outline: none;
}

.task-filter-select:focus {
    outline: none;
}

/* 任务历史网格 */
.task-history-grid {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.task-history-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.task-history-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateX(3px);
}

.task-history-item.success {
    border-left: 4px solid #4caf50;
}

.task-history-item.failed {
    border-left: 4px solid #f44336;
}

.task-history-item.running {
    border-left: 4px solid #2196f3;
}

.task-history-item.pending {
    border-left: 4px solid #ff9800;
}

.task-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.task-history-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.task-history-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-history-type-icon svg {
    stroke: #667eea;
    stroke-width: 2;
}

.task-history-info {
    flex: 1;
}

.task-history-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.task-history-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #999;
}

.task-history-time svg {
    stroke: currentColor;
    stroke-width: 2;
}

.task-history-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.task-history-status svg {
    stroke-width: 2.5;
}

.task-history-status.success {
    background: #e8f5e9;
    color: #4caf50;
}

.task-history-status.success svg {
    stroke: #4caf50;
}

.task-history-status.failed {
    background: #ffebee;
    color: #f44336;
}

.task-history-status.failed svg {
    stroke: #f44336;
}

.task-history-status.running {
    background: #e3f2fd;
    color: #2196f3;
}

.task-history-status.running svg {
    stroke: #2196f3;
    animation: spin 2s linear infinite;
}

.task-history-status.pending {
    background: #fff3e0;
    color: #ff9800;
}

.task-history-status.pending svg {
    stroke: #ff9800;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.task-history-result {
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    border-left: 3px solid #e0e0e0;
}

.task-history-footer {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.task-history-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #999;
}

.task-history-meta svg {
    stroke: currentColor;
    stroke-width: 2;
}

.task-history-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.task-history-empty p {
    margin: 20px 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    color: #666;
}

.task-history-empty span {
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .task-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .task-page-title {
        gap: 15px;
    }

    .task-page-title svg {
        width: 24px;
        height: 24px;
    }

    .task-page-title h2 {
        font-size: 22px;
    }

    .task-stats-grid {
        grid-template-columns: 1fr;
    }

    .task-action-buttons {
        grid-template-columns: 1fr;
    }

    .task-history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .task-history-status {
        align-self: flex-start;
    }

    .task-history-footer {
        flex-direction: column;
        gap: 8px;
    }
}


/* ========================================
   Catch-all邮箱邮件操作按钮样式
   ======================================== */

/* 邮件操作按钮基础样式 */
.email-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 4px;
}

.email-btn svg {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* 查看按钮 */
.email-btn-view {
    background: #667eea;
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.email-btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    background: #5568d3;
}

.email-btn-view:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.email-btn-view svg {
    stroke: white;
}

/* 删除按钮 */
.email-btn-delete {
    background: #f5576c;
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.email-btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    background: #e4465b;
}

.email-btn-delete:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.email-btn-delete svg {
    stroke: white;
}

/* 按钮禁用状�?*/
.email-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 响应式调�?*/
@media (max-width: 768px) {
    .email-btn {
        padding: 6px 10px;
        font-size: 12px;
        gap: 4px;
    }
    
    .email-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* ========================================
   Catch-all标题行布局样式
   ======================================== */

.catchall-title-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.catchall-title-row h2 {
    margin: 0;
}

.catchall-title-row .btn {
    flex-shrink: 0;
}

/* 响应式调�?*/
@media (max-width: 768px) {
    .catchall-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .catchall-title-row .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================== */
/* 刷新按钮动画效果 */
/* ========================================== */

/* 刷新按钮在刷新状态下的样式 */
#refreshBtn.refreshing {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

#refreshBtn.refreshing svg {
    animation: spin 1s linear infinite;
}

/* 刷新按钮禁用状态 */
#refreshBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 刷新按钮hover效果增强 */
#refreshBtn:not(:disabled):hover {
    transform: scale(1.05);
    transition: all 0.2s ease;
}

#refreshBtn:not(:disabled):active {
    transform: scale(0.98);
}

/* 刷新按钮的平滑过渡 */
#refreshBtn {
    transition: all 0.2s ease;
}

#refreshBtn svg {
    transition: transform 0.2s ease;
}

/* 刷新成功时的闪烁效果（可选） */
@keyframes refreshSuccess {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#refreshBtn.success {
    animation: refreshSuccess 0.3s ease;
}
