/* /office/favorites.php 收藏页专属样式 - 2026-08-10 新建
   2026-08-11 改造：与 /office/index.php 共用 table#data 表格行布局
   ----------------------------------------------------------------
   表格行/单元格/badge 等基础样式复用 list_office.css，
   本文件只覆盖：列宽 + 名称列链接样式 + 空态（fav-empty）
*/

/* 收藏页表格 8 列（ID / 公开 / 名称 / 类型 / 分类 / 创建者 / 收藏时间 / 操作） */
table#data.fav-table th:nth-child(1),
table#data.fav-table td:nth-child(1){ width:60px; }        /* ID */
table#data.fav-table th:nth-child(2),
table#data.fav-table td:nth-child(2){ width:80px; }        /* 公开 */
table#data.fav-table th:nth-child(3),
table#data.fav-table td:nth-child(3){ max-width:380px; }   /* 名称：占主要宽度 */
table#data.fav-table th:nth-child(4),
table#data.fav-table td:nth-child(4){ width:90px; text-align:center; }   /* 类型 */
table#data.fav-table th:nth-child(5),
table#data.fav-table td:nth-child(5){ width:120px; }       /* 分类 */
table#data.fav-table th:nth-child(6),
table#data.fav-table td:nth-child(6){ width:110px; }       /* 创建者 */
table#data.fav-table th:nth-child(7),
table#data.fav-table td:nth-child(7){ width:160px; }       /* 收藏时间 */
table#data.fav-table th:nth-child(8),
table#data.fav-table td:nth-child(8){ width:120px; text-align:center; }   /* 操作 */

/* 名称列链接：跟 index.php 一样蓝色可点击 */
table#data.fav-table .fav-title {
    color: var(--lo-link, #2563eb);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
table#data.fav-table .fav-title:hover {
    color: var(--lo-link-hover, #1d4ed8);
    text-decoration: underline;
}
table#data.fav-table .fav-title em {
    color: var(--lo-muted, #6b7280);
    font-style: italic;
    font-weight: 400;
}

/* 取消收藏按钮：红色链接，与 office-actions 其它链接统一 */
table#data.fav-table .fav-remove-btn {
    cursor: pointer;
    color: var(--lo-danger, #dc2626) !important;
}
table#data.fav-table .fav-remove-btn:hover {
    text-decoration: underline;
}

/* 空态/未登录态（未登录时、收藏为空时、搜索无结果时共用） */
.fav-empty {
    margin: 60px auto;
    max-width: 460px;
    text-align: center;
    padding: 32px 24px;
    background: var(--lo-card, #fff);
    border: 1px dashed var(--lo-border, #e5e7eb);
    border-radius: 12px;
}
.fav-empty__icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
}
.fav-empty__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--lo-text, #1f2937);
    margin-bottom: 8px;
}
.fav-empty__text {
    font-size: 14px;
    color: var(--lo-muted, #6b7280);
    line-height: 1.6;
}
.fav-empty__text a {
    color: var(--lo-primary, #2563eb);
    text-decoration: none;
    font-weight: 500;
}
.fav-empty__text a:hover {
    text-decoration: underline;
}

/* 暗色主题适配：跟随 list_office.css 的 body[data-theme] 变量 */
body[data-theme="dark"] .fav-empty { background: #1e293b; border-color: #334155; }
body[data-theme="dark"] .fav-empty__title { color: #e2e8f0; }
body[data-theme="dark"] .fav-empty__text { color: #94a3b8; }

/* =====================================================================
   2026-08-11 (Stage 1.1)：匿名暂存相关样式
   - 待认领横幅（已登录用户有 token 时显示）
   - 暂存徽章（行内第二枚 badge）
   - 标题栏的"待认领"统计文字
   ===================================================================== */

/* 顶部"待认领"横幅：浅蓝渐变背景 + 收件箱图标 */
.anon-merge-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px 0;
    padding: 14px 20px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0%, rgba(168, 85, 247, 0.06) 100%);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-left: 4px solid var(--lo-primary, #2563eb);
    border-radius: 10px;
    color: var(--lo-text, #1f2937);
}
.anon-merge-banner__icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.anon-merge-banner__text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}
.anon-merge-banner__text strong {
    color: var(--lo-primary, #2563eb);
    font-weight: 700;
    font-size: 15px;
}
.anon-merge-banner__actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 标题栏的"待认领"统计文字（紫色高亮） */
.office-header__title .office-stat--anon {
    color: #a855f7;
}
.office-header__title .office-stat--anon strong {
    color: #7e22ce;
    font-weight: 700;
}

/* 暂存徽章（行内第二枚） */
.office-badge--anon-mini {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
    color: #78350f;
    border: 1px solid #f59e0b;
    letter-spacing: 0.2px;
}
.office-badge--anon {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    border: 1px solid #d97706;
}
.office-badge--mine {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    color: #fff;
}

/* 暗色主题适配 */
body[data-theme="dark"] .anon-merge-banner {
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.12) 0%, rgba(168, 85, 247, 0.10) 100%);
    border-color: rgba(96, 165, 250, 0.35);
    border-left-color: #60a5fa;
    color: #e2e8f0;
}
body[data-theme="dark"] .anon-merge-banner__text strong { color: #93c5fd; }
body[data-theme="dark"] .office-header__title .office-stat--anon { color: #c084fc; }
body[data-theme="dark"] .office-header__title .office-stat--anon strong { color: #d8b4fe; }
body[data-theme="dark"] .office-badge--anon-mini {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    color: #fef3c7;
    border-color: #f59e0b;
}
body[data-theme="dark"] .office-badge--anon {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    color: #fef3c7;
    border-color: #f59e0b;
}
body[data-theme="dark"] .office-badge--mine {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: #dbeafe;
}

/* 2026-08-11：危险操作按钮（清空暂存） */
.office-btn--danger {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%) !important;
    color: #fff !important;
    border-color: #b91c1c !important;
}
.office-btn--danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}
body[data-theme="dark"] .office-btn--danger {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%) !important;
    color: #fee2e2 !important;
    border-color: #991b1b !important;
}
