/* ============================================================
 * 全局表格样式 + 行内备注快编辑器
 * 从 bootstrap.php 内联迁移为外部文件，PJAX 切换时可被浏览器缓存
 * ============================================================ */

/* 全局表格间距优化 */
.table th,
.table td {
    padding: 0.85rem 0.75rem !important;
    vertical-align: middle !important;
}

/* 卡片圆角和边框增强 */
.card {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 时间显示样式 */
.table td {
    font-family: inherit;
    font-size: 13.5px;
}

/* 防止按钮被挤压换行 */
.table .btn {
    white-space: nowrap;
}

/* ============ 行内备注快编辑器 ============ */
.remark-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 5px;
    max-width: 180px;
    transition: background .15s;
    position: relative;
}

.remark-cell:hover {
    background: rgba(34, 158, 217, .10);
}

.remark-cell .remark-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.remark-cell .remark-edit-ico {
    font-size: 11px;
    opacity: 0;
    color: #229ED9;
    transition: opacity .15s;
    flex-shrink: 0;
}

.remark-cell:hover .remark-edit-ico {
    opacity: .85;
}

.remark-cell.is-saving {
    opacity: .5;
    pointer-events: none;
}

/* 备注编辑 popover */
.remark-popover {
    position: absolute;
    z-index: 9999;
    background: #111a2e;
    border: 1px solid rgba(34, 158, 217, .35);
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(34, 158, 217, .12);
    padding: 12px;
    width: 300px;
    font-family: inherit;
    animation: rk-pop-in .15s ease-out;
}

@keyframes rk-pop-in {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.remark-popover textarea {
    width: 100%;
    min-height: 70px;
    max-height: 180px;
    background: rgba(11, 18, 32, .8);
    color: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.remark-popover textarea:focus {
    border-color: #229ED9;
    box-shadow: 0 0 0 3px rgba(34, 158, 217, .15);
}

.remark-popover-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 8px;
}

.remark-popover-tip {
    font-size: 11px;
    color: #64748b;
}

.remark-popover-btns {
    display: flex;
    gap: 6px;
}

.remark-popover-btns button {
    height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 6px;
    background: transparent;
    color: #cbd5e1;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
}

.remark-popover-btns button:hover {
    background: rgba(148, 163, 184, .10);
    color: #fff;
}

.remark-popover-btns .rk-save {
    background: linear-gradient(135deg, #37AEE2, #229ED9);
    border-color: transparent;
    color: #fff;
    font-weight: 500;
}

.remark-popover-btns .rk-save:hover {
    box-shadow: 0 4px 12px rgba(34, 158, 217, .4);
    color: #fff;
}