/* Love Diary · 光年后台主题覆盖 */

/* ============================================================
   设计基调
   ============================================================ */
:root {
    --ld-primary: #667eea;
    --ld-primary-deep: #764ba2;
    --ld-pink: #ec4899;
    --ld-ink: #1f2937;
    --ld-muted: #9ca3af;
    --ld-line: #eef0f5;
    --ld-sidebar-1: #2a2348;
    --ld-sidebar-2: #1a1633;
}
body {
    background: linear-gradient(180deg, #f7f8fc 0%, #f3f4fa 100%);
    color: #4b5563;
}

/* ============================================================
   左侧导航：深色渐变 + 品牌感
   ============================================================ */
.lyear-layout-sidebar {
    background: linear-gradient(180deg, var(--ld-sidebar-1) 0%, var(--ld-sidebar-2) 100%) !important;
    box-shadow: 2px 0 18px rgba(22, 18, 48, 0.16) !important;
}
.lyear-layout-sidebar-info {
    background: transparent !important;
}
.sidebar-header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.sidebar-header a {
    display: inline-flex !important;
    width: auto !important;
    align-items: center;
    justify-content: center;
}

/* Logo 区域 */
.sidebar-header .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.sidebar-header .brand-logo .heart-icon {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
    color: #f472b6;
    text-shadow: 0 0 14px rgba(244, 114, 182, 0.55);
    animation: heartBeat 1.6s ease-in-out infinite;
}
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}
.sidebar-header .brand-logo .brand-couple {
    font-size: 15px;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* 导航项 */
.lyear-layout-sidebar .nav-drawer li a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13.5px;
    border-right: none !important;
    transition: color .18s, background .18s;
}
.lyear-layout-sidebar .nav-drawer li a i {
    color: rgba(255, 255, 255, 0.55);
    transition: color .18s;
}
.lyear-layout-sidebar .nav-drawer li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.lyear-layout-sidebar .nav-drawer li a:hover i {
    color: #f9a8d4;
}
.lyear-layout-sidebar .nav-drawer > li.active > a {
    background: linear-gradient(90deg, rgba(168, 132, 255, 0.32), rgba(236, 72, 153, 0.14)) !important;
    color: #fff !important;
    border-right: none !important;
    font-weight: 600;
}
.lyear-layout-sidebar .nav-drawer > li.active > a i {
    color: #f9a8d4;
}
.lyear-layout-sidebar .nav-drawer > li.active > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #c084fc, #ec4899);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

/* 侧边栏底部用户信息 */
.sidebar-user-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user-box .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.sidebar-user-box .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-user-box .user-meta {
    flex: 1;
    min-width: 0;
}
.sidebar-user-box .user-meta b {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-box .user-meta span {
    display: block;
    color: rgba(255,255,255,0.55);
    font-size: 11px;
    margin-top: 2px;
}
.sidebar-user-box .logout-form {
    margin: 0;
    padding: 0 12px 12px;
}

/* 顶部右侧用户菜单：简洁图标式，不再显示大圆头像 */
.ld-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    color: #4b5563;
    font-size: 13px;
    text-decoration: none;
    transition: background .15s;
}
.ld-user-toggle:hover,
.ld-user-toggle:focus {
    background: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
}
.ld-user-toggle .ld-user-icon {
    font-size: 22px;
    line-height: 1;
    color: #667eea;
}
.ld-user-toggle .ld-user-name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ld-user-toggle .ld-user-caret {
    font-size: 16px;
    line-height: 1;
    color: #9ca3af;
}
/* 清除光年模板默认 profile 下拉的大内边距/头像样式 */
.dropdown-profile .dropdown-toggle::after {
    display: none;
}

/* 页面标题区 */
.lyear-layout-content .breadcrumb-bar {
    background: transparent;
    padding: 2px 2px 16px;
    border-bottom: none;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.lyear-layout-content .breadcrumb-bar h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .2px;
    color: #1f2937;
}
.lyear-layout-content .breadcrumb-bar p {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: #9ca3af;
}
.lyear-layout-content .breadcrumb-bar .btn {
    flex-shrink: 0;
}

/* Flash 消息 */
.ld-flash {
    padding: 13px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    box-shadow: 0 4px 14px rgba(31, 41, 55, 0.05);
    animation: ldFadeUp .3s ease both;
}
.ld-flash.flash-success, .ld-flash.flash-info {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
.ld-flash.flash-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.ld-flash i {
    font-size: 20px;
}

/* 统计卡片 - 首页 */
.ld-stat-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.12);
    transition: transform .22s, box-shadow .22s;
}
.ld-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(31, 41, 55, 0.18);
}
/* 装饰圆环 */
.ld-stat-card::after {
    content: '';
    position: absolute;
    right: -28px;
    bottom: -46px;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}
/* 四张卡片的品牌渐变 */
.ld-stat-card.bg-primary {
    background: linear-gradient(135deg, #7b8cf0 0%, #6a4fb0 100%) !important;
}
.ld-stat-card.bg-danger {
    background: linear-gradient(135deg, #f78fb6 0%, #ec4899 100%) !important;
}
.ld-stat-card.bg-success {
    background: linear-gradient(135deg, #4ade80 0%, #10b981 100%) !important;
}
.ld-stat-card.bg-purple {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
}
.ld-stat-card .card-body {
    padding: 20px;
    position: relative;
    z-index: 1;
}
.ld-stat-card .stat-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.ld-stat-card .stat-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}
.ld-stat-card .stat-label {
    font-size: 13px;
    opacity: .85;
    margin-top: 4px;
}
.ld-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Hero 区域 */
.ld-hero {
    background:
        radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.22), transparent 46%),
        linear-gradient(135deg, #6d7ff0 0%, #7a4fb8 55%, #b5488f 100%);
    border-radius: 16px;
    padding: 32px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(102, 78, 184, 0.28);
}
.ld-hero::before {
    content: '♥';
    position: absolute;
    right: -20px;
    top: -40px;
    font-size: 220px;
    opacity: 0.08;
}
.ld-hero h2 {
    font-size: 22px;
    margin: 0 0 6px;
    font-weight: 500;
}
.ld-hero h2 b {
    font-size: 34px;
    font-weight: 700;
    margin: 0 4px;
}
.ld-hero p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}
.ld-hero .ld-publish-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    backdrop-filter: blur(4px);
    transition: background .2s;
}
.ld-hero .ld-publish-btn:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
    text-decoration: none;
}

/* 图表卡片 */
.ld-chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 180px;
    gap: 12px;
    padding-top: 20px;
}
.ld-chart-bars .bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.ld-chart-bars .bar-col .bar-value {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.ld-chart-bars .bar-col .bar-track {
    width: 100%;
    height: 120px;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.ld-chart-bars .bar-col .bar-track i {
    display: block;
    width: 100%;
    background: linear-gradient(to top, #f472b6, #ec4899);
    border-radius: 6px 6px 0 0;
    transition: height .3s;
}
.ld-chart-bars .bar-col.is-today .bar-track i {
    background: linear-gradient(to top, #667eea, #764ba2);
}
.ld-chart-bars .bar-col .bar-label {
    font-size: 11px;
    color: #9ca3af;
}

/* 内容类型 donut */
.ld-donut-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 10px 0;
}
.ld-donut {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ld-donut::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
}
.ld-donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
}
.ld-donut-center b {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}
.ld-donut-center span {
    font-size: 11px;
    color: #9ca3af;
}
.ld-donut-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}
.ld-donut-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #4b5563;
}
.ld-donut-legend li b {
    margin-left: auto;
    color: #1f2937;
    font-weight: 600;
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot-photo { background: #c2607a; }
.dot-video { background: #7b8bd4; }
.dot-music { background: #63a37f; }

/* 互动排行 */
.ld-rank-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed #f0f2f5;
}
.ld-rank-row:last-child {
    border-bottom: none;
}
.ld-rank-row .rank-index {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ld-rank-row .rank-index.is-top {
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: #fff;
}
.ld-rank-row .rank-main {
    flex: 1;
    min-width: 0;
}
.ld-rank-row .rank-main b {
    display: block;
    font-size: 14px;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ld-rank-row .rank-main .rank-meta {
    font-size: 11px;
    color: #9ca3af;
}
.ld-rank-row .rank-main .rank-bar {
    height: 4px;
    background: #f3f4f6;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}
.ld-rank-row .rank-main .rank-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #f472b6, #ec4899);
    border-radius: 2px;
}
.ld-rank-row .rank-like {
    font-size: 13px;
    color: #ec4899;
    font-weight: 600;
    flex-shrink: 0;
}

/* 最近留言 */
.ld-comment-item {
    padding: 12px 0;
    border-bottom: 1px dashed #f0f2f5;
}
.ld-comment-item:last-child {
    border-bottom: none;
}
.ld-comment-item .comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.ld-comment-item .comment-head b {
    font-size: 13px;
    color: #1f2937;
}
.ld-comment-item .comment-head span {
    font-size: 11px;
    color: #9ca3af;
}
.ld-comment-item p {
    margin: 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}
.ld-dash-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: #667eea;
    text-decoration: none;
}
.ld-dash-more:hover {
    text-decoration: underline;
}

/* 列表/表格 */
.ld-table {
    width: 100%;
}
.ld-table td, .ld-table th {
    vertical-align: middle;
}
.ld-post-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
}
.ld-post-thumb-empty {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    background: linear-gradient(135deg, #fce7f3, #ede9fe);
    color: #a78bfa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.ld-pin-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 4px;
    margin-right: 6px;
    font-weight: 500;
}
.ld-empty {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
    font-size: 13px;
}

/* 按钮颜色微调 */
.btn-pink {
    background: linear-gradient(135deg, #f472b6, #ec4899);
    border: none;
    color: #fff;
}
.btn-pink:hover {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: #fff;
}
.btn-outline-danger {
    color: #dc2626;
    border-color: #fecaca;
}
.btn-outline-danger:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #dc2626;
}

/* 子账户角色标签 */
.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 1.5;
}
.role-tag i {
    font-size: 11px;
    line-height: 1;
}
.role-owner {
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: #fff;
    box-shadow: 0 2px 6px rgba(236,72,153,0.25);
}
.role-sub {
    background: #e0e7ff;
    color: #4338ca;
}

/* ============================================================
   账户管理：卡片式账户列表
   ============================================================ */
.ld-account-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ld-account-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f2f5;
    transition: background .15s;
}
.ld-account-item:last-child {
    border-bottom: none;
}
.ld-account-item:hover {
    background: #faf9ff;
}

/* 头像：圆形 + 白边 + 柔影，无图时渐变底首字符 */
.ld-account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.10);
    user-select: none;
}
.ld-account-avatar.is-owner {
    background: linear-gradient(135deg, #f472b6 0%, #a855f7 100%);
    box-shadow: 0 3px 12px rgba(236,72,153,0.30);
}
.ld-account-avatar.is-sub {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 3px 12px rgba(102,126,234,0.28);
}
.ld-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 昵称与信息 */
.ld-account-info {
    flex: 1;
    min-width: 0;
}
.ld-account-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.ld-account-meta {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12px;
    color: #9ca3af;
}
.ld-account-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.ld-account-meta i {
    font-size: 13px;
    color: #b6bdd0;
}
.ld-account-meta > span:first-child {
    color: #667eea;
    font-weight: 500;
}
.ld-account-meta > span:first-child i {
    color: #667eea;
}

/* 右侧操作区 */
.ld-account-actions {
    flex-shrink: 0;
    margin-left: auto;
}
.ld-account-owner-mark {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #10b981;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 4px 12px;
    border-radius: 20px;
}
.ld-account-owner-mark i {
    font-size: 14px;
}

/* IP 封禁状态 */
.visit-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: #e5e7eb;
    color: #4b5563;
}
.visit-badge.is-blocked {
    background: #fee2e2;
    color: #991b1b;
}
.visit-badge.is-ok {
    background: #d1fae5;
    color: #065f46;
}

/* 媒体预览 */
.ld-media-preview {
    max-width: 180px;
    max-height: 120px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: block;
    border: 1px solid #f0f2f5;
}
.ld-media-preview.avatar {
    width: 64px;
    height: 64px;
    max-width: none;
    max-height: none;
    border-radius: 50%;
    object-fit: cover;
}

/* 子统计 */
.ld-substats {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #f0f2f5;
}
.ld-substats.is-two > div {
    flex: 1;
}
.ld-substats > div {
    flex: 1;
    text-align: center;
}
.ld-substats b {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}
.ld-substats span {
    font-size: 12px;
    color: #9ca3af;
}

/* 登录页 */
body.ld-login-body {
    background:
        radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.16), transparent 44%),
        radial-gradient(circle at 86% 84%, rgba(255, 255, 255, 0.13), transparent 42%),
        linear-gradient(135deg, #6d7ff0 0%, #764ba2 60%, #b5488f 100%);
    min-height: 100vh;
}
body.ld-login-body .login-card-custom {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 26px 70px rgba(24, 18, 60, 0.32);
    padding: 46px 40px;
    width: 100%;
    max-width: 420px;
    animation: ldFadeUp .45s ease both;
}
body.ld-login-body .login-brand {
    text-align: center;
    margin-bottom: 30px;
}
body.ld-login-body .login-brand .lg-heart {
    font-size: 42px;
    color: #ec4899;
    animation: heartBeat 1.6s ease-in-out infinite;
    display: inline-block;
    text-shadow: 0 6px 18px rgba(236, 72, 153, 0.35);
}
body.ld-login-body .login-brand h1 {
    font-size: 21px;
    font-weight: 700;
    color: #1f2937;
    margin: 10px 0 4px;
}
body.ld-login-body .login-brand p {
    color: #9ca3af;
    font-size: 13px;
    margin: 0;
}
body.ld-login-body .login-foot {
    text-align: center;
    margin-top: 20px;
}
body.ld-login-body .login-foot a {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
}

/* ============================================================
   卡片系统
   ============================================================ */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(31, 41, 55, 0.055);
    transition: box-shadow .22s;
    overflow: hidden;
}
.card:hover {
    box-shadow: 0 10px 26px rgba(31, 41, 55, 0.08);
}
.card .card-header {
    padding: 16px 22px;
    background: transparent;
    border-bottom: 1px solid var(--ld-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card .card-header .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ld-ink);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}
.card .card-header .card-title > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #eef1ff;
    color: #667eea;
    font-size: 16px;
    flex-shrink: 0;
}
.card:not(.ld-stat-card) .card-body {
    padding: 22px;
}
.card .card-footer {
    background: #fafbfe;
    border-top: 1px solid var(--ld-line);
    padding: 14px 22px;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all .18s;
}
.btn-sm {
    border-radius: 7px;
}
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    box-shadow: 0 5px 14px rgba(102, 126, 234, 0.28);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #5a6fd8, #6a4298) !important;
    box-shadow: 0 7px 18px rgba(102, 126, 234, 0.34);
}
.btn-outline-primary {
    color: #667eea;
    border-color: #c7cdf6;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

/* ============================================================
   表格
   ============================================================ */
.table thead th,
.table .thead-light th {
    background-color: #f8f9fc;
    border-top: none;
    border-bottom: 1px solid var(--ld-line);
    border-color: var(--ld-line);
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
}
.table td, .table th {
    padding: 13px 18px;
    font-size: 13px;
    vertical-align: middle;
}
.table tbody tr {
    transition: background .15s;
}
.table-hover tbody tr:hover {
    background: #fafaff;
}
.ld-table code {
    background: #f3f4fb;
    color: #5b5fc7;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 12px;
}

/* ============================================================
   表单
   ============================================================ */
.form-control,
.custom-select {
    border-radius: 9px;
    border-color: #e4e7f0;
    padding: 9px 13px;
    font-size: 14px;
    color: #374151;
}
.form-control:focus,
.custom-select:focus {
    border-color: #8b93f8;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.13);
}
label {
    font-weight: 500;
    color: #4b5563;
    font-size: 13px;
    margin-bottom: 6px;
}
.custom-control-label {
    font-weight: 400;
    font-size: 13.5px;
    color: #4b5563;
    margin-bottom: 0;
}
.form-control-file {
    font-size: 13px;
    color: #6b7280;
}
.input-group-text {
    background: #f7f8fd;
    border-color: #e4e7f0;
    color: #9aa2c0;
}

/* ============================================================
   徽章 / 空状态
   ============================================================ */
.badge {
    border-radius: 8px;
    padding: .32em .62em;
    font-weight: 600;
    font-size: 11px;
}
.badge-primary {
    background: #eef1ff;
    color: #4f5bd5;
}
.ld-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #9ca3af;
    font-size: 13px;
    padding: 34px 20px;
}
.ld-empty::before {
    content: '♡';
    font-size: 38px;
    line-height: 1;
    color: #d8dcf0;
}

/* ============================================================
   动效
   ============================================================ */
@keyframes ldFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lyear-layout-content > .container-fluid {
    animation: ldFadeUp .32s ease both;
}

/* 隐藏 preloader 动画，保持简洁 */
#lyear-preloader {
    display: none;
}

/* ============================================================
   移动端适配
   ============================================================ */

/* 平板 & 手机：卡片间距收紧 */
@media (max-width: 991.98px) {
    .ld-stat-card {
        margin-bottom: 15px;
    }
}

/* 手机端 */
@media (max-width: 767.98px) {

    /* 整体容器留白收紧 */
    .lyear-layout-content .container-fluid.p-t-15 {
        padding-left: 10px;
        padding-right: 10px;
    }
    .lyear-layout-content .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    .lyear-layout-content .row > [class*="col-"] {
        padding-left: 5px;
        padding-right: 5px;
    }

    /* 顶部栏标题缩小，避免与按钮挤压 */
    .navbar .navbar-title {
        font-size: 14px !important;
        margin-left: 6px !important;
        max-width: 42vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* 顶部用户菜单：手机上只显示小图标 */
    .ld-user-toggle {
        padding: 6px;
        gap: 4px;
    }
    .ld-user-toggle .ld-user-name {
        display: none;
    }

    /* 面包屑改为纵向排列 */
    .lyear-layout-content .breadcrumb-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 15px;
    }
    .lyear-layout-content .breadcrumb-bar h4 {
        font-size: 15px;
    }
    .lyear-layout-content .breadcrumb-bar .btn {
        align-self: flex-end;
        margin-top: -4px;
    }

    /* 卡片内边距收紧 */
    .card:not(.ld-stat-card) .card-body {
        padding: 15px;
    }
    .card .card-header {
        padding: 12px 15px;
    }
    .card .card-header .card-title > i {
        width: 26px;
        height: 26px;
        font-size: 14px;
        border-radius: 8px;
    }
    .card .card-header .card-title {
        font-size: 14px;
    }
    /* 卡片头部右侧说明文字在小屏隐藏，避免挤压 */
    .card-header > small.text-muted {
        display: none;
    }

    /* Hero：按钮改为文档流，不再绝对定位 */
    .ld-hero {
        padding: 20px;
        border-radius: 10px;
    }
    .ld-hero::before {
        font-size: 130px;
        right: -25px;
        top: -15px;
    }
    .ld-hero h2 {
        font-size: 17px;
    }
    .ld-hero h2 b {
        font-size: 28px;
    }
    .ld-hero p {
        font-size: 12px;
    }
    .ld-hero .ld-publish-btn {
        position: static;
        transform: none;
        display: inline-block;
        margin-top: 14px;
        padding: 8px 16px;
        font-size: 12px;
    }

    /* 统计卡：缩小数字与图标 */
    .ld-stat-card .card-body {
        padding: 16px;
    }
    .ld-stat-card .stat-num {
        font-size: 24px;
    }
    .ld-stat-card .stat-label {
        font-size: 12px;
    }
    .ld-stat-card .stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 20px;
    }

    /* 柱状图：收紧间距 */
    .ld-chart-bars {
        gap: 6px;
        height: 150px;
        padding-top: 10px;
    }
    .ld-chart-bars .bar-col .bar-track {
        height: 90px;
    }
    .ld-chart-bars .bar-col .bar-value {
        font-size: 12px;
    }
    .ld-chart-bars .bar-col .bar-label {
        font-size: 10px;
        white-space: nowrap;
    }

    /* 环形图：缩小尺寸 */
    .ld-donut-wrap {
        gap: 14px;
    }
    .ld-donut {
        width: 96px;
        height: 96px;
    }
    .ld-donut::after {
        width: 56px;
        height: 56px;
    }
    .ld-donut-center b {
        font-size: 17px;
    }
    .ld-donut-legend li {
        font-size: 12px;
        padding: 5px 0;
    }
    .ld-substats {
        gap: 10px;
    }
    .ld-substats b {
        font-size: 17px;
    }
    .ld-substats span {
        font-size: 11px;
    }

    /* 排行榜与留言：标题允许截断 */
    .ld-rank-row {
        gap: 10px;
    }
    .ld-rank-row .rank-main b {
        font-size: 13px;
    }
    .ld-rank-row .rank-like {
        font-size: 12px;
    }
    .ld-comment-item p {
        font-size: 12px;
    }

    /* 表格单元格留白收紧 */
    .table td, .table th {
        padding: 10px;
        font-size: 12px;
    }

    /* 时光管理表格 → 卡片式布局 */
    .ld-table-cards thead {
        display: none;
    }
    .ld-table-cards,
    .ld-table-cards tbody,
    .ld-table-cards tbody tr,
    .ld-table-cards tbody td {
        display: block;
        width: 100%;
    }
    .ld-table-cards tbody tr {
        position: relative;
        padding: 14px 12px;
        border-bottom: 1px solid #f0f2f5;
    }
    .ld-table-cards tbody tr:last-child {
        border-bottom: none;
    }
    .ld-table-cards tbody td {
        border: none !important;
        padding: 0;
    }
    /* 封面缩略图浮动到左侧 */
    .ld-table-cards tbody td:nth-child(1) {
        float: left;
        width: auto;
        margin-right: 12px;
        margin-bottom: 8px;
    }
    .ld-table-cards .ld-post-thumb,
    .ld-table-cards .ld-post-thumb-empty {
        width: 64px;
        height: 64px;
    }
    /* 详情区 */
    .ld-table-cards tbody td:nth-child(2) {
        overflow: hidden;
        min-height: 64px;
    }
    .ld-table-cards tbody td:nth-child(2) > b {
        display: block;
        font-size: 13px;
        line-height: 1.5;
        word-break: break-all;
    }
    .ld-table-cards tbody td:nth-child(2) .text-dark {
        font-size: 12px !important;
        word-break: break-word;
        white-space: normal;
    }
    /* 操作按钮独占一行，清除浮动 */
    .ld-table-cards tbody td:nth-child(3) {
        clear: both;
        padding-top: 10px;
        width: 100% !important;
    }
    .ld-table-cards tbody td:nth-child(3) .btn {
        padding: 4px 12px;
        font-size: 12px;
        margin-right: 6px;
    }

    /* 评论管理表格 → 操作按钮下移一行 */
    #ld-comments-table thead,
    .ld-table-auto-cards thead {
        display: none;
    }
    .ld-table-auto-cards,
    .ld-table-auto-cards tbody,
    .ld-table-auto-cards tbody tr,
    .ld-table-auto-cards tbody td {
        display: block;
        width: 100% !important;
    }
    .ld-table-auto-cards tbody tr {
        padding: 12px;
        border-bottom: 1px solid #f0f2f5;
    }
    .ld-table-auto-cards tbody td {
        border: none !important;
        padding: 0;
    }
    .ld-table-auto-cards tbody td + td {
        padding-top: 8px;
    }
    .ld-table-auto-cards tbody td:last-child {
        text-align: right;
    }

    /* 账户列表：头像缩小，操作按钮移到信息下方 */
    .ld-account-item {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 15px;
    }
    .ld-account-avatar {
        width: 46px;
        height: 46px;
        font-size: 19px;
    }
    .ld-account-name {
        font-size: 15px;
    }
    .ld-account-meta {
        gap: 3px 10px;
        font-size: 11px;
    }
    .ld-account-actions {
        width: 100%;
        margin-left: 0;
        padding-left: 58px;
        box-sizing: border-box;
        margin-top: -2px;
    }
    .ld-account-owner-mark {
        padding: 3px 10px;
        font-size: 11px;
    }

    /* 设置页：输入框与文本域字号防止 iOS 自动放大 */
    .form-control, .custom-select {
        font-size: 16px;
    }
    .form-group > label {
        font-size: 13px;
    }
    .ld-media-preview {
        max-width: 100%;
        height: auto;
    }

    /* 登录页 */
    body.ld-login-body .login-card-custom {
        padding: 30px 22px;
        border-radius: 12px;
        margin: 15px 0;
    }
    body.ld-login-body .login-brand .lg-heart {
        font-size: 32px;
    }
    body.ld-login-body .login-brand h1 {
        font-size: 17px;
    }
    body.ld-login-body .form-control {
        font-size: 16px; /* 防止 iOS 聚焦放大 */
    }

    /* Flash 消息 */
    .ld-flash {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* 超小屏（<=375px）再收紧 */
@media (max-width: 374.98px) {
    .ld-stat-card .stat-num {
        font-size: 21px;
    }
    .ld-stat-card .stat-icon {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }
    .ld-hero h2 b {
        font-size: 24px;
    }
    .ld-chart-bars {
        gap: 4px;
    }
    .ld-donut {
        width: 84px;
        height: 84px;
    }
    .ld-donut::after {
        width: 48px;
        height: 48px;
    }
}

/* ------------------------------------------------------------ 留言管理 */

.ld-bless-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ld-bless-item {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f2f6;
    transition: background-color .18s ease;
}

.ld-bless-item:last-child { border-bottom: 0; }
.ld-bless-item:hover { background: #fcfbff; }

.ld-bless-ava {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #f472b6, #a855f7);
    box-shadow: 0 5px 14px -6px rgba(168, 85, 247, .55);
}

.ld-bless-ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ld-bless-main { min-width: 0; flex: 1; }

.ld-bless-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ld-bless-name {
    font-size: 14px;
    font-weight: 600;
    color: #2f3542;
}

.ld-ip-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px 1px 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.7;
    color: #7c5a96;
    white-space: nowrap;
    background: linear-gradient(135deg, #f8f4ff, #f1eafc);
    border: 1px solid rgba(139, 92, 246, .16);
    border-radius: 20px;
}

.ld-ip-chip i {
    font-size: 12px;
    opacity: .75;
}

.ld-ip-raw {
    padding: 1px 7px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10.5px;
    letter-spacing: .02em;
    color: #6b7280;
    background: #f4f5f7;
    border-radius: 6px;
}

.ld-bless-time {
    margin-left: auto;
    font-size: 11.5px;
    color: #9aa1ad;
}

.ld-bless-text {
    margin: 8px 0 0;
    font-size: 13.5px;
    line-height: 1.75;
    color: #4b5563;
    word-break: break-word;
}

.ld-bless-replied {
    display: flex;
    gap: 7px;
    margin-top: 10px;
    padding: 9px 12px;
    font-size: 12.5px;
    line-height: 1.7;
    color: #6d5a8c;
    background: #f7f5fd;
    border-left: 3px solid #b39ddb;
    border-radius: 0 8px 8px 0;
}

.ld-bless-replied i {
    flex: 0 0 auto;
    margin-top: 1px;
    font-size: 14px;
    opacity: .7;
}

.ld-bless-foot {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.ld-bless-reply summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #5b5fc7;
    cursor: pointer;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(102, 126, 234, .35);
    border-radius: 6px;
    transition: background-color .18s ease, color .18s ease;
}

.ld-bless-reply summary::-webkit-details-marker { display: none; }

.ld-bless-reply summary:hover {
    color: #fff;
    background: #667eea;
}

.ld-bless-reply[open] summary {
    margin-bottom: 8px;
}

.ld-bless-form {
    display: flex;
    gap: 8px;
}

.ld-bless-form input {
    min-width: 0;
    flex: 1;
    padding: 6px 12px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 8px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.ld-bless-form input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, .16);
}

@media (max-width: 767.98px) {
    .ld-bless-item {
        gap: 11px;
        padding: 14px 13px;
    }

    .ld-bless-ava {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .ld-bless-time {
        width: 100%;
        margin-left: 0;
        font-size: 11px;
    }

    .ld-bless-foot {
        gap: 8px;
    }

    .ld-bless-form {
        flex-direction: column;
    }

    .ld-bless-form .btn {
        align-self: flex-start;
    }
}
