/*
 * @FilePath: /ACard_python/Acard_system/app/static/css/style.css
 */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
    --sidebar-bg: #001529;
    --primary-blue: #1890ff;
    --success-green: #52c41a;
    --dark-btn: #141414;
    --bg-light: #f5f7f9;
    --border-color: #f0f0f0;
}

body {
    background-color: var(--bg-light);
    font-size: 14px;
    font-family: -apple-system, sans-serif;
}

/* 布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar .logo {
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.menu-group {
    padding: 15px 20px 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: 0.3s;
}

.menu-item i {
    width: 20px;
    margin-right: 10px;
}

.menu-item:hover,
.menu-item.active {
    color: #fff;
    background: var(--primary-blue);
}

.user-info-bar {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-header {
    height: 50px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.btn-logout {
    border: 1px solid #d9d9d9;
    background: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

/* 组件样式 */
.filter-card {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 16px;
    border: none !important;
}

.filter-label {
    min-width: 80px;
    font-size: 13px;
    color: #595959;
    font-weight: 500;
}

.btn-black {
    background-color: var(--dark-btn) !important;
    color: #fff !important;
}

.btn-green {
    background-color: var(--success-green) !important;
    color: #fff !important;
}

/* 表格与标签 */
.table-card {
    background: #fff;
    border-radius: 4px;
    border: none !important;
}

.table thead th {
    background: #fafafa;
    color: #8c8c8c;
    font-weight: 500;
    font-size: 13px;
}

.badge-active {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-locked {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #ff4d4f;
    padding: 2px 8px;
    border-radius: 4px;
}

.action-link {
    text-decoration: none !important;
    cursor: pointer;
    font-size: 13px;
    margin-right: 10px;
}

/* 确保 admin-container 是 flex 布局 */
.admin-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏固定宽度 */
.sidebar {
    width: 240px;
    background-color: #001529;
    /* 截图中的深色风格 */
    color: rgba(255, 255, 255, 0.7);
    z-index: 1000;
}

/* 主内容区自动填充剩余空间并允许内部滚动 */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: #f5f7f9;
}

/* 顶部 Header */
.top-header {
    height: 56px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

/* 添加到 style.css 末尾 */

/* 针对账号管理界面的特定优化 */
.btn-success-custom {
    background-color: #72c140;
    /* 匹配截图中的草绿色 */
    border-color: #72c140;
    color: white;
}

.btn-success-custom:hover {
    background-color: #61a636;
    color: white;
}

.table thead th {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: none;
    background-color: #fcfcfc;
}

.table tbody td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 0.9rem;
}

/* 分页样式微调 */
.pagination .page-link {
    color: #333;
    border: 1px solid #eee;
    margin: 0 3px;
    border-radius: 4px;
}

.pagination .page-item.active .page-link {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
}

/* 模态框阴影 */
.modal-content {
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid #f8f9fa;
    padding: 1.5rem 1.5rem 1rem;
}

/* 分页样式美化 */
.pagination .page-link {
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 0.4rem 0.8rem;
    transition: all 0.2s;
}

.pagination .page-item.active .page-link {
    background-color: #001529;
    /* 匹配侧边栏颜色 */
    border-color: #001529;
    color: white;
}

.pagination .page-item.disabled .page-link {
    background-color: #f8f9fa;
    color: #ced4da;
}

.pagination .page-link:hover:not(.active) {
    background-color: #e9ecef;
}

/* 强化导出按钮：蓝色调 */
.btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.2);
}

/* 强化导入按钮：橙色调，提醒这是写入操作 */
.btn-outline-warning {
    border-color: #ff9800;
    color: #ed6c02;
}

.btn-outline-warning:hover {
    background-color: #ff9800;
    border-color: #ff9800;
    color: white;
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.2);
}

/* 让图标稍微大一点点 */
.btn i {
    font-size: 0.9rem;
}

/* 基于设计稿的微调 */
:root {
    --bs-success-light: #e6f7ed;
    --bs-secondary-light: #f8f9fa;
}

body {
    background-color: #f4f7f9;
    color: #333;
}

/* -------------------------------------------------------------------------- */
/* UI Refresh v2: 全局视觉升级（不改业务结构） */
/* -------------------------------------------------------------------------- */

:root {
    --ui-bg: #f3f6fb;
    --ui-surface: #ffffff;
    --ui-text: #1f2937;
    --ui-muted: #6b7280;
    --ui-primary: #0f5fd7;
    --ui-primary-soft: #e7f0ff;
    --ui-border: #e7ecf3;
    --ui-shadow: 0 10px 30px rgba(10, 33, 68, 0.08);
    --ui-radius-lg: 14px;
    --ui-radius-md: 10px;
}

html,
body {
    height: 100%;
}

body {
    font-family: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ui-text);
    background:
        radial-gradient(circle at 8% 8%, rgba(15, 95, 215, 0.08), transparent 35%),
        radial-gradient(circle at 96% 4%, rgba(16, 185, 129, 0.08), transparent 30%),
        var(--ui-bg);
    letter-spacing: 0.1px;
}

.sidebar {
    background: linear-gradient(180deg, #082442 0%, #061b34 55%, #04152a 100%);
    box-shadow: 8px 0 22px rgba(4, 21, 42, 0.22);
}

.sidebar .logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.menu-group {
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-size: 11px;
}

.menu-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.menu-item:hover,
.menu-item.active {
    border-left-color: #78b6ff;
    background: linear-gradient(90deg, rgba(15, 95, 215, 0.9), rgba(25, 115, 230, 0.72));
}

.top-header {
    height: 62px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--ui-border);
    box-shadow: 0 4px 20px rgba(12, 35, 64, 0.06);
}

.page-body {
    animation: pageFadeIn 0.32s ease;
}

.filter-card,
.table-card,
.card,
.modal-content {
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow);
}

.filter-card,
.table-card {
    background: var(--ui-surface);
}

.table-card {
    overflow: hidden;
}

.filter-label {
    color: var(--ui-muted);
    font-weight: 600;
}

.form-control,
.form-select,
.input-group-text {
    border-color: #dbe4ef;
    border-radius: var(--ui-radius-md);
}

.form-control:focus,
.form-select:focus {
    border-color: #8eb8ff;
    box-shadow: 0 0 0 0.2rem rgba(15, 95, 215, 0.15);
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.btn-primary,
.btn-outline-primary:hover,
.btn-black {
    background: linear-gradient(135deg, #0f5fd7, #1f76ec);
    border-color: #0f5fd7;
    color: #fff;
}

.btn-success-custom,
.btn-green {
    background: linear-gradient(135deg, #0da271, #10b981);
    border-color: #0da271;
    color: #fff;
}

.btn-outline-primary,
.btn-outline-warning,
.btn-outline-secondary,
.btn-light.border {
    background-color: #fff;
    box-shadow: 0 2px 0 rgba(15, 23, 42, 0.02);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f6f9fe;
    color: #5f6f84;
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid var(--ui-border);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.table tbody tr {
    transition: background-color 0.18s ease;
}

.table-hover tbody tr:hover {
    background-color: #f7fbff;
}

.table tbody td {
    border-color: #edf2f8;
    vertical-align: middle;
}

.badge-active,
.badge-locked {
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
}

.pagination .page-link {
    min-width: 34px;
    text-align: center;
    border-radius: 8px;
    border-color: #e2e8f0;
    color: #334155;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0f5fd7, #1f76ec);
    border-color: #0f5fd7;
}

.modal-header {
    background: linear-gradient(180deg, #fafcff 0%, #f4f8ff 100%);
    border-bottom: 1px solid #edf3fb;
}

.modal-footer {
    border-top: 1px solid #edf3fb;
}

.sidebar-overlay {
    background: rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(1px);
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .top-header {
        height: 56px;
    }

    .page-body {
        padding: 14px !important;
    }

    .filter-card,
    .table-card,
    .card {
        border-radius: 12px;
    }

    .table-responsive {
        border-radius: 10px;
    }
}

@media (max-width: 575.98px) {
    .filter-card,
    .table-card {
        padding: 14px !important;
    }

    .top-tools .btn {
        padding: 0.25rem 0.45rem;
    }

    .table thead th,
    .table tbody td {
        font-size: 12px;
    }
}

/* 表格样式优化 */
.table thead th {
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: none;
}

.table tbody td {
    font-size: 0.9rem;
    padding: 1rem 0.5rem;
}

/* 状态标签 */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

.bg-success-light {
    background-color: var(--bs-success-light);
}

.bg-secondary-light {

/* -------------------------------------------------------------------------- */
/* Page Polish v3: 监控页 / 账号页 / 登录页专项优化 */
/* -------------------------------------------------------------------------- */

.page-body {
    position: relative;
    isolation: isolate;
}

.page-body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.08), transparent 28%),
        radial-gradient(circle at 0% 100%, rgba(16, 185, 129, 0.07), transparent 30%);
}

.monitor-shell .nav-pills {
    background: #ffffff;
    border: 1px solid #e8eef7;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.monitor-shell .nav-pills .nav-link {
    color: #4b5563;
    border-radius: 9px;
    font-weight: 700;
    font-size: 13px;
    padding: 0.5rem 0.85rem;
}

.monitor-shell .nav-pills .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #0f5fd7, #1f76ec);
    box-shadow: 0 8px 18px rgba(31, 118, 236, 0.25);
}

.monitor-shell .monitor-card {
    overflow: hidden;
}

.monitor-shell .monitor-card .card-header {
    font-size: 14px;
    letter-spacing: 0.2px;
    border-bottom: 1px solid #edf3fb;
}

.monitor-shell .border-top-primary {
    border-top: 4px solid #1f76ec !important;
}

.monitor-shell .border-top-warning {
    border-top: 4px solid #f59e0b !important;
}

.monitor-shell .border-top-success {
    border-top: 4px solid #10b981 !important;
}

.monitor-shell .border-top-secondary {
    border-top: 4px solid #64748b !important;
}

.monitor-shell .table-responsive {
    max-height: 420px;
}

.monitor-shell .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.account-toolbar {
    border-left: 4px solid #1f76ec;
}

.account-toolbar .input-group {
    border-radius: 12px;
    overflow: hidden;
}

.account-toolbar .form-control {
    border-right: 0;
}

.account-toolbar .btn-black {
    border-left: 0;
}

.account-panel .table-responsive {
    border: 1px solid #edf2f8;
    border-radius: 12px;
}

.account-panel .table tbody tr td {
    line-height: 1.4;
}

body.login-page {
    background:
        radial-gradient(circle at 20% 10%, rgba(31, 118, 236, 0.2), transparent 35%),
        radial-gradient(circle at 85% 90%, rgba(16, 185, 129, 0.18), transparent 30%),
        linear-gradient(140deg, #eef5ff 0%, #f6fbff 45%, #f8fbf8 100%);
}

.login-container {
    border: 1px solid #e7edf8;
    backdrop-filter: blur(4px);
}

.login-header h2 {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.login-header p {
    margin-top: 8px;
    margin-bottom: 0;
    color: #6b7280;
    font-size: 13px;
}

.bg-secondary-light {
    background-color: var(--bs-secondary-light);
}

/* 卡片阴影与圆角 */
.card {
    border-radius: 8px;
}

.form-control,
.form-select {
    border-color: #e0e6ed;
    font-size: 0.9rem;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}

/* 操作按钮 */
.btn-link {
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ... existing styles ... */

/* 开关样式优化 (Bootstrap switch custom) */
.form-check-input:checked {
    background-color: #000;
    /* 选中时黑色或深灰色 */
    border-color: #000;
}

/* 模态框输入框组高度对其 */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #6c757d;
}

/* 强制模态框 Label 对齐 */
.modal-body .col-form-label {
    font-size: 14px;
    font-weight: 500;
}

/* 文本域调整 */
textarea.form-control {
    resize: none;
}

/* 列表操作按钮颜色 (覆盖 Bootstrap 默认，匹配设计图) */
.text-success {
    color: #52c41a !important;
    /* 鲜艳的绿色 */
}

.text-warning {
    color: #faad14 !important;
    /* 橙色 */
}

/* 确保分页居中或靠右好看 */
.pagination {
    margin-bottom: 0;
}

/* ... 保留原有 CSS ... */

/* 新增/补充样式 */

/* 表格中的长文本处理 */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* 模态框表单标签微调 */
.modal-body .form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
}

/* 搜索框组样式优化 */
.input-group-text {
    border-color: #e0e6ed;
    color: #888;
}

/* 状态 Badge 的颜色定义 (如果 Bootstrap 类不够用) */
.bg-success-light {
    background-color: #f6ffed !important;
    color: #52c41a !important;
}

.bg-secondary-light {
    background-color: #f5f5f5 !important;
    color: #00000073 !important;
}

/* 按钮微调 */
.btn-primary {
    background-color: #1890ff;
    /* 阿里蓝风格，更适合管理后台 */
    border-color: #1890ff;
}

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* ... 保留原有 CSS ... */

/* [新增/更新] 针对卡片管理页面的特定样式 */

/* 搜索框组 */
.filter-card .form-control-sm,
.filter-card .form-select-sm {
    border-radius: 4px;
    border-color: #d9d9d9;
}

.filter-card .form-label {
    font-size: 12px;
    font-weight: 500;
}

/* 覆盖 Bootstrap 默认的 Focus 阴影，使其更柔和 */
.form-control:focus,
.form-select:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 黑色按钮 (筛选按钮) */
.btn-black {
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
}

.btn-black:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* 绿色自定义按钮 (导入按钮) */
.btn-success-custom {
    background-color: #52c41a;
    border-color: #52c41a;
    color: #fff;
}

.btn-success-custom:hover {
    background-color: #73d13d;
    border-color: #73d13d;
    color: #fff;
}

/* 状态 Badge 颜色定义 */
.bg-success-light {
    background-color: #f6ffed !important;
}

.text-success {
    color: #52c41a !important;
}

.bg-secondary-light {
    background-color: #f5f5f5 !important;
}

.text-secondary {
    color: #00000073 !important;
}

/* 表格微调 */
.table-hover tbody tr:hover {
    background-color: #fafafa;
}

.table td {
    vertical-align: middle;
}

/* 账号管理 - 特定样式优化 */

/* 搜索框组微调 */
.filter-card .input-group-text {
    font-size: 13px;
    background-color: #f7f9fa;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.filter-card .form-control,
.filter-card .form-select {
    font-size: 13px;
    border: 1px solid #e2e8f0;
}

.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 按钮图标间距 */
.btn i {
    font-size: 0.85em;
    vertical-align: text-top;
}

/* 表格列宽控制 */
.table td {
    vertical-align: middle;
    font-size: 13px;
}

/* 链接颜色 */
.table a {
    color: #1890ff;
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
}

/* 礼品卡列可能很长，限制高度 */
.text-truncate {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 在原有 style.css 基础上追加或确认 */

/* 黑色按钮类 */
.btn-black {
    background-color: #1f1f1f;
    color: #fff;
    border: 1px solid #1f1f1f;
}

.btn-black:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* 状态 Badge 样式 */
.badge-active {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.badge-locked {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #ff4d4f;
}

/* 模态框进度条微调 */
#upload-progress {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* ... 保留原有样式 ... */

/* [新增] 复选框样式微调 */
.table .form-check-input {
    cursor: pointer;
    border-color: #d9d9d9;
}

.table .form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

/* [新增] 操作按钮的悬停效果 */
.btn-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

/* [新增] 模态框头部美化 */
.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
}

/* [新增] 必填项星号 */
.form-label span.text-danger {
    margin-left: 4px;
    font-size: 1.2em;
    vertical-align: middle;
}

/* [新增] 禁用状态按钮优化 */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* [新增] 加载动画对齐 */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    margin-right: 8px;
}

/* --- 追加到 style.css 底部 --- */

/* Form Switch 优化 */
.form-switch .form-check-input {
    cursor: pointer;
    width: 2.5em;
    height: 1.25em;
}

.form-switch .form-check-input:checked {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(82, 196, 26, 0.25);
    border-color: #b7eb8f;
}

/* 模态框内的表单微调 */
.modal-body .form-text {
    font-size: 12px;
    color: #999;
}

/* 触发器类型的特殊样式 */
.font-monospace-custom {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #d63384;
    /* Bootstrap code color */
    background-color: #f8f9fa;
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
}

/* 表格悬停行加深一点，提升质感 */
.table-hover>tbody>tr:hover {
    background-color: rgba(24, 144, 255, 0.02);
}

/* --- System Monitor Page Styles --- */

/* 监控卡片 */
.monitor-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    border-top-width: 4px !important;
    /* 强调顶部彩色边框 */
}

.monitor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

/* 图标容器 */
.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 顶部边框颜色变体 (配合 Bootstrap 颜色) */
.border-top-primary {
    border-top-style: solid;
    border-top-color: var(--primary-blue);
}

.border-top-success {
    border-top-style: solid;
    border-top-color: var(--success-green);
}

.border-top-warning {
    border-top-style: solid;
    border-top-color: #faad14;
}

.border-top-danger {
    border-top-style: solid;
    border-top-color: #ff4d4f;
}

.border-top-info {
    border-top-style: solid;
    border-top-color: #13c2c2;
}

.border-top-secondary {
    border-top-style: solid;
    border-top-color: #6c757d;
}

/* 状态徽章淡色背景 */
.bg-danger-light {
    background-color: #fff1f0 !important;
}

/* 刷新时的旋转动画 */
@keyframes spin-once {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fa-sync-alt.spinning {
    animation: spin-once 0.5s linear;
}

/* Monitor System Specific Styles */

/* 队列进度条微调 */
#queue-list-container .progress {
    border-radius: 4px;
    overflow: hidden;
}

/* 列表字体优化 */
.font-monospace {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* 卡片悬浮效果 */
.monitor-card {
    transition: transform 0.2s ease-in-out;
}

.monitor-card:hover {
    transform: translateY(-3px);
}

/* Tab 激活颜色 */
.nav-pills .nav-link.active {
    background-color: var(--primary-blue);
    /* #1890ff */
}

.nav-pills .nav-link {
    color: #555;
    font-weight: 500;
}

/* =========================================
   自适应布局适配 (Responsive / Mobile)
   ========================================= */

/* 1. 遮罩层 (默认隐藏) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1030;
    /* 也就是在 Sidebar 下面，但在 Content 上面 */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* 2. 小于 992px (平板/手机) 的样式覆盖 */
@media (max-width: 991.98px) {

    /* 容器调整：解除 Flex 锁定，允许内容全宽 */
    .admin-container {
        position: relative;
        overflow-x: hidden;
        /* 防止横向滚动 */
    }

    /* 侧边栏：改为绝对定位，默认移出屏幕左侧 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 240px;
        z-index: 1040;
        /* 保证在遮罩层之上 */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    }

    /* 侧边栏激活状态：滑入 */
    .sidebar.active {
        transform: translateX(0);
    }

    /* 内容区域：占满宽度，移除可能的 Margin */
    .content {
        width: 100%;
        margin-left: 0 !important;
        min-width: 100%;
    }

    /* 顶部导航栏调整 */
    .top-header {
        padding: 0 15px;
        gap: 10px;
    }

    /* 隐藏面包屑中的部分文字，节省空间 */
    .breadcrumb span:first-child {
        display: none;
    }

    /* 页面主体 Padding 缩小 */
    .page-body {
        padding: 15px !important;
    }

    /* 表格强制横向滚动 (防止撑破布局) */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 搜索栏卡片内的输入框在手机上堆叠 */
    .filter-card .row>div {
        margin-bottom: 10px;
    }

    .filter-card .d-flex.gap-2 {
        width: 100%;
        justify-content: space-between;
    }
}

/* app/static/css/style.css */
/* 增加表格和状态标签样式 */
.status-badge {
    padding: 0.25em 0.6em;
    font-size: 0.85rem;
    border-radius: 4px;
}

.status-pending {
    background-color: #e9ecef;
    color: #495057;
}

.status-receiving {
    background-color: #cff4fc;
    color: #055160;
}

.status-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-failed {
    background-color: #f8d7da;
    color: #842029;
}

.table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-form-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.btn-green {
    background-color: #72b24c;
    color: white;
}

.btn-green:hover {
    background-color: #619a40;
    color: white;
}

/* --- 追加到 style.css 底部 --- */

/* 链接列：单行截断，鼠标悬停显示完整 Tooltip (浏览器原生行为) */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* 按钮颜色补充 - 匹配截图风格 */

/* 截图中的草绿色新增按钮 */
.btn-green {
    background-color: #72b24c; /* 依据截图取色 */
    color: #fff;
    border-color: #72b24c;
}
.btn-green:hover {
    background-color: #619a40;
    color: #fff;
    border-color: #619a40;
}

/* 截图中的黑色筛选按钮 */
.btn-black {
    background-color: #212529;
    color: #fff;
    border-color: #212529;
}
.btn-black:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* 模态框样式微调 */
.modal-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}
.modal-footer {
    border-top: 1px solid #f0f0f0;
}

/* 表格内按钮间距 */
.table .btn-link {
    text-decoration: none;
    font-weight: 500;
}
.table .btn-link:hover {
    text-decoration: underline;
}

/* 筛选栏 Input Group 样式统一 */
.filter-card .input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 追加到 style.css 底部 */

/* 筛选栏输入框背景纯白 */
.filter-card .form-control,
.filter-card .form-select {
    background-color: #fff;
    border-color: #d9d9d9;
}

/* 截图中的黑色筛选按钮 */
.btn-black {
    background-color: #333; /* 偏深灰/黑 */
    color: #fff;
    border: 1px solid #333;
}
.btn-black:hover {
    background-color: #000;
    color: #fff;
}

/* 截图中的白色导出按钮 */
.btn-outline-secondary {
    background-color: #fff;
    color: #333;
    border-color: #d9d9d9;
}
.btn-outline-secondary:hover {
    background-color: #f5f5f5;
    color: #000;
    border-color: #d9d9d9;
}

/* 表格收货人信息小字体 */
.table .small {
    font-size: 0.85rem;
}

/* 红色删除按钮 */
.btn-danger {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
}
.btn-danger:hover {
    background-color: #ff7875;
    border-color: #ff7875;
}

/* --- 订单创建页面样式 (orders_create) --- */

/* 产品选择卡片 */
.product-select-card .card {
    transition: all 0.2s ease-in-out;
    border: 1px solid #e9ecef;
}

.product-select-card:hover .card {
    border-color: #dee2e6;
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

/* 选中状态 */
.product-select-card .card.selected {
    border-color: #0d6efd !important;
    background-color: #f0f7ff; /* 浅蓝背景 */
    box-shadow: 0 0 0 1px #0d6efd;
}

.product-select-card .selected-mark {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent #0d6efd transparent transparent;
    display: none;
    z-index: 10;
}

.product-select-card .selected-mark i {
    position: absolute;
    top: 6px;
    right: -32px;
    font-size: 12px;
}

.product-select-card .card.selected .selected-mark {
    display: block;
}

/* 礼品卡列表 */
.card-list-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.card-item-row {
    border-left: 4px solid #198754 !important; /* 绿色左边框表示可用 */
    transition: background 0.2s;
}

.card-item-row:hover {
    background-color: #f8f9fa;
}

/* 虚线边框 */
.border-dashed {
    border-style: dashed !important;
}

/* Sticky Right Panel adjustments for mobile */
@media (max-width: 991.98px) {
    .sticky-top {
        position: static !important; /* 移动端不吸顶，放在底部 */
        margin-top: 1rem;
    }
}

/*
 * 追加优化样式 for Zipcode Monitor
 */

/* 确保表格复选框列居中且宽度固定 */
.table th:first-child,
.table td:first-child {
    text-align: center;
    vertical-align: middle;
    width: 40px;
}

/* 产品名称加粗显示 */
.table td.fw-bold {
    font-weight: 600;
}

/* 按钮组间距优化 */
.btn-group .btn {
    border-radius: 4px;
}
.btn-group .btn + .btn {
    margin-left: 10px; /* 增加按钮间距，覆盖默认的 -1px */
}

/* 空状态图标颜色 */
.fa-inbox {
    color: #dee2e6;
}

/* 确保分页按钮点击手势正确 */
.page-link {
    cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* Sidebar v3: 紧凑可折叠导航                                                */
/* -------------------------------------------------------------------------- */

/* 细滚动条 */
.sidebar-nav {
    padding: 8px 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* 分组容器 */
.nav-group {
    margin-bottom: 2px;
}

/* 分组标题（可点击折叠） */
.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    cursor: pointer;
    user-select: none;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.2s;
}
.nav-group-header:hover {
    color: rgba(255,255,255,0.72);
}

.nav-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-group-label i {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

/* 折叠箭头 */
.nav-group-arrow {
    font-size: 10px;
    transition: transform 0.25s ease;
}
.nav-group.open .nav-group-arrow {
    transform: rotate(0deg);
}
.nav-group:not(.open) .nav-group-arrow {
    transform: rotate(-90deg);
}

/* 折叠体 */
.nav-group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-group.open .nav-group-body {
    max-height: 500px;
}

/* 紧凑菜单项（单行 icon + title） */
.nav-group-body .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 30px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.nav-group-body .menu-item i {
    width: 18px;
    font-size: 13px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.45);
    transition: color 0.18s;
}
.nav-group-body .menu-item span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover */
.nav-group-body .menu-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-left-color: rgba(120,182,255,0.4);
}
.nav-group-body .menu-item:hover i {
    color: rgba(255,255,255,0.8);
}

/* Active */
.nav-group-body .menu-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(15,95,215,0.85), rgba(25,115,230,0.65));
    border-left-color: #78b6ff;
}
.nav-group-body .menu-item.active i {
    color: #fff;
}