/*!
 * * 《轩玮导航》 - 友情链接模块样式
 * @package XuWbk
 * @author 轩玮
 * @version 1.0.0
 * @created 文件创建升级
 * @modified 文件修改时间
 * @description 由《轩玮博客》开发用于导航工具系统
 * @contact QQ:6050640 邮箱：6050640@qq.com 网址：www.xuwbk.com
 * @copyright Copyright (c) 2026 by XuWbk.Com, All Rights Reserved.
 */

.fl-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 16px 60px; }
.fl-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.fl-head h1 { font-size: 24px; margin: 0; display: flex; align-items: center; gap: 8px; }
.fl-head .fl-back { color: #6c757d; text-decoration: none; font-size: 14px; }
.fl-head .fl-back:hover { color: #dc3545; }

.fl-card-panel { background: #fff; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.08); padding: 24px; margin-bottom: 24px; }
.fl-card-panel h2 { font-size: 18px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 8px; }
.fl-card-panel h2 .fl-badge { font-size: 12px; font-weight: 400; color: #fff; background: #dc3545; border-radius: 10px; padding: 1px 8px; }

.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.fl-card { background: #f8f9fa; border: 1px solid #eee; border-radius: 8px; transition: all .2s; }
.fl-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.1); border-color: #dc3545; }
.fl-card-link { display: flex; align-items: center; gap: 12px; padding: 12px; text-decoration: none !important; }
.fl-card-logo { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }
.fl-card-logo img { max-width: 100%; max-height: 100%; }
.fl-card-body { display: flex; flex-direction: column; overflow: hidden; }
.fl-card-body strong { font-size: 14px; color: #333; line-height: 1.4; }
.fl-card-body em { font-style: normal; font-size: 12px; color: #888; line-height: 1.4; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fl-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fl-field { margin-bottom: 16px; }
.fl-field label { display: block; font-size: 14px; margin-bottom: 6px; color: #333; }
.fl-field label .req { color: #dc3545; }
.fl-field input, .fl-field textarea { width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: #fff; color: #333; box-sizing: border-box; }
.fl-field input:focus, .fl-field textarea:focus { outline: none; border-color: #dc3545; }
.fl-field textarea { min-height: 88px; resize: vertical; }
.fl-hint { font-size: 12px; color: #999; margin-top: 4px; }
.fl-btn-main { background: #dc3545; color: #fff; border: none; border-radius: 6px; padding: 10px 26px; font-size: 15px; cursor: pointer; }
.fl-btn-main:hover { background: #c82333; }

.fl-tips { background: #f8f9fa; border-left: 3px solid #dc3545; padding: 12px 16px; border-radius: 4px; font-size: 13px; color: #666; margin-bottom: 20px; }
.fl-tips ul { margin: 0; padding-left: 18px; }

.fl-login { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fl-login input { flex: 1; min-width: 200px; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px; }
.fl-login button { background: #343a40; color: #fff; border: none; padding: 9px 22px; border-radius: 6px; cursor: pointer; }
.fl-admin-tip { font-size: 12px; color: #999; margin-top: 8px; }

.fl-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fl-tabs button { border: 1px solid #ddd; background: #fff; border-radius: 20px; padding: 6px 16px; font-size: 13px; cursor: pointer; color: #555; }
.fl-tabs button.active { background: #dc3545; border-color: #dc3545; color: #fff; }

.fl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fl-table th, .fl-table td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; text-align: left; vertical-align: top; }
.fl-table th { color: #888; font-weight: 500; }
.fl-table a { color: #007bff; text-decoration: none; }
.fl-table a:hover { color: #dc3545; }
.fl-sub { font-size: 12px; color: #999; margin-top: 2px; }
.fl-desc { max-width: 220px; color: #666; }
.fl-empty { text-align: center; color: #999; padding: 30px 0; }
.fl-actions { white-space: nowrap; }

.fl-btn { border: 1px solid #ddd; background: #fff; border-radius: 4px; padding: 4px 10px; font-size: 12px; cursor: pointer; margin: 0 3px 3px 0; color: #555; }
.fl-btn:hover { border-color: #bbb; }
.fl-btn-ok { background: #28a745; border-color: #28a745; color: #fff; }
.fl-btn-ok:hover { background: #218838; }
.fl-btn-no { background: #ffc107; border-color: #ffc107; color: #333; }
.fl-btn-del { background: #fff; border-color: #dc3545; color: #dc3545; }
.fl-btn-edit { background: #eef4ff; border-color: #b9d2ff; color: #2a62d0; }

.fl-tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.fl-src { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; background: #e9ecef; color: #555; margin-left: 6px; }
.fl-src-link { background: #e7f1ff; color: #0a58ca; }
.fl-muted { color: #aaa; }
.fl-cat { max-width: 120px; padding: 2px 6px; font-size: 12px; color: inherit; background: transparent; border: 1px solid #dcdcdc; border-radius: 4px; }
body.night .fl-cat { border-color: #3a3a3a; }

.fl-modal { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 9999; display: none; }
.fl-modal.show { display: block; }
.fl-modal-mask { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .45); }
.fl-modal-box { position: relative; width: 92%; max-width: 520px; max-height: 88vh; overflow-y: auto; margin: 6vh auto 0; background: #fff; border-radius: 8px; padding: 20px 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, .2); }
body.night .fl-modal-box { background: #22262d; }
.fl-modal-box h3 { font-size: 17px; margin: 0 0 16px; }
.fl-row { margin-bottom: 12px; }
.fl-row label { display: block; font-size: 12px; color: #888; margin-bottom: 4px; }
.fl-row input, .fl-row textarea, .fl-row select { width: 100%; padding: 7px 10px; font-size: 13px; color: inherit; background: transparent; border: 1px solid #dcdcdc; border-radius: 4px; box-sizing: border-box; }
.fl-row input:focus, .fl-row textarea:focus, .fl-row select:focus { border-color: #4c8ffc; outline: 0; }
body.night .fl-row input, body.night .fl-row textarea, body.night .fl-row select { border-color: #3a3a3a; }
.fl-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fl-modal-actions .fl-btn { flex: 1 1 auto; }

.fl-tag-pending { background: #fff3cd; color: #856404; }
.fl-tag-approved { background: #d4edda; color: #155724; }
.fl-tag-rejected { background: #f8d7da; color: #721c24; }

.fl-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; border-top: 1px solid #f0f0f0; padding-top: 16px; }
.fl-tools button { font-size: 12px; border: 1px solid #ddd; background: #fff; border-radius: 4px; padding: 5px 12px; cursor: pointer; color: #555; }
.fl-tools button:hover { border-color: #dc3545; color: #dc3545; }
.fl-code-wrap { margin-top: 12px; display: none; }
.fl-code-wrap textarea { width: 100%; min-height: 160px; font-size: 12px; font-family: Consolas, Monaco, monospace; border: 1px solid #ddd; border-radius: 6px; padding: 10px; box-sizing: border-box; }

.fl-toast { position: fixed; left: 50%; top: 30px; transform: translate(-50%, -20px); background: #333; color: #fff; padding: 10px 22px; border-radius: 20px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 9999; }
.fl-toast.show { opacity: 1; transform: translate(-50%, 0); }
.fl-toast-err { background: #dc3545; }
.fl-toast-ok { background: #28a745; }

/* 首页友链区动态链接 */
.friendlink-dynamic:empty { display: none; }
.friendlink .card-body a { margin-right: 14px; }

@media (max-width: 768px) {
    .fl-form-row { grid-template-columns: 1fr; }
    .fl-card-panel { padding: 16px; }
    .fl-table th:nth-child(3), .fl-table td:nth-child(3),
    .fl-table th:nth-child(5), .fl-table td:nth-child(5) { display: none; }
}

/* 夜间模式适配 */
body.io-black-mode .fl-card-panel,
body.night .fl-card-panel { background: #22252a; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
body.io-black-mode .fl-card-panel h2,
body.night .fl-card-panel h2 { color: #eee; border-color: #333; }
body.io-black-mode .fl-field label,
body.night .fl-field label { color: #ccc; }
body.io-black-mode .fl-field input,
body.night .fl-field input,
body.io-black-mode .fl-field textarea,
body.night .fl-field textarea { background: #2b2f36; border-color: #3d424b; color: #ddd; }
body.io-black-mode .fl-card,
body.night .fl-card { background: #2b2f36; border-color: #3d424b; }
body.io-black-mode .fl-card-body strong,
body.night .fl-card-body strong { color: #eee; }
body.io-black-mode .fl-tips,
body.night .fl-tips { background: #2b2f36; color: #aaa; }
body.io-black-mode .fl-tabs button,
body.night .fl-tabs button,
body.io-black-mode .fl-btn,
body.night .fl-btn,
body.io-black-mode .fl-tools button,
body.night .fl-tools button { background: #2b2f36; border-color: #3d424b; color: #ccc; }
body.io-black-mode .fl-table th,
body.night .fl-table th { color: #999; }
body.io-black-mode .fl-table th, .fl-table td,
body.night .fl-table th, .fl-table td { border-color: #333; }
