.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
}

.tool-content .medicine-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-simple);
    margin-bottom: 1em;
}

/*按钮样式*/
.btn {
    outline: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 12px;
    background-color: #f4f6f9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-family: var(--font-simple);
    font-size: 14px;
}

.btn:hover {
    background-color: rgb(93 79 248 / 15%);
    color: var(--primary-color);
}

.btn .ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    animation: ripple-effect 0.6s ease-out forwards;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/*表格样式*/
.table-container table th, .table-container table td {
    border-width: 0;
    white-space: nowrap;
    text-align: center;
}

.table-container table th:nth-child(2), .table-container table th:nth-child(3), .table-container table td:nth-child(2), .table-container table td:nth-child(3) {
    text-align: left;
}

.table-container table td:nth-child(1) input.medicine-checkbox, .table-container table th:nth-child(1) input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #474afd;
    border-radius: 3px;
    border: 1px solid #bbb;
    vertical-align: middle; /* 关键属性 */
    position: relative;
    top: -1px; /* 微调位置 */
    background-color: #fff;
}

.table-container table tr {
    cursor: pointer;
    user-select: none;
}

.table-container table td:nth-child(1) input.medicine-checkbox:hover, .table-container table th:nth-child(1) input:hover {
    border-color: var(--primary-color);
}

.table-container table td:nth-child(1) input.medicine-checkbox:checked, .table-container table th:nth-child(1) input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.table-container table td:nth-child(1) input.medicine-checkbox:checked::after, .table-container table th:nth-child(1) input:checked::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 创伤护理 - 红色系 */
.trauma-care {
    color: #dc3545;
}

/* 退烧止痛 - 蓝色系 */
.fever-pain {
    color: #0d6efd;
}

/* 胃肠用药 - 绿色系 */
.gastrointestinal {
    color: #198754;
}

/* 皮肤护理 - 橙色系（黄色对比度不够） */
.skin-care {
    color: #e67e22; /* 改用深橙色确保可读性 */
}

/* 过敏用药 - 紫色系 */
.allergy {
    color: #6f42c1;
}

/* 医疗工具 - 灰色系 */
.medical-tools {
    color: #6c757d;
}

@media (max-width: 768px) {
    .tool-content {
        padding: .9em !important;
    }

    .operate-buttons .btn {
        line-height: 32px !important;
        height: 32px !important;
        padding: 0 8px !important;
    }

    .tool-content .mobile-item label span {
        height: 16px !important;
        padding: 0 4px !important;
        margin: 0 2px !important;
        font-size: 12px !important;
    }

    .table-container table th, .table-container table td {
        padding: 8px !important;
    }
}
