/* ===== 高级简约风格 - 主样式 ===== */

/* 全局重置与字体 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* 主容器：简洁卡片 */
.container-lg {
    max-width: 1200px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    padding: 2.5rem 2rem;
}

/* 标题区 */
h2 {
    font-weight: 600;
    font-size: 2rem;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* 通知横幅 */
#notice {
    background: #fef9c3;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    color: #854d0e;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    border-left: 4px solid #eab308;
}

/* 按钮组容器 */
.button-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

/* 基础按钮样式 - 扁平化设计 */
.btn {
    border: none;
    border-radius: 3rem;
    padding: 0.75rem 1.8rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* 各颜色按钮 */
.btn-warning {
    background: #fbbf24;
    color: #1e293b;
}
.btn-warning:hover {
    background: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -6px rgba(245, 158, 11, 0.3);
}

.btn-info {
    background: #38bdf8;
    color: #ffffff;
}
.btn-info:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -6px rgba(2, 132, 199, 0.3);
}

.btn-success {
    background: #ff2e2e;
    color: #ffffff;
}
.btn-success:hover {
    background: #e80000;
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -6px rgba(5, 150, 105, 0.3);
}

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
}
.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -6px rgba(37, 99, 235, 0.3);
}

/* 搜索输入组 */
.input-group {
    display: flex;
    align-items: stretch;
    border-radius: 3rem;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
    margin-bottom: 1.5rem;
}
.input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.input-group .form-control {
    flex: 1;
    border: none;
    padding: 0.9rem 1.5rem;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

.input-group .btn {
    border-radius: 0;
    padding: 0.9rem 2rem;
    margin: 0;
    background: #3b82f6;
    color: white;
    font-weight: 500;
    box-shadow: none;
}
.input-group .btn:hover {
    background: #2563eb;
    transform: none;
}

/* 邮件数量设置 */
.input-group.mb-2 {
    width: auto;
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 3rem;
    border: 1px solid #e2e8f0;
    margin: 0 auto 1.5rem;
}
.input-group.mb-2 .input-group-text {
    background: transparent;
    border: none;
    color: #475569;
    font-weight: 500;
    padding: 0.7rem 1rem;
}
.input-group.mb-2 .form-control {
    width: 70px;
    text-align: center;
    border: none;
    background: transparent;
    border-radius: 0;
}

/* 表格 - 极简风格 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.table thead tr {
    border-bottom: 2px solid #e2e8f0;
}
.table th {
    text-align: left;
    padding: 1rem 0.5rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}
.table td {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.table tbody tr:last-child td {
    border-bottom: none;
}

/* 表格内按钮组 */
.table .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.table .btn-group .btn {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    border-radius: 2rem;
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid transparent;
    box-shadow: none;
}
.table .btn-group .btn:hover {
    background: #e2e8f0;
}
/* 特定颜色悬停时保留语义 */
.table .btn-outline-success:hover { background: #10b981; color: white; }
.table .btn-outline-primary:hover { background: #3b82f6; color: white; }
.table .btn-outline-info:hover { background: #38bdf8; color: white; }
.table .btn-outline-warning:hover { background: #f59e0b; color: white; }
.table .btn-outline-danger:hover { background: #ef4444; color: white; }

/* 信息提示 */
#information {
    text-align: center;
    color: #64748b;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 2rem;
    margin: 1rem 0;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin: 2rem 0 0;
    list-style: none;
}
.page-item .page-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    cursor: pointer;
}
.page-item.active .page-link {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}
.page-item .page-link:hover {
    background: #f1f5f9;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 1rem;
}
.loading-overlay h3 {
    color: #1e293b;
    font-weight: 400;
    font-size: 1.2rem;
}

/* 模态框 */
.modal-content {
    border-radius: 1.5rem;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #ffffff;
}
.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem 2rem;
}
.modal-title {
    font-weight: 600;
    color: #0f172a;
}
.modal-body {
    padding: 1.5rem 2rem;
}
.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 2rem 1.5rem;
}

/* 列表组（邮件列表） */
.list-group {
    list-style: none;
}
.list-group-item {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 1rem !important;
    padding: 1.2rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: background 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.list-group-item:hover {
    background: #f8fafc;
    box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.05);
}

/* offcanvas 全屏邮件正文 */
.offcanvas-top {
    border-radius: 0 0 2rem 2rem;
    background: #ffffff;
    border: none;
    box-shadow: 0 -20px 40px -15px rgba(0, 0, 0, 0.15);
}
.offcanvas-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem 2rem;
}
.offcanvas-body {
    padding: 2rem;
}
/* 轻微跳动动画 */
@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.bounce {
    animation: gentle-bounce 1s ease-in-out infinite;
}
.button-container .btn {
    white-space: nowrap;
    font-size: 1.2rem; /* 根据实际需要调整 */
}
@media (max-width: 576px) {
    .button-container {
        flex-wrap: wrap;
    }
    .button-container .btn {
        flex: 0 0 100% !important;
        margin-bottom: 8px;
    }
}
/* 邮箱列表表格中所有操作按钮悬停时文字变为红色 */
#mailboxListTbody .btn-group .btn:hover {
    color: #dc3545 !important;  /* Bootstrap 危险红色 */
    background-color: transparent; /* 保持背景透明（可选） */
    border-color: currentColor;    /* 边框颜色跟随文字（可选） */
}

#loadingShow {
    color: #dc3545 !important; /* Bootstrap 危险红色，加 !important 确保覆盖 */
}